我正在创建自己的键盘,它有Settings Activity
。现在我希望设置应该以默认keyboard
设置显示。
找到了一些设置活动应该扩展PreferenceActivity
的地方,但仍然没有运气。
Manifest.xml
任何帮助将不胜感激。
答案 0 :(得分:2)
自己管理......
在method.xml中设置标志android:settingsActivity="your settings activity"
<?xml version="1.0" encoding="utf-8"?>
<!-- The attributes in this XML file provide configuration information -->
<!-- for the Search Manager. -->
<input-method xmlns:android="http://schemas.android.com/apk/res/android"
android:settingsActivity="com.menny.android.anysoftkeyboard.MainSettings"/>
答案 1 :(得分:0)
这是一个清单文件,可以帮助你解决这个问题。
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.pocketworkstation.pckeyboard" android:versionName="v1.20" android:versionCode="1020">
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
<uses-permission android:name="android.permission.WRITE_USER_DICTIONARY" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-feature android:name="android.hardware.microphone" android:required="false" />
<uses-feature android:name="android.hardware.faketouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-sdk android:targetSdkVersion="11" android:minSdkVersion="8"></uses-sdk>
<application android:label="@string/english_ime_name"
android:backupAgent="LatinIMEBackupAgent"
android:hardwareAccelerated="true"
android:killAfterRestore="false" android:icon="@drawable/icon">
<service android:name="LatinIME"
android:label="@string/english_ime_name"
android:permission="android.permission.BIND_INPUT_METHOD">
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
<meta-data android:name="android.view.im" android:resource="@xml/method" />
</service>
<activity android:name="Main" android:label="Hacker's Keyboard">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="LatinIMESettings" android:label="@string/english_ime_settings">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>
<activity android:name="LatinIMEDebugSettings" android:label="@string/english_ime_debug_settings">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>
<activity android:name="InputLanguageSelection"
android:label="@string/language_selection_title">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="org.pocketworkstation.pckeyboard.INPUT_LANGUAGE_SELECTION"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>