commit 309a4e6c7fc1acc3729b93b62fabd2f576e6a0ca
Author: leszek <leszek@koltunski.pl>
Date:   Fri Nov 14 15:38:43 2025 +0100

    Progress remembering solves.

diff --git a/src/main/java/org/distorted/main/MainSolvesPopup.java b/src/main/java/org/distorted/main/MainSolvesPopup.java
index 80c68e10..a889f1fa 100644
--- a/src/main/java/org/distorted/main/MainSolvesPopup.java
+++ b/src/main/java/org/distorted/main/MainSolvesPopup.java
@@ -10,8 +10,6 @@
 package org.distorted.main;
 
 import android.content.Context;
-import android.content.res.Resources;
-import android.graphics.drawable.ColorDrawable;
 import android.util.TypedValue;
 import android.view.Gravity;
 import android.view.LayoutInflater;
@@ -26,6 +24,10 @@ import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 public class MainSolvesPopup
@@ -48,15 +50,10 @@ public class MainSolvesPopup
     mPadding  = (int)(mHeight*0.01f);
 
     LayoutInflater layoutInflater = (LayoutInflater)act.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-    final View layout = layoutInflater.inflate(R.layout.dialog_scrollable_panes, null);
+    final View layout = layoutInflater.inflate(R.layout.dialog_scrollable_solves, null);
     mPopup = new PopupWindow(act);
     mPopup.setContentView(layout);
     mPopup.setFocusable(true);
-
-    Resources res = act.getResources();
-    int l = res.getColor(act.getLightTrans());
-    mPopup.setBackgroundDrawable(new ColorDrawable(l));
-
     mLayout= layout.findViewById(R.id.dialog_scrollable_main_layout);
 
     fillLayout(act,array);
@@ -74,7 +71,6 @@ public class MainSolvesPopup
     LinearLayout.LayoutParams pL = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, mSize );
     pL.setMargins(mMargin, mMargin, mMargin, mMargin);
     LinearLayout.LayoutParams pT = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, textH );
-    LinearLayout.LayoutParams pB = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, buttH );
 
     int numSolves = array.length();
 
@@ -84,7 +80,7 @@ public class MainSolvesPopup
         {
         JSONObject object = array.getJSONObject(s);
         long time = object.getLong("time");
-        View pane = createOldPane(act, time, pL, pT, pB);
+        View pane = createOldPane(act, time, pL, pT);
         mLayout.addView(pane);
         }
       }
@@ -93,28 +89,51 @@ public class MainSolvesPopup
       android.util.Log.e("D", "fillLayout: JSON error: "+jex.getMessage());
       }
 
-    View pane = createNewPane(act, pL,pT,pB);
+    View pane = createNewPane(act, pL, pT);
     mLayout.addView(pane);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private View createOldPane(MainActivity act, long time, LinearLayout.LayoutParams pView, LinearLayout.LayoutParams pText, LinearLayout.LayoutParams pButt)
+  private String convertToDate(Date date)
+    {
+    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MMM-dd", Locale.getDefault());
+    return sdf.format(date);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private String convertToTime(Date date)
+    {
+    SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss", Locale.getDefault());
+    return sdf.format(date);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private View createOldPane(MainActivity act, long time, LinearLayout.LayoutParams pView, LinearLayout.LayoutParams pText)
     {
     View view = act.getLayoutInflater().inflate(R.layout.dialog_solve_old_pane, null);
     TextView title = view.findViewById(R.id.solves_pane_title);
+    TextView dt = view.findViewById(R.id.solves_pane_date);
     TextView tm = view.findViewById(R.id.solves_pane_time);
-    tm.setText(Long.toString(time));
+
+    Date date = new Date(time);
+    dt.setText(convertToDate(date));
+    tm.setText(convertToTime(date));
 
     view.setLayoutParams(pView);
     view.setPadding(mPadding,mPadding,mPadding,mPadding);
 
     title.setTextSize(TypedValue.COMPLEX_UNIT_PX, mFontSize);
+    dt.setTextSize(TypedValue.COMPLEX_UNIT_PX, mFontSize);
     tm.setTextSize(TypedValue.COMPLEX_UNIT_PX, mFontSize);
     title.setLayoutParams(pText);
+    dt.setLayoutParams(pText);
     tm.setLayoutParams(pText);
 
     Button but1 = view.findViewById(R.id.solves_pane_delete);
+    but1.setTextSize(TypedValue.COMPLEX_UNIT_PX, mFontSize);
 
     but1.setOnClickListener( new View.OnClickListener()
         {
@@ -125,10 +144,8 @@ public class MainSolvesPopup
           }
         });
 
-    but1.setTextSize(TypedValue.COMPLEX_UNIT_PX, mFontSize);
-    but1.setLayoutParams(pButt);
-
     Button but2 = view.findViewById(R.id.solves_pane_resume);
+    but2.setTextSize(TypedValue.COMPLEX_UNIT_PX, mFontSize);
 
     but2.setOnClickListener( new View.OnClickListener()
         {
@@ -139,15 +156,12 @@ public class MainSolvesPopup
           }
         });
 
-    but2.setTextSize(TypedValue.COMPLEX_UNIT_PX, mFontSize);
-    but2.setLayoutParams(pButt);
-
     return view;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private View createNewPane(MainActivity act, LinearLayout.LayoutParams pView, LinearLayout.LayoutParams pText, LinearLayout.LayoutParams pButt)
+  private View createNewPane(MainActivity act, LinearLayout.LayoutParams pView, LinearLayout.LayoutParams pText)
     {
     View view = act.getLayoutInflater().inflate(R.layout.dialog_solve_new_pane, null);
     TextView title = view.findViewById(R.id.solves_pane_title);
@@ -159,6 +173,7 @@ public class MainSolvesPopup
     title.setLayoutParams(pText);
 
     Button but = view.findViewById(R.id.solves_pane_play);
+    but.setTextSize(TypedValue.COMPLEX_UNIT_PX, mFontSize);
 
     but.setOnClickListener( new View.OnClickListener()
         {
@@ -169,9 +184,6 @@ public class MainSolvesPopup
           }
         });
 
-    but.setTextSize(TypedValue.COMPLEX_UNIT_PX, mFontSize);
-    but.setLayoutParams(pButt);
-
     return view;
     }
 
