Skip to main content

Posts

Showing posts with the label extension

Common Code for Activity and PreferenceActivity

I'm using common code in my Activity like this: abstract class CommonCode extends Activity { //Common Code here... } then in my "Activity" I extend CommonCode instead of Activity and it all works fine. My problem arise when I try to use commoncode in a PreferenceActivity, I tried: abstract class CommonCode extends Activity { class CommonCodePreferences extends PreferenceActivity { } //Common Code here... } but it isn't right. How can I do it?