Merge "Remove redundant margin update, which caused infinite layout loop." into sc-dev am: a39cdd1273
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14805375 Change-Id: I29d07b8eb7d1c5952513476a3f2289691fbeb13d
This commit is contained in:
@@ -150,7 +150,6 @@ public class ConversationLayout extends FrameLayout
|
|||||||
private Icon mShortcutIcon;
|
private Icon mShortcutIcon;
|
||||||
private View mAppNameDivider;
|
private View mAppNameDivider;
|
||||||
private TouchDelegateComposite mTouchDelegate = new TouchDelegateComposite(this);
|
private TouchDelegateComposite mTouchDelegate = new TouchDelegateComposite(this);
|
||||||
private int mNotificationHeaderSeparatingMargin;
|
|
||||||
|
|
||||||
public ConversationLayout(@NonNull Context context) {
|
public ConversationLayout(@NonNull Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
@@ -284,8 +283,6 @@ public class ConversationLayout extends FrameLayout
|
|||||||
mAppName.setOnVisibilityChangedListener((visibility) -> {
|
mAppName.setOnVisibilityChangedListener((visibility) -> {
|
||||||
onAppNameVisibilityChanged();
|
onAppNameVisibilityChanged();
|
||||||
});
|
});
|
||||||
mNotificationHeaderSeparatingMargin = getResources().getDimensionPixelSize(
|
|
||||||
R.dimen.notification_header_separating_margin);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@RemotableViewMethod
|
@RemotableViewMethod
|
||||||
@@ -1031,7 +1028,6 @@ public class ConversationLayout extends FrameLayout
|
|||||||
}
|
}
|
||||||
mTouchDelegate.clear();
|
mTouchDelegate.clear();
|
||||||
if (mFeedbackIcon.getVisibility() == VISIBLE) {
|
if (mFeedbackIcon.getVisibility() == VISIBLE) {
|
||||||
updateFeedbackIconMargins();
|
|
||||||
float width = Math.max(mMinTouchSize, mFeedbackIcon.getWidth());
|
float width = Math.max(mMinTouchSize, mFeedbackIcon.getWidth());
|
||||||
float height = Math.max(mMinTouchSize, mFeedbackIcon.getHeight());
|
float height = Math.max(mMinTouchSize, mFeedbackIcon.getHeight());
|
||||||
final Rect feedbackTouchRect = new Rect();
|
final Rect feedbackTouchRect = new Rect();
|
||||||
@@ -1057,12 +1053,6 @@ public class ConversationLayout extends FrameLayout
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateFeedbackIconMargins() {
|
|
||||||
MarginLayoutParams lp = (MarginLayoutParams) mFeedbackIcon.getLayoutParams();
|
|
||||||
lp.setMarginStart(mNotificationHeaderSeparatingMargin);
|
|
||||||
mFeedbackIcon.setLayoutParams(lp);
|
|
||||||
}
|
|
||||||
|
|
||||||
public MessagingLinearLayout getMessagingLinearLayout() {
|
public MessagingLinearLayout getMessagingLinearLayout() {
|
||||||
return mMessagingLinearLayout;
|
return mMessagingLinearLayout;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user