Клавиатура вне экрана - PullRequest
1 голос
/ 23 ноября 2011

Я портировал клавиатуру ICS, и она хорошо работает.Но я сталкиваюсь с проблемой в устройствах LDPI / MDPI.последняя строка обрезается.

ссылка на изображение http://img406.imageshack.us/img406/6343/screenshot1321903105942.png

Определение представления keyobard содержится в следующем XML.

InputView extends LinearLayout

<com.android.inputmethod.latin.InputView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:latin="http://schemas.android.com/apk/res/inputmethod.latin.ported"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
>
    <View
        android:id="@+id/key_preview_backing"
        android:layout_width="match_parent"
        android:layout_height="@dimen/key_preview_backing_height" />

    <!-- On tablets, the suggestions strip is centered with horizontal paddings on both sides
         because width of the landscape mode is too long for the suggestions strip. This
         LinearLayout is required to hold the paddings. -->
    <LinearLayout
        android:id="@+id/suggestions_container"
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
    >
        <View
            android:layout_width="@dimen/suggestions_strip_padding"
            android:layout_height="@dimen/suggestions_strip_height"
            style="?attr/suggestionsStripBackgroundStyle" />
        <com.android.inputmethod.latin.SuggestionsView
            android:id="@+id/suggestions_view"
            android:layout_weight="1.0"
            android:layout_width="0dp"
            android:layout_height="@dimen/suggestions_strip_height"
            android:gravity="center_vertical"
            style="?attr/suggestionsViewStyle" />
        <View
            android:layout_width="@dimen/suggestions_strip_padding"
            android:layout_height="@dimen/suggestions_strip_height"
            style="?attr/suggestionsStripBackgroundStyle" />
    </LinearLayout>

    <com.android.inputmethod.keyboard.LatinKeyboardView
        android:id="@+id/keyboard_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
</com.android.inputmethod.latin.InputView>

Спасибо

1 Ответ

3 голосов
/ 12 октября 2012

Была такая же проблема. Чтобы решить эту проблему я уменьшил

<dimen name="key_preview_backing_height">240dip</dimen>

от 240 до 200 и

<integer name="max_more_suggestions_row">6</integer>

от 6 до 5, которые не влияли на поведение клавиатуры, но исправили ту же проблему. Вы можете включить визуальную отладку, установив для sVISUALDEBUG в LatinImeLogger.java значение true и увидеть область, занятую key_preview_backing, в прозрачном красном.

У меня есть другая проблема, когда вы не можете щелкнуть что-либо за этим видом.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...