开发者

How to add preference of Custom Input method to Android Settings app?

开发者 https://www.devze.com 2023-01-12 20:00 出处:网络
Recently I\'ve started to develop Android Soft Keyboard and got some problem with preferences. How to add a preferencesto Android setting app? I\'ve searched almost all the source code of AnySoftKeyb

Recently I've started to develop Android Soft Keyboard and got some problem with preferences.

How to add a preferences to Android setting app? I've searched almost all the source code of AnySoftKeyboard, but haven't found anything what would add them to Settings app.

I'm placing a link to show what I meant: http://cod开发者_JAVA百科e.google.com/p/softkeyboard/wiki/Settings

(first picture from begin)

Thank you

P.S. Sorry for my bad english..


I've found it myself:

in XML of input method you need to put android:settingsActivity tag with link to your PreferenceActivity class: Example


Here is an example: set android:settingsActivity in your input-method xml declaration.

<?xml version="1.0" encoding="utf-8"?>
<input-method
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:settingsActivity="com.justes.yogabook.holo_keyboard.wrapper.SettingsActivity">
    <subtype
        android:label="@string/yogabook_holo_keyboard_subtype_label"
        android:imeSubtypeLocale="en_US"
        android:imeSubtypeMode="keyboard" />
</input-method>
0

精彩评论

暂无评论...
验证码 换一张
取 消