M Rajoy
M Rajoy

Reputation: 4094

Combining own BaseActivity and PreferencesActivity

I have a BaseFragmentActivity that all my activities extend. I would like to createa PreferencesActivity and take advantage of Androids preferences.xml capabilities, but obviously I cannot extend both classes.

I know newer APIs provide the use of PreferenceFragments but I want to offer support to legacy Android versions (from 2.3 and above).

How can I make use of the Preferences structure and extend my own base class (which has a few functionalities I need for all activities).

Upvotes: 0

Views: 56

Answers (1)

sandrstar
sandrstar

Reputation: 12643

Seems it's not possible to use PreferenceFragment now on older versions (here some discussion about it). However, here some link to xda-developers for creating Your own for older versions (but it's pretty hacky).

Upvotes: 1

Related Questions