wallpaper - android:settingsActivity - how to get non-standard behavior -
i have made live wallpaper, has many complex settings. looking @ various examples on web appears standard way set preferences in wallpaper have xml this:
<wallpaper xmlns:android="http://schemas.android.com/apk/res/android" android:thumbnail="@drawable/my_icon" android:description="@string/wallpaper_description" android:settingsactivity="com.mycompany.mywallpaper.mywallpapersettings" />
where mywallpapersettings
class defined this:
public class mywallpapersettings extends preferenceactivity implements sharedpreferences.onsharedpreferencechangelistener
with...
@override protected void oncreate(bundle blah) { super.oncreate(blah); getpreferencemanager().setsharedpreferencesname(mywallpaper.shared_prefs_name); addpreferencesfromresource(r.xml.my_settings); getpreferencemanager().getsharedpreferences().registeronsharedpreferencechangelistener(this); }
this works advertised, appears rather crude. have noticed , feel of wallpaper's settings far more sophisticated, or nothing standard settings screens @ all, have dialog pops up, buttons on links websites. wondering how can achieve this. having fancier xml in my_settings.xml or perhaps android:settingsactivity=.. points isn't preferenceactivity, rather normal activity? or maybe code within oncreate needs different - i'm not sure should deviating examples.
looking @ developer.android.com says "this base class activity show hierarchy of preferences user." - sounds i'm restricted narrow range of things can do... that's why i'm torn between attempting push limits of can done inside preferenceactivity , making android:settingsactivity=
point isn't preferenceactivity @ (if that's allowed).
according this don't need have preferenceactivity, activity do.
preferenceactivity easy way have settings screen, if don't want use can create own.
Comments
Post a Comment