My main preference activity is set to \"@android:style/Theme.Light\"
. One of my preferences is a DialogPreference who\'s Dialog contains a ListView. The ListV
I have a solution how you can do it programmatically (I think its the easier way):
public class CustomDialogPreference extends DialogPreference {
...
@Override
protected void showDialog(Bundle state) {
super.showDialog(state);
//changing color of divider
int divierId = getDialog().getContext().getResources()
.getIdentifier("android:id/titleDivider", null, null);
View divider = getDialog().findViewById(divierId);
divider.setBackgroundColor(getContext().getResources().getColor(R.color.light_orange));
//changing color of title textview
int titleId = getDialog().getContext().getResources()
.getIdentifier("android:id/alertTitle", null, null);
TextView title = (TextView) getDialog().findViewById(titleId);
title.setTextColor(getContext().getResources().getColor(R.color.light_orange));
}
...
}