试图隐藏“DisableGMS”选项,但不知道将代码放在何处或如何使用它,我可以在网上找到很多关于如何实现“removePreference”的例子。每个人只是说使用“removePreference”,但没有关于如何在代码中使用它或放置它的位置的实现示例。有人可以把它放进去吗?
<?xml version="1.0" encoding="UTF-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<ListPreference android:entries="@array/LockScreenEffectName" android:title="Unlock effect settings" android:key="lockscreen_effect" android:summary="Set the phone to unlock effect" android:entryValues="@array/LockScreenEffectValue"/>
<SwitchPreference android:title="Moon calendar lock screen settings" android:key="lockscreen_showmoon" android:summary="It is displayed on the moon lock screen" android:summaryOn="moon lock screen has been enabled" android:summaryOff="moon lock screen has been disabled"/>
<SwitchPreference android:title="Lock screen clock shows seconds" android:key="aurora_lockscreen_seconds" android:summary="Second display on the lock screen" android:summaryOn="Lock screen has been displayed in seconds" android:summaryOff="Lock screen has hidden seconds"/>
<EditTextPreference android:title="Custom lock screen operator name" android:key="CarrierText_Keyguard" android:summary="Lock screen will display the operator name custom name" android:dialogTitle="Please enter the custom lock screen operator name"/>
<ListPreference android:entries="@array/SettingName" android:title="System Settings Style" android:key="listui" android:summary="Setting your favorite style system settings" android:entryValues="@array/SettingValue"/>
<SwitchPreference android:title="WIFI signal optimization" android:key="WifiManager" android:summary="WIFI signal optimization" android:summaryOn="It has opened WIFI Optimization" android:summaryOff="WIFI optimization has been closed"/>
<ListPreference android:entries="@array/ScreenModeName" android:title="Screen display mode" android:key="ScreenMode" android:summary="Change the screen display mode" android:entryValues="@array/ScreenModeValue"/>
<SwitchPreference android:title="3 dot menu mode" android:key="3dot_menu" android:summary="Three menu keys increase" android:summaryOn="3:00 menu has been opened" android:summaryOff="3:00've hidden menu"/>
<ListPreference android:entries="@array/SoundVolumeName" android:title="Sound volume settings" android:key="SoundVolume" android:summary="Appropriate adjustments phone loud sound" android:entryValues="@array/SoundVolumeValue"/>
<ListPreference android:entries="@array/LocationName" android:title="Network Location Service Engine" android:key="networklocation" android:summary="Choose Baidu or Google engine" android:entryValues="@array/LocationValue"/>
<SwitchPreference android:title="DisableGMS" android:key="gms_service" android:summary="to disable gms" android:summaryOn="GMS Enabled" android:summaryOff="GMS Disabled"/>
<SwitchPreference android:title="Lock Screen Weather" android:key="LockScreenWeather" android:summary="Lock screen display weather information" android:summaryOn="Lock screen weather enabled" android:summaryOff="Lock screen weather disabled"/>
<SwitchPreference android:title="Lock screen pedometer" android:key="LockScreenSteps" android:summary="Lock screen information display pedometer" android:summaryOn="Lock screen pedometer has been shown" android:summaryOff="Lock screen pedometer has been hidden"/>
<SwitchPreference android:title="Quick Unlock the lock screen (no point OK)" android:key="AutoUnlock" android:summary="In the lock screen is OK to complete the password entry point" android:summaryOn="Quick Unlock enabled" android:summaryOff="Quick Unlock has been disabled"/>
<SwitchPreference android:title="Turn on screen when a USB connection or disconnection" android:key="NoWakeOnPlugOrUnplug" android:summary="Turn screen on when USB connection or disconnection" android:summaryOn="When connected turn on" android:summaryOff="When connected stays off"/>
<SwitchPreference android:title="Automatic brightness fine-tuning (+ -5)" android:key="AutoBrightAdjst" android:summary="Enable automatic brightness trim function" android:summaryOn="Automatic brightness trimming has been opened" android:summaryOff="Automatic brightness trimming has been closed"/>
<SwitchPreference android:title="Status Bar Time centered" android:key="CenterTime" android:summary="Status Bar Time centered" android:summaryOn="Status Bar Time centered open" android:summaryOff="Status Bar Time centered Close"/>
<SwitchPreference android:title="Double-click the status bar lock screen" android:key="DoubleClickOffScreen" android:summary="Double-click the status bar lock screen" android:summaryOn="Double-click the status bar lock screen has been opened" android:summaryOff="Double-click the status bar has been closed lock screen"/>
<SwitchPreference android:title="Smart cover lock screen weather information" android:key="LockWeather" android:summary="Weather information is displayed in a holster lock screen" android:summaryOn="Case lock screen to display weather information has been" android:summaryOff="Case lock screen weather information has been hidden"/>
<SwitchPreference android:title="Smart cover lock screen pedometer" android:key="LockWalkMate" android:summary="Whether the holster lock screen display pedometer" android:summaryOn="Case lock screen pedometer has been shown" android:summaryOff="Pedometers hide leather lock screen"/>
</PreferenceScreen>