Do not set guts visibility to transient state
We can't really copy the guts visibility during reinflation because we might be in the middle of an animation. Let's rely on a more stable property to determine the visibility. Test: expand guts, close guts Test: expand guts, switch dark mode Test: expand guts, switch dark mode, expand guts again Test: change font size, expand and collapse guts Fixes: 135553192 Change-Id: I76f02bbd8f071c94e9c2c777e1d1c1de995ea37b
This commit is contained in:
@@ -1209,12 +1209,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
mChildrenContainer.reInflateViews(mExpandClickListener, mEntry.notification);
|
||||
}
|
||||
if (mGuts != null) {
|
||||
View oldGuts = mGuts;
|
||||
NotificationGuts oldGuts = mGuts;
|
||||
int index = indexOfChild(oldGuts);
|
||||
removeView(oldGuts);
|
||||
mGuts = (NotificationGuts) LayoutInflater.from(mContext).inflate(
|
||||
R.layout.notification_guts, this, false);
|
||||
mGuts.setVisibility(oldGuts.getVisibility());
|
||||
mGuts.setVisibility(oldGuts.isExposed() ? VISIBLE : GONE);
|
||||
addView(mGuts, index);
|
||||
}
|
||||
View oldMenu = mMenuRow == null ? null : mMenuRow.getMenuView();
|
||||
|
||||
Reference in New Issue
Block a user