I am trying to add a custom TitleBar to my PreferenceActivity. But the application is crashing. PS : it is working for my other Activities.
I have tried all the answers of these 2 questions and it didn't work:
This is one of the tested codes :
@Override
protected void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.my_pref);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
R.layout.costum_title_bar);
}
Every suggestion is welcome. Thanks for your time and consideration.