Skip to content

Commit

Permalink
reset the scale when reusing a key preview view (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
wittmane authored Oct 23, 2020
1 parent 9f40c7c commit 95aba4f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ public KeyPreviewChoreographer(final KeyPreviewDrawParams params) {
public KeyPreviewView getKeyPreviewView(final Key key, final ViewGroup placerView) {
KeyPreviewView keyPreviewView = mShowingKeyPreviewViews.remove(key);
if (keyPreviewView != null) {
keyPreviewView.setScaleX(1);
keyPreviewView.setScaleY(1);
return keyPreviewView;
}
keyPreviewView = mFreeKeyPreviewViews.poll();
if (keyPreviewView != null) {
keyPreviewView.setScaleX(1);
keyPreviewView.setScaleY(1);
return keyPreviewView;
}
final Context context = placerView.getContext();
Expand Down

0 comments on commit 95aba4f

Please sign in to comment.