Search code examples
androidtabactivitypreferenceactivity

Starting a PreferenceActivity from a TabActivity


I have a TabActivity which starts when the application is launched. It contains 3 tabs. I have added a Settings option in the OptionMenu which when clicked starts a custom PreferenceActivity. it is a simple activity which does addPreferencesFromResource(R.xml.preferences); in its onCreate method. However, when the user clicks on the Settings option, I receive this warning and nothing is shown at all :

07-07 13:07:56.397: WARN/InputManagerService(110): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4075fa28

What exactly is the problem with this? Is there any special way to handle Calling Activities inside TabActivity. How to fix this?

Thanks in advance.


Solution

  • Instead of the using the xml, I did this programmatically inside each of the activities and it worked fine.