开发者

Android: add buttons to a preference screen

开发者 https://www.devze.com 2023-02-05 12:26 出处:网络
The thing is...I want to开发者_如何学编程 use PreferenceActivity to add a new row in my custom list view. So my preference ativity will consist of a few EditTextPreferences, my custom TimePickerPrefer

The thing is...I want to开发者_如何学编程 use PreferenceActivity to add a new row in my custom list view. So my preference ativity will consist of a few EditTextPreferences, my custom TimePickerPreference and a coulpe of ListPreferences... Like this: http://www.google.com/help/hc/images/android/android_ug/168567.5.png . The question is how they added buttons on the bottom? And.. is it possible to use OnClickListener for obtaining inputed values and how? Thanks!


A PreferenceActivity inherits from ListActivity. By default, ListActivity creates its own ListView, but you can supply your own layout via setContentView(), so long as your ListView in the layout has the right android:id. Here is the layout for the alarm activity.

0

精彩评论

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