commit c1df05faeb18c2ed759d1622747f7181611715c1
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Mon Jul 11 16:24:35 2022 +0200

    - move the 'object' popup to the botton right
    - move the 'solve' button to the upper left
    - movee the 'scramble' button to the upper right (its new FastScrambleEffect still not implemented fully)

diff --git a/src/main/java/org/distorted/screens/RubikScreenPlay.java b/src/main/java/org/distorted/screens/RubikScreenPlay.java
index a08ea988..ffb347f2 100644
--- a/src/main/java/org/distorted/screens/RubikScreenPlay.java
+++ b/src/main/java/org/distorted/screens/RubikScreenPlay.java
@@ -24,8 +24,6 @@ import java.lang.ref.WeakReference;
 import android.app.Activity;
 import android.content.Context;
 import android.content.SharedPreferences;
-import android.content.res.Resources;
-import android.graphics.drawable.BitmapDrawable;
 import android.os.Build;
 import android.os.Bundle;
 import android.util.TypedValue;
@@ -89,7 +87,6 @@ public class RubikScreenPlay extends RubikScreenBase implements RubikNetwork.Upd
   private int mColCount, mRowCount, mMaxRowCount;
   private int mUpperBarHeight;
   private boolean mShouldReactToEndOfScrambling;
-  private int mBottomHeight;
   private float mScreenWidth;
   private WeakReference<RubikActivity> mWeakAct;
   private String mObjectsPlayed;
@@ -121,18 +118,16 @@ public class RubikScreenPlay extends RubikScreenBase implements RubikNetwork.Upd
     LinearLayout layoutTop = act.findViewById(R.id.upperBar);
     layoutTop.removeAllViews();
 
-    setupObjectButton(act,mScreenWidth);
-    layoutTop.addView(mObjButton);
-
+    setupSolveButton(act);
+    layoutTop.addView(mSolveButton);
     setupMenuButton(act,mScreenWidth);
     layoutTop.addView(mMenuButton);
-
-    setupPlayButton(act,mScreenWidth);
-    layoutTop.addView(mPlayButton);
-
-    setupSolveButton(act);
     setupScrambleButton(act);
-    createBottomPane(act,mSolveButton,mScrambleButton);
+    layoutTop.addView(mScrambleButton);
+
+    // BOTTOM /////////////////////////
+    setupObjectButton(act,mScreenWidth);
+    createBottomPane(act,mObjButton,null);
     }
 
 //////////////////////////////////////////////////////////////////////////////////////////////////
@@ -140,7 +135,6 @@ public class RubikScreenPlay extends RubikScreenBase implements RubikNetwork.Upd
   private void setupObjectButton(final RubikActivity act, final float width)
     {
     final int margin  = (int)(width*RubikActivity.SMALL_MARGIN);
-    final int lMargin = (int)(width*RubikActivity.LARGE_MARGIN);
     final int icon = RubikActivity.getDrawable(R.drawable.ui_small_cube_menu,R.drawable.ui_medium_cube_menu, R.drawable.ui_big_cube_menu, R.drawable.ui_huge_cube_menu);
     LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,1.0f);
     mObjButton = new TransparentImageButton(act, icon, TransparentImageButton.GRAVITY_MIDDLE, params);
@@ -162,7 +156,7 @@ public class RubikScreenPlay extends RubikScreenBase implements RubikNetwork.Upd
           int rowCount = Math.min(mMaxRowCount,mRowCount);
           View popupView = mObjectPopup.getContentView();
           popupView.setSystemUiVisibility(RubikActivity.FLAGS);
-          displayPopup(act,view,mObjectPopup,mObjectSize*mColCount,mObjectSize*rowCount+mBottomHeight+2*lMargin+5*margin,margin,margin);
+          displayPopup(act,view,mObjectPopup,mObjectSize*mColCount,mObjectSize*rowCount+5*margin,margin,margin);
           }
         }
       });
@@ -340,10 +334,6 @@ public class RubikScreenPlay extends RubikScreenBase implements RubikNetwork.Upd
     buttonDow.setImageResource(iconD);
     buttonInf.setImageResource(iconI);
 
-    Resources res = act.getResources();
-    BitmapDrawable bd = (BitmapDrawable)res.getDrawable(iconI);
-    mBottomHeight = bd.getIntrinsicHeight();
-
     TypedValue outValue = new TypedValue();
     act.getTheme().resolveAttribute(android.R.attr.selectableItemBackgroundBorderless, outValue, true);
     buttonTut.setBackgroundResource(outValue.resourceId);
@@ -390,6 +380,47 @@ public class RubikScreenPlay extends RubikScreenBase implements RubikNetwork.Upd
     network.signUpForUpdates(this);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  void setupSolveButton(final RubikActivity act)
