commit 41aff64ef62887377fc12aad08e5ea8f611cd2a9
Author: leszek <leszek@koltunski.pl>
Date:   Mon Jan 6 16:42:24 2025 +0100

    change one of objlib's APIs from 'onReplaceModeUP/Down' (which only comes when TouchControl is in REPLACE mode) to 'onStickerTouched/Untouched' (which reports the same thing, but comes always)

diff --git a/src/main/java/org/distorted/phasedsolver/SolverActivity.java b/src/main/java/org/distorted/phasedsolver/SolverActivity.java
index 042d3fb..38a76cf 100644
--- a/src/main/java/org/distorted/phasedsolver/SolverActivity.java
+++ b/src/main/java/org/distorted/phasedsolver/SolverActivity.java
@@ -40,10 +40,12 @@ public class SolverActivity extends Activity implements SolutionListener, Adapte
   private InitAssets mAsset;
   private SharedPreferences mPreferences;
   private SolverLowerPane mLowerPane;
-  private TextView mText;
+  private TextView mTextMoves, mTextStickers;
   private SolvedObject mObject;
   private String mMoves;
   private int mNumMoves;
+  private String mStickers;
+  private int mNumStickers;
   private int mCurrSolver;
   private PhasedSolverAbstract mSolver;
   private long mTime;
@@ -60,9 +62,12 @@ public class SolverActivity extends Activity implements SolutionListener, Adapte
     SolverSurfaceView view = findViewById(R.id.solverView);
     OSInterface os = view.getInterface();
     mAsset = new InitAssets(null, null, os);
-    mText = findViewById(R.id.solverMoves);
+    mTextMoves = findViewById(R.id.solverMoves);
+    mTextStickers = findViewById(R.id.solverStickers);
     mMoves = "";
     mNumMoves = 0;
+    mStickers = "";
+    mNumStickers = 0;
     Spinner objectSpinner = findViewById(R.id.solverSpinner);
     objectSpinner.setOnItemSelectedListener(this);
 
@@ -258,6 +263,18 @@ public class SolverActivity extends Activity implements SolutionListener, Adapte
       });
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private void resetTexts()
+    {
+    mNumMoves = 0;
+    mMoves = "";
+    mTextMoves.setText(mMoves);
+    mNumStickers = 0;
+    mStickers = "";
+    mTextStickers.setText(mStickers);
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public void Scramble(View v)
@@ -265,10 +282,7 @@ public class SolverActivity extends Activity implements SolutionListener, Adapte
     ObjectControl control = getControl();
     control.fastScrambleObject(1000,20);
     mLowerPane.clearMoves();
-
-    mNumMoves = 0;
-    mMoves = "";
-    mText.setText(mMoves);
+    resetTexts();
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -278,10 +292,28 @@ public class SolverActivity extends Activity implements SolutionListener, Adapte
     ObjectControl control = getControl();
     control.solveObject();
     mLowerPane.clearMoves();
+    resetTexts();
+    }
 
-    mNumMoves = 0;
-    mMoves = "";
-    mText.setText(mMoves);
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  void addSticker(int cubit, int face)
+    {
+    mStickers += ("("+cubit+" "+face+") ");
+    mNumStickers++;
+
+    if( mNumStickers>6 )
+      {
+      int space = mStickers.indexOf(')');
+      mStickers = mStickers.substring(space+1);
+      mNumStickers--;
+      }
+
+    runOnUiThread(new Runnable()
+      {
+      @Override
+      public void run() { mTextStickers.setText(mStickers); }
+      });
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -302,7 +334,7 @@ public class SolverActivity extends Activity implements SolutionListener, Adapte
     runOnUiThread(new Runnable()
       {
       @Override
-      public void run() { mText.setText(mMoves); }
+      public void run() { mTextMoves.setText(mMoves); }
       });
     }
 }
