Preference Control in Android
In Android with Shared Preferences we can set controls to build preference screens.
1. Check box Preference 2. Edit Tex Preference 3. List Preference
4. Ring Tone Reference
Here, example and codes given for Edit Tex Preference
- Preference Screen, when click to "click" button
- Dialogue Appear, when click to Name- Edit Text
- Message appear, when click to "ok" button
- Age Dialogue appear, when click to Age- Edit Text
- Message Appear, when click to "Ok" button
- Main Screen, When back from Preference Activity
In Android with Shared Preferences we can set controls to build preference screens.
1. Check box Preference 2. Edit Tex Preference 3. List Preference
4. Ring Tone Reference
Here, example and codes given for Edit Tex Preference
- Package Explored Window
- Main Screen
- Preference Screen, when click to "click" button
- Dialogue Appear, when click to Name- Edit Text
- Message appear, when click to "ok" button
- Age Dialogue appear, when click to Age- Edit Text
- Message Appear, when click to "Ok" button
- Main Screen, When back from Preference Activity
- PreferenceNativeDemo Activity.java
- SetPreference.java
- Manifest file
-pref1.xml - Generates Screen for Preferences
I hope this example will clear your concepts. If you like this codes, do not forget to give your comments.
For any other query, you can mail : pranavdv@gmail.com
-