Edittextpreference:
:
This dialog box is displayed when you click Enter name on the homepage.
Code:
<? XML version = "1.0" encoding = "UTF-8"?> <Br/> <preferencescreen <br/> xmlns: Android = "http://schemas.android.com/apk/res/android" <br/> Android: Key = "edittext_screen" <br/> Android: title = "screen title" <br/> Android: Summary = "Brief description" <br/> </P> <p> <edittextpreference <br/> Android: dialogtitle = "enter your name:" <br/> Android: Key = "edittitlepreference" <br/> Android: Summary = "Brief description" <br/> Android: title = "input name" <br/> </edittextpreference> <br/> </preferencescreen> <br/>
-------------------------------------------------------------------
Ringtonepreference:
Code:
<? XML version = "1.0" encoding = "UTF-8"?> <Br/> <preferencescreen <br/> xmlns: Android = "http://schemas.android.com/apk/res/android" <br/> Android: Key = "edittext_screen" <br/> Android: title = "screen title" <br/> Android: Summary = "Brief description" <br/> <! -- <Br/> Android: ringtonetype: Set the ringing mode, including ringtone, notification, alarm, and all. <br/> Android: show whether showsilent is muted. <br/> note, if there is no ringtone in the simulator, we can add it by ourselves. Copy the music to the SD card, go to the android Media Player application, select the music, <br/> click menu, then select uses as ringtone </P> <p> --> <br/> <ringtonepreference <br/> Android: Key = "ringtonepreference" <br/> Android: summary = "Brief description" <br/> Android: Title = "Select system ringtone" <br/> Android: ringtonetype = "alarm" <br/> Android: showsilent = "true" <br/> </ringtonepreference> </P> <p> </preferencescreen>
Let's take a look at how XML is stored in the background.
<? XML version = '1. 0' encoding = 'utf-8' standalone = 'Yes'?>
<Map>
<String name = "ringtonepreference"> content: // settings/system/alarm_alert </string>
</Map>
Here we should note that the value of ringtonepreference is a URI string.
Bytes ------------------------------------------------------------------------------------