1

我正在努力创建自己的键盘,它有Settings Activity. 现在我希望设置应该显示在默认keyboard设置中。找到了一些设置活动应该扩展的地方,PreferenceActivity但仍然没有运气。

里面有没有flagManifest.xml

任何帮助将不胜感激。

4

2 回答 2

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"/>

[在这里找到https://stackoverflow.com/a/3528859/730600 1

于 2013-02-26T06:43:51.403 回答
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>
于 2013-02-25T08:50:32.190 回答