2011-11-23 137 views
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> 

謝謝

回答

3

有同樣的問題。爲了解決這個予還原

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

從240到200和

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

6至5,其不影響鍵盤的行爲,但固定的同樣的問題。您可以通過將LatinImeLogger.java中的sVISUALDEBUG設置爲true來打開可視化調試,並以透明紅色查看key_preview_backing佔用的區域。

我有另一個問題,當你不能點擊這個視圖背後的任何東西。