Navigate back from settings activity
override the onOptionsItemSelected
method on your AppCompatPrefernceActivity and make it like this
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
// Respond to the action bar's Up/Home button
case android.R.id.home:
super.onBackPressed();
return true;
}
return super.onOptionsItemSelected(item);
}
Vspallas answer is correct. The mistake was on my side. I had an onOptionsItemSelected method inside the preferenceFragment, not in the Activity. Mea culpa.