Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/196.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 键盘在屏幕外_Android_Android Layout - Fatal编程技术网

Android 键盘在屏幕外

Android 键盘在屏幕外,android,android-layout,Android,Android Layout,我已经移植了ICS键盘,它工作得很好。但我在LDPI/MDPI设备中面临一个问题。最后一排被切断了 链接到图片 keyobard视图的定义在以下XML中 InputView扩展了线性布局 <com.android.inputmethod.latin.InputView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:latin="http://schemas.android.com/apk/

我已经移植了ICS键盘,它工作得很好。但我在LDPI/MDPI设备中面临一个问题。最后一排被切断了

链接到图片

keyobard视图的定义在以下XML中

InputView扩展了线性布局

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


谢谢你有同样的问题。为了解决这个问题,我减少了

<dimen name="key_preview_backing_height">240dip</dimen>
240dip
从240到200,以及

<integer name="max_more_suggestions_row">6</integer>
6
从6到5,这不会影响键盘行为,但修复了相同的问题。您可以通过将LatinImeLogger.java中的sVISUALDEBUG设置为true来打开可视化调试,并以透明的红色显示按键预览背景所占用的区域

我还有一个问题,你不能点击这个视图后面的任何东西