Question

after updating ADT i had lots of issues and deleted my Workspace and recloned everything with git and got a newer HoloEverywhere revision (dont know previous revision, but i want to use latest).

I had to check my libs in BuildPath/Order and had to fix all compiler errors (like changing imports from org.holoeverywhere.arrayadapter to org.holoeverywhere.widget.arrayadapter), and now everything except my PreferenceFragments is working again.

How i make the PreferenceFragments work again?

When i start a activity, which attaches the PreferenceFragment via

getSupportFragmentManager().beginTransaction()
                .replace(android.R.id.content, new SettingsFragment()).commit();

i get a blank Activity.

The PreferenceFragment is also pretty simple: only

addPreferencesFromResource(R.xml.settings);

in onCreate (i have also one with dynamic Preferences, dont work also -> not a xml problem)

anything worked before i updated ADT/HoloEverywhere

what can i do to make the PreferenceFragments work again? Logcat does not say anything special and i have also added the PreferenceFramework (as i did also before);

Was it helpful?

Solution

the problem was that android.R.id.content does not exist anylonger in the view hierarchy. i just setContentView'ed to a layout with a empty framelayout and a custom id and used that id instead of android.R.id.content.

in most tutorials it shows the method with android.R.id.content, but it seems to not be the correct way :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top