Reorganize settings menu

Mostly xml work, with one small hack to fix the sub menu themes, found
here: http://code.google.com/p/android/issues/detail?id=4611#c35
This commit is contained in:
Lilia Markham
2013-03-28 05:45:07 -07:00
parent e3c5e837e1
commit 815613cfaa
3 changed files with 113 additions and 102 deletions

View File

@@ -25,6 +25,7 @@ import android.net.Uri;
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.preference.Preference;
import android.preference.PreferenceScreen;
import android.preference.PreferenceManager;
import android.provider.ContactsContract;
import android.util.Log;
@@ -383,4 +384,17 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredSherlockPr
}
}
/* http://code.google.com/p/android/issues/detail?id=4611#c35 */
@SuppressWarnings("deprecation")
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference)
{
super.onPreferenceTreeClick(preferenceScreen, preference);
if (preference!=null)
if (preference instanceof PreferenceScreen)
if (((PreferenceScreen)preference).getDialog()!=null)
((PreferenceScreen)preference).getDialog().getWindow().getDecorView().setBackgroundDrawable(this.getWindow().getDecorView().getBackground().getConstantState().newDrawable());
return false;
}
}