diff --git a/src/main/res/layout/dialog_scrollable_solves.xml b/src/main/res/layout/dialog_scrollable_solves.xml
new file mode 100644
index 00000000..db9be8b5
--- /dev/null
+++ b/src/main/res/layout/dialog_scrollable_solves.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/updates_scroll"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="?darkC"
+    android:paddingTop="0dp"
+    android:paddingBottom="0dp"
+    android:paddingLeft="0dp"
+    android:paddingRight="0dp">
+
+    <LinearLayout
+        android:id="@+id/dialog_scrollable_main_layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="?veryDarkC"
+        android:orientation="vertical">
+    </LinearLayout>
+
+</ScrollView>
\ No newline at end of file
diff --git a/src/main/res/layout/dialog_solve_new_pane.xml b/src/main/res/layout/dialog_solve_new_pane.xml
index b08ac7cd..852e925c 100644
--- a/src/main/res/layout/dialog_solve_new_pane.xml
+++ b/src/main/res/layout/dialog_solve_new_pane.xml
@@ -30,7 +30,7 @@
  		android:layout_height="match_parent"
  		android:orientation="vertical"
  		android:layout_marginStart="8dp"
- 		android:layout_weight="0.5">
+ 		android:layout_weight="1.2">
 
 		<Button
              android:id="@+id/solves_pane_play"
diff --git a/src/main/res/layout/dialog_solve_old_pane.xml b/src/main/res/layout/dialog_solve_old_pane.xml
index 45169eed..f173b9e1 100644
--- a/src/main/res/layout/dialog_solve_old_pane.xml
+++ b/src/main/res/layout/dialog_solve_old_pane.xml
@@ -11,7 +11,7 @@
     <LinearLayout
    		android:layout_width="0dp"
  		android:layout_height="match_parent"
- 		android:orientation="horizontal"
+ 		android:orientation="vertical"
  		android:layout_weight="1.0">
 
 		<TextView
@@ -24,9 +24,16 @@
     		android:textStyle="bold"/>
 
         <TextView
+    		android:id="@+id/solves_pane_date"
+    		android:gravity="center_vertical|start"
+    		android:layout_width="match_parent"
+    		android:layout_height="wrap_content"
+    		android:singleLine="true"/>
+
+    	<TextView
     		android:id="@+id/solves_pane_time"
     		android:gravity="center_vertical|start"
-    		android:layout_width="wrap_content"
+    		android:layout_width="match_parent"
     		android:layout_height="wrap_content"
     		android:singleLine="true"/>
 
@@ -37,26 +44,23 @@
  		android:layout_height="match_parent"
  		android:orientation="vertical"
  		android:layout_marginStart="8dp"
- 		android:layout_weight="0.5">
+ 		android:layout_weight="1.2">
 
     	<Button
              android:id="@+id/solves_pane_delete"
              android:layout_width="match_parent"
-             android:layout_height="wrap_content"
+             android:layout_height="0dp"
+             android:layout_weight="1.0"
              android:backgroundTint="?veryDarkC"
-             android:minHeight="0dp"
-             android:minWidth="0dp"
              android:insetTop="0dp"
-             android:insetBottom="0dp"
              android:text="@string/delete"/>
+
 		<Button
              android:id="@+id/solves_pane_resume"
              android:layout_width="match_parent"
-             android:layout_height="wrap_content"
+             android:layout_height="0dp"
+             android:layout_weight="1.0"
              android:backgroundTint="?veryDarkC"
-             android:minHeight="0dp"
-             android:minWidth="0dp"
-             android:insetTop="0dp"
              android:insetBottom="0dp"
              android:text="@string/resume"/>
 
