commit 05f6d7bdfe0a0d9a3e75ec4893f596fe1d8a5497
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Mon Jul 4 00:34:23 2022 +0200

    Progress with new UI.

diff --git a/src/main/java/org/distorted/dialogs/RubikDialogPlayPopup.java b/src/main/java/org/distorted/dialogs/RubikDialogPlayPopup.java
new file mode 100644
index 00000000..18290c35
--- /dev/null
+++ b/src/main/java/org/distorted/dialogs/RubikDialogPlayPopup.java
@@ -0,0 +1,88 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2022 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Magic Cube.                                                              //
+//                                                                                               //
+// Magic Cube is free software: you can redistribute it and/or modify                            //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Magic Cube is distributed in the hope that it will be useful,                                 //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+package org.distorted.dialogs;
+
+import android.app.Dialog;
+import android.os.Bundle;
+import android.util.DisplayMetrics;
+import android.util.TypedValue;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.Window;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.appcompat.app.AlertDialog;
+import androidx.appcompat.app.AppCompatDialogFragment;
+import androidx.fragment.app.FragmentActivity;
+
+import org.distorted.main.R;
+import org.distorted.main.RubikActivity;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+public class RubikDialogPlayPopup extends AppCompatDialogFragment
+  {
+  @NonNull
+  @Override
+  public Dialog onCreateDialog(Bundle savedInstanceState)
+    {
+    Bundle args = getArguments();
+    int objectOrdinal;
+
+    try
+      {
+      objectOrdinal = args.getInt("ordinal");
+      }
+    catch(Exception e)
+      {
+      objectOrdinal = 0;
+      }
+
+    FragmentActivity act = getActivity();
+    LayoutInflater inflater = act.getLayoutInflater();
+    AlertDialog.Builder builder = new AlertDialog.Builder(act);
+
+    DisplayMetrics displaymetrics = new DisplayMetrics();
+    act.getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
+    final float titleSize= displaymetrics.widthPixels * RubikActivity.MENU_BIG_TEXT_SIZE;
+
+    TextView tv = (TextView) inflater.inflate(R.layout.dialog_title, null);
+    tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, titleSize);
+    tv.setText(R.string.privacy_policy);
+    builder.setCustomTitle(tv);
+
+    final View view = inflater.inflate(R.layout.popup_play_new_ui, null);
+
+    builder.setCancelable(true);
+    builder.setView(view);
+
+    final Dialog dialog = builder.create();
+   // dialog.setCanceledOnTouchOutside(false);
+    Window window = dialog.getWindow();
+
+    if( window!=null )
+      {
+      window.getDecorView().setSystemUiVisibility(RubikActivity.FLAGS);
+      }
+
+    return dialog;
+    }
+  }
diff --git a/src/main/java/org/distorted/objects/MainEntry.java b/src/main/java/org/distorted/objects/MainEntry.java
index c221ecd3..d495880b 100644
--- a/src/main/java/org/distorted/objects/MainEntry.java
+++ b/src/main/java/org/distorted/objects/MainEntry.java
@@ -21,8 +21,11 @@ package org.distorted.objects;
 
 import android.app.Activity;
 import android.graphics.drawable.Drawable;
+import android.os.Bundle;
 import android.widget.ImageButton;
 
+import org.distorted.dialogs.RubikDialogPlayPopup;
+import org.distorted.dialogs.RubikDialogScores;
 import org.distorted.main.RubikActivity;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -93,7 +96,11 @@ public class MainEntry
       {
       if( mObject!=null )
         {
-        android.util.Log.e("D", "clicked on "+ mObject.getLowerName());
+        Bundle bundle = new Bundle();
+        bundle.putInt("ordinal", 0 );
+        RubikDialogPlayPopup diag = new RubikDialogPlayPopup();
+        diag.setArguments(bundle);
+        diag.show(act.getSupportFragmentManager(), null);
         }
       else android.util.Log.e("D", "MainListEntry: object null!!");
       }
diff --git a/src/main/res/layout/popup_play_new_ui.xml b/src/main/res/layout/popup_play_new_ui.xml
new file mode 100644
index 00000000..76ffb1c7
--- /dev/null
+++ b/src/main/res/layout/popup_play_new_ui.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+     android:layout_width="wrap_content"
+     android:layout_height="wrap_content"
+     android:orientation="horizontal"
+     android:background="@color/dark_grey"
+     android:baselineAligned="false"
+     android:padding="5dp">
+
+     <LinearLayout
+          android:id="@+id/configLayout"
+          android:layout_width="0dp"
+          android:layout_height="wrap_content"
+          android:layout_weight="1"
+          android:orientation="vertical">
+
+          <Button
+             android:id="@+id/buttonConfig"
+             android:layout_width="wrap_content"
+             android:layout_height="wrap_content"/>
+          <Button
+             android:id="@+id/buttonTutorials"
+             android:layout_width="wrap_content"
+             android:layout_height="wrap_content"/>
+          <Button
+             android:id="@+id/buttonScores"
+             android:layout_width="wrap_content"
+             android:layout_height="wrap_content"/>
+          <Button
+             android:id="@+id/buttonPatterns"
+             android:layout_width="wrap_content"
+             android:layout_height="wrap_content"/>
+          <Button
+             android:id="@+id/buttonSolver"
+             android:layout_width="wrap_content"
+             android:layout_height="wrap_content"/>
+
+     </LinearLayout>
+
+     <ScrollView
+          android:layout_width="0dp"
+          android:layout_height="wrap_content"
+          android:layout_weight="1">
+
+          <LinearLayout
+              android:id="@+id/playLayout"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:orientation="vertical">
+
+              <Button
+                android:id="@+id/buttonFreePlay"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"/>
+              <Button
+                android:id="@+id/buttonLevel1"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"/>
+              <Button
+                android:id="@+id/buttonLevel2"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"/>
+              <Button
+                android:id="@+id/buttonLevel3"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"/>
+              <Button
+                android:id="@+id/buttonLevel4"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"/>
+              <Button
+                android:id="@+id/buttonLevel5"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"/>
+              <Button
+                android:id="@+id/buttonLevel6"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"/>
+              <Button
+                android:id="@+id/buttonLevelFullScramble"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"/>
+
+          </LinearLayout>
+     </ScrollView>
+
+</LinearLayout>
\ No newline at end of file
