主要是看代码有点没有头绪,不知道从哪里入手。最好能有些介绍性的东西帮助一下

解决方案 »

  1.   

    An input method is packaged like any other application or service. In the AndroidManifest.xml file, you declare the input method as a service, with the appropriate intent filter and any associated meta data:<manifest xmlns:android="http://schemas.android.com/apk/res/android"
            package="com.example.fastinput">    <application android:label="@string/app_label">        <!-- Declares the input method service -->
            <service android:name="FastInputIME"
                android:label="@string/fast_input_label"
                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>        <!-- Optional activities. A good idea to have some user settings. -->
            <activity android:name="FastInputIMESettings" android:label="@string/fast_input_settings">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN"/>
                </intent-filter>
            </activity> 
        </application>
    </manifest>