在法律信息中添加菜单
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
想在“设置-关于手机-法律信息”中添加一个菜单,但没有找到其布局文件。
[SOLUTION]
请在Device_info_settings.xml (alps\packages\apps\settings\res\xml)
中下面部分添加,其中JASONYYY是我添加的一个菜单项,贵司可以对照修改.
action部分为该菜单项对应的intent.
<!-- Legal Information -->
<PreferenceScreen
android:key="container"
android:title="@string/legal_information">
<!-- Note: The titles given here probably won't be used. Instead, we programmatically
fill the title with the label of the activity with the corresponding action.
If there is not an activity for an action, the item will be removed fROM the
list. -->
<!-- Copyright information -->
<PreferenceScreen
android:key="copyright"
android:title="@string/copyright_title">
<intent android:action="android.settings.COPYRIGHT" />
</PreferenceScreen>
<!-- License information -->
<PreferenceScreen
android:key="license"
android:title="@string/license_title">
<intent android:action="android.settings.LICENSE" />
</PreferenceScreen>
<!-- Terms and conditions -->
<PreferenceScreen
android:key="terms"
android:title="@string/terms_title">
<intent android:action="android.settings.TERMS" />
</PreferenceScreen>
<!-- Terms and conditions -->
<PreferenceScreen
android:key="JASONYYY"
android:title="JASONYYY">
<intent android:action="android.settings.LICENSE" />
</PreferenceScreen>
</PreferenceScreen>
想在“设置-关于手机-法律信息”中添加一个菜单,但没有找到其布局文件。
[SOLUTION]
请在Device_info_settings.xml (alps\packages\apps\settings\res\xml)
中下面部分添加,其中JASONYYY是我添加的一个菜单项,贵司可以对照修改.
action部分为该菜单项对应的intent.
<!-- Legal Information -->
<PreferenceScreen
android:key="container"
android:title="@string/legal_information">
<!-- Note: The titles given here probably won't be used. Instead, we programmatically
fill the title with the label of the activity with the corresponding action.
If there is not an activity for an action, the item will be removed fROM the
list. -->
<!-- Copyright information -->
<PreferenceScreen
android:key="copyright"
android:title="@string/copyright_title">
<intent android:action="android.settings.COPYRIGHT" />
</PreferenceScreen>
<!-- License information -->
<PreferenceScreen
android:key="license"
android:title="@string/license_title">
<intent android:action="android.settings.LICENSE" />
</PreferenceScreen>
<!-- Terms and conditions -->
<PreferenceScreen
android:key="terms"
android:title="@string/terms_title">
<intent android:action="android.settings.TERMS" />
</PreferenceScreen>
<!-- Terms and conditions -->
<PreferenceScreen
android:key="JASONYYY"
android:title="JASONYYY">
<intent android:action="android.settings.LICENSE" />
</PreferenceScreen>
</PreferenceScreen>
