RK:SIM卡状态显示、隐藏设置搜索栏
一.锁屏状态下屏幕左上角出现“没有sim卡”
1.1."No SIM Card" keyguard_missing_sim_message_short
1.2.隐藏
--- a/frameworks/base/packages/Keyguard/src/com/android/keyguard/CarrierText.java +++ b/frameworks/base/packages/Keyguard/src/com/android/keyguard/CarrierText.java @@ -184,7 +184,7 @@ public class CarrierText extends TextView { if (!anySimReadyAndInService && WirelessUtils.isAirplaneModeOn(mContext)) { displayText = getContext().getString(R.string.airplane_mode); } - setText(displayText); + setText(""); }
1.3.模块信号显示 在 CarrierText.java 大有可为
二.设置 搜索栏 packages\apps\Settings\src\com\android\settings\SettingsActivity.java
2.1. image 资源在 framework 的 res/menu 这东西是画出来的
2.2.Search 控件加载
@Override public boolean onCreateOptionsMenu(Menu menu) { if (!mDisplaySearch) { return false; } MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.options_menu, menu); // Cache the search query (can be overriden by the OnQueryTextListener) final String query = mSearchQuery; mSearchMenuItem = menu.findItem(R.id.search); mSearchView = (SearchView) mSearchMenuItem.getActionView(); if (mSearchMenuItem == null || mSearchView == null) { return false; } if (mSearchResultsFragment != null) { mSearchResultsFragment.setSearchView(mSearchView); } mSearchMenuItem.setOnActionExpandListener(this); mSearchView.setOnQueryTextListener(this); mSearchView.setOnCloseListener(this); if (mSearchMenuItemExpanded) { mSearchMenuItem.expandActionView(); } mSearchView.setQuery(query, true /* submit */); return true; }