Skip to content

Commit

Permalink
Fixing ExposedDropdownMenu crash when device is rotated.
Browse files Browse the repository at this point in the history
Resolves #561

PiperOrigin-RevId: 268753819
  • Loading branch information
leticiarossi authored and dsn5ft committed Oct 3, 2019
1 parent 8555310 commit 0e410d4
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2073,9 +2073,15 @@ protected void onRestoreInstanceState(Parcelable state) {
super.onRestoreInstanceState(ss.getSuperState());
setError(ss.error);
if (ss.isEndIconChecked) {
endIconView.performClick();
// Skip animation
endIconView.jumpDrawablesToCurrentState();
// Make sure the end icon is not clicked before the application is visible.
endIconView.post(new Runnable() {
@Override
public void run() {
endIconView.performClick();
// Skip animation
endIconView.jumpDrawablesToCurrentState();
}
});
}
requestLayout();
}
Expand Down

0 comments on commit 0e410d4

Please sign in to comment.