Java “实时壁纸设置”按钮不工作
好的,这是我正在开发的第一个应用程序,一切正常,直到我想在我的实时壁纸中添加一个设置按钮,问题是,当我简单地点击“设置”时,它会显示“实时壁纸选取器已停止”的消息。这是我的密码 安卓清单Java “实时壁纸设置”按钮不工作,java,eclipse,settings,live-wallpaper,Java,Eclipse,Settings,Live Wallpaper,好的,这是我正在开发的第一个应用程序,一切正常,直到我想在我的实时壁纸中添加一个设置按钮,问题是,当我简单地点击“设置”时,它会显示“实时壁纸选取器已停止”的消息。这是我的密码 安卓清单 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.Live.zaki" android:versionCode="1" android:versionName="1.0" &g
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.Live.zaki"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="16" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.ui.MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/FullscreenTheme" >
/>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
android:label="@string/appName"
android:icon="@drawable/icon">
<service
android:name="com.Live.zaki.CustomWallpaper"
android:label="@string/appName"
android:permission="android.permission.BIND_WALLPAPER" >
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data
android:name="android.service.wallpaper"
android:resource="@xml/wallpaper" />
</service>
<activity
android:name="com.example.ui.SecondActivity"
android:label="Home" >
</activity>
<activity
android:name=".PrefsActivity"
android:theme="@android:style/Theme.Black.NoTitleBar" >
</activity>
</application>
</manifest>
我还没有在我的主LiveWallper.java代码上配置任何偏好逻辑,我只是希望设置菜单弹出“我的情况下有两个复选框”。这可能吗??
如果有人能帮助我,那太好了!!小贴士,教程,什么都行!!
这是我的申请结果,没有设置
在设置活动中添加导出标志并将其设置为true安卓:exported=“true”
android:settingsActivity="yourPackagename.PrefsActivity"
<activity
android:exported="true"
android:name=".PrefsActivity"
android:theme="@android:style/Theme.Black.NoTitleBar">
现在很好,兄弟,非常感谢你。。。多亏了你,现在回到正轨!非常感谢^^我的荣幸,兄弟。。这是我的职责
public class PrefsActivity extends PreferenceActivity{@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(com.Live.zaki.R.xml.prefs);
}
}
android:settingsActivity="yourPackagename.PrefsActivity"
<activity
android:exported="true"
android:name=".PrefsActivity"
android:theme="@android:style/Theme.Black.NoTitleBar">