+    {
+    int icon = RubikActivity.getDrawable(R.drawable.ui_small_cube_solve,R.drawable.ui_medium_cube_solve, R.drawable.ui_big_cube_solve, R.drawable.ui_huge_cube_solve);
+    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,1.0f);
+    mSolveButton = new TransparentImageButton(act, icon, TransparentImageButton.GRAVITY_MIDDLE,params);
+
+    mSolveButton.setOnClickListener( new View.OnClickListener()
+      {
+      @Override
+      public void onClick(View v)
+        {
+        act.getControl().solveObject();
+        mMovesController.clearMoves(act);
+        }
+      });
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private void setupScrambleButton(final RubikActivity act)
+    {
+    int icon = RubikActivity.getDrawable(R.drawable.ui_small_cube_scramble,R.drawable.ui_medium_cube_scramble, R.drawable.ui_big_cube_scramble, R.drawable.ui_huge_cube_scramble);
+    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,1.0f);
+    mScrambleButton = new TransparentImageButton(act, icon, TransparentImageButton.GRAVITY_MIDDLE, params);
+
+    mScrambleButton.setOnClickListener( new View.OnClickListener()
+      {
+      @Override
+      public void onClick(View v)
+        {
+        int currObject = RubikObjectList.getCurrObject();
+        RubikObject object = RubikObjectList.getObject(currObject);
+        int numScrambles = object==null ? 0 : object.getNumScramble();
+        mShouldReactToEndOfScrambling = false;
+        act.getControl().fastScrambleObject(numScrambles);
+        }
+      });
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   private void setupMenuWindow(final RubikActivity act, final float width)
@@ -476,47 +507,6 @@ public class RubikScreenPlay extends RubikScreenBase implements RubikNetwork.Upd
       }
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  void setupSolveButton(final RubikActivity act)
-    {
-    int icon = RubikActivity.getDrawable(R.drawable.ui_small_cube_solve_new,R.drawable.ui_medium_cube_solve_new, R.drawable.ui_big_cube_solve_new, R.drawable.ui_huge_cube_solve_new);
-    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,1.0f);
-    mSolveButton = new TransparentImageButton(act, icon, TransparentImageButton.GRAVITY_END,params);
-
-    mSolveButton.setOnClickListener( new View.OnClickListener()
-      {
-      @Override
-      public void onClick(View v)
-        {
-        act.getControl().solveObject();
-        mMovesController.clearMoves(act);
-        }
-      });
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void setupScrambleButton(final RubikActivity act)
-    {
-    int icon = RubikActivity.getDrawable(R.drawable.ui_small_cube_scramble_new,R.drawable.ui_medium_cube_scramble_new, R.drawable.ui_big_cube_scramble_new, R.drawable.ui_huge_cube_scramble_new);
-    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,1.0f);
-    mScrambleButton = new TransparentImageButton(act, icon, TransparentImageButton.GRAVITY_START, params);
-
-    mScrambleButton.setOnClickListener( new View.OnClickListener()
-      {
-      @Override
-      public void onClick(View v)
-        {
-        int currObject = RubikObjectList.getCurrObject();
-        RubikObject object = RubikObjectList.getObject(currObject);
-        int numScrambles = object==null ? 0 : object.getNumScramble();
-        mShouldReactToEndOfScrambling = false;
-        act.getControl().scrambleObject(numScrambles);
-        }
-      });
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // This is necessary! Otherwise the ObjectPopup will not be re-created next time and we will still
 // hold a reference to the old instance of the RubikActivity class (because setupObjectWindow is not
diff --git a/src/main/res/drawable-nodpi/ui_big_cube_menu.png b/src/main/res/drawable-nodpi/ui_big_cube_menu.png
index 05ca8333..bac36ba9 100644
Binary files a/src/main/res/drawable-nodpi/ui_big_cube_menu.png and b/src/main/res/drawable-nodpi/ui_big_cube_menu.png differ
diff --git a/src/main/res/drawable-nodpi/ui_huge_cube_menu.png b/src/main/res/drawable-nodpi/ui_huge_cube_menu.png
index 24df9792..7770270f 100644
Binary files a/src/main/res/drawable-nodpi/ui_huge_cube_menu.png and b/src/main/res/drawable-nodpi/ui_huge_cube_menu.png differ
diff --git a/src/main/res/drawable-nodpi/ui_medium_cube_menu.png b/src/main/res/drawable-nodpi/ui_medium_cube_menu.png
index 8da78951..4693144c 100644
Binary files a/src/main/res/drawable-nodpi/ui_medium_cube_menu.png and b/src/main/res/drawable-nodpi/ui_medium_cube_menu.png differ
diff --git a/src/main/res/drawable-nodpi/ui_small_cube_menu.png b/src/main/res/drawable-nodpi/ui_small_cube_menu.png
index f8a97b0c..28862ece 100644
Binary files a/src/main/res/drawable-nodpi/ui_small_cube_menu.png and b/src/main/res/drawable-nodpi/ui_small_cube_menu.png differ
