Tag Archives: addPreferencesFromResource

How to use Preferences in android?

By | February 9, 2012

Hello all… Today I will show you how to use preferences in android? First we will create preferences using [java] EditTextPreference [/java] Create a folder named “xml” inside the “res” folder and inside that create an xml named “preferences.xml”. [xml] <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <EditTextPreference android:title="User Name" android:key="username" android:summary="Please enter username"> </EditTextPreference> <EditTextPreference android:title="Password" android:password="true" android:key="password" android:summary="Pleaseā€¦ Read More »