Remove unused argument in SuggestionStripLayoutHelper
Bug: 13461039 Change-Id: I3f6227bd56fb81021aaacf0e901eab8a9e91d4a1main
parent
1aac375809
commit
14e908c348
|
@ -507,7 +507,7 @@ final class SuggestionStripLayoutHelper {
|
||||||
hintView, 1.0f - mCenterSuggestionWeight, ViewGroup.LayoutParams.MATCH_PARENT);
|
hintView, 1.0f - mCenterSuggestionWeight, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void layoutImportantNotice(final View importantNoticeStrip, final int stripWidth,
|
public void layoutImportantNotice(final View importantNoticeStrip,
|
||||||
final String importantNoticeTitle) {
|
final String importantNoticeTitle) {
|
||||||
final TextView titleView = (TextView)importantNoticeStrip.findViewById(
|
final TextView titleView = (TextView)importantNoticeStrip.findViewById(
|
||||||
R.id.important_notice_title);
|
R.id.important_notice_title);
|
||||||
|
@ -516,8 +516,7 @@ final class SuggestionStripLayoutHelper {
|
||||||
titleView.setTextColor(mColorAutoCorrect);
|
titleView.setTextColor(mColorAutoCorrect);
|
||||||
titleView.setText(importantNoticeTitle);
|
titleView.setText(importantNoticeTitle);
|
||||||
titleView.setTextScaleX(1.0f); // Reset textScaleX.
|
titleView.setTextScaleX(1.0f); // Reset textScaleX.
|
||||||
final float titleScaleX = getTextScaleX(
|
final float titleScaleX = getTextScaleX(importantNoticeTitle, width, titleView.getPaint());
|
||||||
importantNoticeTitle, width, titleView.getPaint());
|
|
||||||
titleView.setTextScaleX(titleScaleX);
|
titleView.setTextScaleX(titleScaleX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -232,8 +232,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
||||||
if (!ImportantNoticeUtils.shouldShowImportantNotice(getContext(), inputAttributes)) {
|
if (!ImportantNoticeUtils.shouldShowImportantNotice(getContext(), inputAttributes)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final int width = getWidth();
|
if (getWidth() <= 0) {
|
||||||
if (width <= 0) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final String importantNoticeTitle = ImportantNoticeUtils.getNextImportantNoticeTitle(
|
final String importantNoticeTitle = ImportantNoticeUtils.getNextImportantNoticeTitle(
|
||||||
|
@ -241,7 +240,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
||||||
if (TextUtils.isEmpty(importantNoticeTitle)) {
|
if (TextUtils.isEmpty(importantNoticeTitle)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
mLayoutHelper.layoutImportantNotice(mImportantNoticeStrip, width, importantNoticeTitle);
|
mLayoutHelper.layoutImportantNotice(mImportantNoticeStrip, importantNoticeTitle);
|
||||||
mStripVisibilityGroup.showImportantNoticeStrip();
|
mStripVisibilityGroup.showImportantNoticeStrip();
|
||||||
mImportantNoticeStrip.setOnClickListener(this);
|
mImportantNoticeStrip.setOnClickListener(this);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue