Preference Activity is a base class mainly used for setting order of preferences of an user.It is mainly used for creating setting page of an user.In this example I am just showing how to set Preferences. First create an Activity MainActivity.java Here on clicking preference example button a page will be opened to set the preferences. On clicking the show values we can see the see the values that we have set. MainActivity.java import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button btn = (Button) findViewById(R.id.btn_pref); Button btn1 = (Button) findViewById(R.id.btn_values); btn.setOnCli...