commit 9439f455bb7ad7c7535641efd78c4331c20b248c
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Wed Apr 15 16:18:57 2020 +0100

    Fix sa bug which showed itself only on Android API 21 and 22.

diff --git a/src/main/java/org/distorted/states/RubikStatePlay.java b/src/main/java/org/distorted/states/RubikStatePlay.java
index 739006d9..ed470183 100644
--- a/src/main/java/org/distorted/states/RubikStatePlay.java
+++ b/src/main/java/org/distorted/states/RubikStatePlay.java
@@ -22,6 +22,7 @@ package org.distorted.states;
 import android.content.Context;
 import android.content.SharedPreferences;
 import android.graphics.drawable.BitmapDrawable;
+import android.os.Build;
 import android.util.DisplayMetrics;
 import android.view.Gravity;
 import android.view.LayoutInflater;
@@ -122,9 +123,15 @@ public class RubikStatePlay extends RubikStateAbstract implements AdapterView.On
           mLayout.setOrientation(vertical ? LinearLayout.VERTICAL:LinearLayout.HORIZONTAL);
 
           int width  = view.getWidth();
+          int layhei = mLayoutWidth * (vertical? total:1);
           int laywid = mLayoutWidth * (vertical? 1:total);
 
           mPopup.showAsDropDown(view, (width-laywid)/2, 0, Gravity.LEFT);
+
+          if( android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1 )
+            {
+            mPopup.update(view, laywid, layhei);
+            }
           }
         }
       });
