Android: add buttons to a preference screen
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.
精彩评论