Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16a43d2b authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Let the backing view cover the entire content area

With this CL, the backing view starts covering the content area
entirely.  This allows the IME to render its UI elements at an
arbitrary position on the screen.

Change-Id: I8b4173410931b776964dddf66de2fe247e51d9de
parent b8d76477
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1089,7 +1089,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
                - keyboardHeight;

        final LayoutParams params = mKeyPreviewBackingView.getLayoutParams();
        params.height = mSuggestionStripView.setMoreSuggestionsHeight(remainingHeight);
        mSuggestionStripView.setMoreSuggestionsHeight(remainingHeight);

        // Let the backing cover the remaining region entirely.
        params.height = remainingHeight;
        mKeyPreviewBackingView.setLayoutParams(params);
        return params.height;
    }
+2 −4
Original line number Diff line number Diff line
@@ -167,16 +167,14 @@ final class SuggestionStripLayoutHelper {
        return mMaxMoreSuggestionsRow * mMoreSuggestionsRowHeight + mMoreSuggestionsBottomGap;
    }

    public int setMoreSuggestionsHeight(final int remainingHeight) {
    public void setMoreSuggestionsHeight(final int remainingHeight) {
        final int currentHeight = getMoreSuggestionsHeight();
        if (currentHeight <= remainingHeight) {
            return currentHeight;
            return;
        }

        mMaxMoreSuggestionsRow = (remainingHeight - mMoreSuggestionsBottomGap)
                / mMoreSuggestionsRowHeight;
        final int newHeight = getMoreSuggestionsHeight();
        return newHeight;
    }

    private static Drawable getMoreSuggestionsHint(final Resources res, final float textSize,
+2 −2
Original line number Diff line number Diff line
@@ -219,8 +219,8 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
        mStripVisibilityGroup.showSuggestionsStrip();
    }

    public int setMoreSuggestionsHeight(final int remainingHeight) {
        return mLayoutHelper.setMoreSuggestionsHeight(remainingHeight);
    public void setMoreSuggestionsHeight(final int remainingHeight) {
        mLayoutHelper.setMoreSuggestionsHeight(remainingHeight);
    }

    public boolean isShowingAddToDictionaryHint() {