am 16a43d2b: Let the backing view cover the entire content area

* commit '16a43d2bd9c5d80f8e50f5a7682b657ee10621e1':
  Let the backing view cover the entire content area
main
Yohei Yukawa 2014-08-16 13:57:05 +00:00 committed by Android Git Automerger
commit 18ac3c8afd
3 changed files with 8 additions and 7 deletions

View File

@ -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;
}

View File

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

View File

@ -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() {