diff --git a/src/main/java/org/distorted/phasedsolver/SolverObjectLibInterface.java b/src/main/java/org/distorted/phasedsolver/SolverObjectLibInterface.java
index 71b48ad..3afc514 100644
--- a/src/main/java/org/distorted/phasedsolver/SolverObjectLibInterface.java
+++ b/src/main/java/org/distorted/phasedsolver/SolverObjectLibInterface.java
@@ -30,10 +30,17 @@ public class SolverObjectLibInterface implements ObjectLibInterface
   public void failedToDrag() { }
   public void reportBlockProblem(int type, int place, long pause, long resume, long time) { }
   public void reportProblem(String problem, boolean reportException) {}
-  public void onReplaceModeDown(int cubit, int face) { }
-  public void onReplaceModeUp() { }
+  public void onStickerUntouched() { }
   public void reportJSONError(String error, int ordinal) { }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void onStickerTouched(int cubit, int face)
+    {
+    SolverActivity act = mAct.get();
+    act.addSticker(cubit,face);
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public void onRemoveRotation(int axis, int row, int angle)
diff --git a/src/main/res/layout/mainlayout.xml b/src/main/res/layout/mainlayout.xml
index 188e30e..22c281f 100644
--- a/src/main/res/layout/mainlayout.xml
+++ b/src/main/res/layout/mainlayout.xml
@@ -24,7 +24,7 @@
             android:id="@+id/solverReset"
             android:layout_width="0dp"
             android:layout_height="match_parent"
-            android:layout_weight="1.0"
+            android:layout_weight="0.9"
             android:gravity="center_vertical|center"
             android:text="@string/reset"
             android:onClick="Reset"
@@ -46,45 +46,49 @@
             android:id="@+id/solverSolve"
             android:layout_width="0dp"
             android:layout_height="match_parent"
-            android:layout_weight="1.0"
+            android:layout_weight="0.9"
             android:gravity="center_vertical|center"
             android:text="@string/solve"
             android:onClick="Solve"
             android:textAppearance="?android:attr/textAppearanceMedium"
             android:layout_gravity="center_vertical"/>
-
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/middleBar"
-        android:layout_below="@id/upperBar"
-        android:layout_width="match_parent"
-        android:layout_height="50dp"
-        android:gravity="center"
-        android:orientation="horizontal"
-        android:background="@android:color/transparent">
-
-        <TextView
-            android:id="@+id/solverMoves"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="2"
-            android:background="@color/white"
-            android:textColor="@color/black"
-            android:layout_marginStart="4dp"
-            android:layout_marginEnd="4dp"
-            android:layout_marginTop="3dp"
-            android:layout_marginBottom="5dp"
-            android:textAppearance="?android:attr/textAppearanceLarge"
-            android:gravity="center_vertical|start"/>
         <Spinner
             android:id="@+id/solverSpinner"
             android:layout_width="0dp"
             android:layout_height="match_parent"
-            android:layout_weight="1"/>
-
+            android:layout_weight="1.0"/>
     </LinearLayout>
 
+    <TextView
+        android:id="@+id/solverMoves"
+        android:layout_below="@id/upperBar"
+        android:layout_width="match_parent"
+        android:layout_height="50dp"
+        android:singleLine="true"
+        android:background="@color/white"
+        android:textColor="@color/black"
+        android:layout_marginStart="3dp"
+        android:layout_marginEnd="3dp"
+        android:layout_marginTop="3dp"
+        android:layout_marginBottom="5dp"
+        android:textAppearance="?android:attr/textAppearanceLarge"
+        android:gravity="center_vertical|start"/>
+
+    <TextView
+        android:id="@+id/solverStickers"
+        android:layout_below="@id/solverMoves"
+        android:layout_width="match_parent"
+        android:layout_height="50dp"
+        android:singleLine="true"
+        android:background="@color/white"
+        android:textColor="@color/black"
+        android:layout_marginStart="3dp"
+        android:layout_marginEnd="3dp"
+        android:layout_marginTop="3dp"
+        android:layout_marginBottom="5dp"
+        android:textAppearance="?android:attr/textAppearanceLarge"
+        android:gravity="center_vertical|start"/>
+
     <LinearLayout
         android:id="@+id/phaseBar"
         android:layout_above="@id/lowerBar"
