PreferenceActivity doesn't show twice on android

I have a PreferenceActivity that works fine the first time I launch it.

But if I close it (using the back button) and then I open it (via a mouse click in the main activity) then I get a black screen. There is no preference ..

I can't figure out why it shouldn't work.

All the code seems to be called fine as a worker, but no preference is displayed on the screen.

Has anyone had the same behavior?

+2


source to share


1 answer


Here's a sample project that demonstrates usage PreferenceScreen

and doesn't suffer from this issue. Perhaps you can compare your implementation to this to see where things differ.



+1


source







All Articles