pad右下角設置裏面有一項Wi-Fi選項,若項目中沒有wifi功能所以隱藏
1. 屬於系統界面所以在frameworks\base\packages\SystemUI
經過Wi-Fi java
frameworks\base\packages\SystemUI\res\values\strings.xml android
<string name="status_bar_settings_wifi_button">Wi-Fi</string>
2.經過
status_bar_settings_wifi_button
\frameworks\base\packages\SystemUI\res\layout-sw600dp\status_bar_settings_view.xml
<!-- Network -->
<LinearLayout
android:id="@+id/network"
style="@style/StatusBarPanelSettingsRow"
>
<ImageView
android:id="@+id/network_icon"
style="@style/StatusBarPanelSettingsIcon"
android:src="@drawable/ic_sysbar_wifi_on"
/>
<TextView
android:id="@+id/network_label"
style="@style/StatusBarPanelSettingsContents"
android:text="@string/status_bar_settings_wifi_button"
/>
</LinearLayout>
<View style="@style/StatusBarPanelSettingsPanelSeparator" />
將這段註釋掉
3.可是上面這段中有個
id/network所以.java文件中確定會調用。經過
R.id.network
frameworks\base\packages\SystemUI\src/com/android/systemui/statusbar/tablet/SettingsView.java a.findViewById(R.id.network).setOnClickListener(this); b.case R.id.network: onClickNetwork(); break; 將上面兩段也 註釋