I want to make a simple settings page, I went to Google's documentation below:
http://developer.android.com/guide/topics/ui/settings.html
created new android testing project, then I created the PreferenceScreen xml, and PreferenceFragment class inside my mainActivity class.
I want the settings screen to appear when I press the settings icon, but instead it only shows one unclickable item named settings.
I know my question is basic, but I tried a lot to make it work with no results.
any help please?
If you want to open the settings from the Menu inside the action bar, as shown below :
First, you need to define a Menu item inside the menu.xml file for that activity :
Second, you need to infate the menu, and then the events for the menu item click can be handles using the methods shown below :