1
我已經移植了ICS鍵盤,它運行良好。但是我在LDPI/MDPI設備中遇到了問題。最後一行被切斷。鍵盤不在屏幕上
鏈接到圖片 http://img406.imageshack.us/img406/6343/screenshot1321903105942.png
的keyobard視圖的定義是在下面的XML。
InputView擴展的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>
謝謝