My PreferenceActivity does not show up, even though it is in my manifest file
Posted
by Charlie
on Stack Overflow
See other posts from Stack Overflow
or by Charlie
Published on 2010-04-10T16:49:12Z
Indexed on
2010/04/10
16:53 UTC
Read the original article
Hit count: 417
So I am modifying the Cube live wallpaper example. I have a class that extends PreferenceActivity, and I added the Activity in my manifest file. I keep getting ActivityNotFoundExceptions.
Here is my preference class :
public class MySettingsActivity extends PreferenceActivity
implements SharedPreferences.OnSharedPreferenceChangeListener {
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
getPreferenceManager().setSharedPreferencesName(
ParticleCandy.SHARED_PREFS_NAME);
addPreferencesFromResource(R.xml.settings);
getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(
this);
}
@Override
protected void onResume() {
super.onResume();
}
@Override
protected void onDestroy() {
getPreferenceManager().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(
this);
super.onDestroy();
}
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
String key) {
}
}
And here is my manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pixel.theory.wallpapers.mywallpaper"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<service
android:label="@string/app_name"
android:name="MyWallpaper"
android:permission="android.permission.BIND_WALLPAPER" >
<intent-filter>
<action
android:name="android.service.wallpaper.WallpaperService">
</action>
</application>
<uses-sdk android:minSdkVersion="7" />
<uses-feature android:name="android.software.live_wallpaper" />
</manifest>
Any ideas why my preferences activity doesn't get read in from the manifest?
© Stack Overflow or respective owner