开发者

How to set a layout using spinner

开发者 https://www.devze.com 2023-02-12 23:40 出处:网络
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.

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.

How to set a layout using spinner

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消