I want to create a layout like the below picture. How can I set the drop-down like this with cancel option. I am using spinner to show the drop-down but开发者_C百科 cannot set the layout like this.
Can anyone help me to create a drop-down like this. I also want to create an expand button for a list item which will open the content in a new page. My aim is to set all the available settings in a single page.
Then use PreferenceActivity
. In fact, that's a standard preference screen.
- http://developer.android.com/reference/android/preference/PreferenceScreen.html
- http://jetpad.org/2011/01/creating-a-preference-activity-in-android/
You can take a look at the API Demo app which is in the Android SDK. There you can learn how to create this kind of screens (either from XML or code). It has many advantages... for instance, you won't have to worry about persisting the settings... the OS will do that for you.
精彩评论