I\'m quite new to Android Development and just came across Preferences.
I found PreferenceScreen
and wanted to create a login functionality with it. The only pr
You can also customise the layout of a Preference by overriding Preference.onCreateView(parent)
. The example below uses an anonymous inner class to make red preferences.
screen.addPreference(
new Preference(context) {
@Override
protected View onCreateView(ViewGroup parent) {
View view = super.onCreateView(parent);
view.setBackgroundColor(Color.RED);
return view;
}
});
You could use this technique to add a button to the default view.