commit 71cda06105d7077c951d95bd09f677bcbe2220b2
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Tue Aug 16 13:23:41 2022 +0200

    IAP part 5: new 'Purchase' activity (cont'd)

diff --git a/src/main/java/org/distorted/config/ConfigScreenPane.java b/src/main/java/org/distorted/config/ConfigScreenPane.java
index 7622c956..59ddd8e9 100644
--- a/src/main/java/org/distorted/config/ConfigScreenPane.java
+++ b/src/main/java/org/distorted/config/ConfigScreenPane.java
@@ -105,8 +105,8 @@ public class ConfigScreenPane
       view = layout.findViewById(R.id.configDetailsAuthor2);
       view.setText(both);
 
-      if( difficulty<0       ) difficulty=0;
-      if( difficulty>NUM_IDS ) difficulty=NUM_IDS;
+      if( difficulty<0        ) difficulty=0;
+      if( difficulty>=NUM_IDS ) difficulty=NUM_IDS-1;
 
       for(int i=0; i<NUM_IDS; i++)
         {
diff --git a/src/main/java/org/distorted/purchase/PurchaseActivity.java b/src/main/java/org/distorted/purchase/PurchaseActivity.java
index f9464e66..f13a43b7 100644
--- a/src/main/java/org/distorted/purchase/PurchaseActivity.java
+++ b/src/main/java/org/distorted/purchase/PurchaseActivity.java
@@ -15,7 +15,6 @@ import android.util.DisplayMetrics;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.WindowManager;
-import android.widget.LinearLayout;
 
 import androidx.appcompat.app.AppCompatActivity;
 
@@ -34,7 +33,9 @@ import java.io.InputStream;
 public class PurchaseActivity extends AppCompatActivity
 {
     private static final int ACTIVITY_NUMBER = 5;
-    private static final float RATIO_BAR  = 0.10f;
+    private static final float RATIO_UBAR = 0.14f;
+    private static final float RATIO_LBAR = 0.10f;
+    private static final float RATIO_VIEW = 0.50f;
 
     public static final float DIALOG_BUTTON_SIZE  = 0.06f;
     public static final float MENU_BIG_TEXT_SIZE  = 0.05f;
@@ -49,7 +50,6 @@ public class PurchaseActivity extends AppCompatActivity
     private int mCurrentApiVersion;
     private PurchaseScreen mScreen;
     private int mObjectOrdinal;
-    private int mHeightBar;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -72,21 +72,38 @@ public class PurchaseActivity extends AppCompatActivity
 
       hideNavigationBar();
       cutoutHack();
-      computeBarHeights();
+      setHeights();
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-// this does not include possible insets
 
-    private void computeBarHeights()
+    private void setViewHeight(int id, int height)
       {
-      int barHeight = (int)(mScreenHeight*RATIO_BAR);
-      mHeightBar = barHeight;
+      View view = findViewById(id);
+
+      if( view!=null )
+        {
+        ViewGroup.LayoutParams params = view.getLayoutParams();
+        params.height = height;
+        view.setLayoutParams(params);
+        }
+      }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// this does not include possible insets
 
-      LinearLayout layout = findViewById(R.id.lowerBar);
-      ViewGroup.LayoutParams params = layout.getLayoutParams();
-      params.height = barHeight;
-      layout.setLayoutParams(params);
+    private void setHeights()
+      {
+      int ubarHeight= (int)(mScreenHeight*RATIO_UBAR);
+      int lbarHeight= (int)(mScreenHeight*RATIO_LBAR);
+      int viewHeight= (int)(mScreenHeight*RATIO_VIEW);
+      int layHeight = (int)(mScreenHeight*(1-RATIO_UBAR-RATIO_LBAR-RATIO_VIEW)*0.5f);
+
+      setViewHeight(R.id.upperBar           , ubarHeight);
+      setViewHeight(R.id.lowerBar           , lbarHeight);
+      setViewHeight(R.id.purchaseSurfaceView, viewHeight);
+      setViewHeight(R.id.purchaseLayoutOne  , layHeight);
+      setViewHeight(R.id.purchaseLayoutAll  , layHeight);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -216,31 +233,6 @@ public class PurchaseActivity extends AppCompatActivity
       changeIfDifferent(object,ordinal,control);
       }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    public void changeMeshState(RubikObject object, int ordinal)
-      {
-      if( object!=null )
-        {
-        PurchaseSurfaceView view = findViewById(R.id.purchaseSurfaceView);
-        ObjectControl control = view.getObjectControl();
-
-        int meshState          = object.getMeshState();
-        int iconMode           = TwistyObject.MODE_NORM;
-        InputStream jsonStream = object.getObjectStream(this);
-        InputStream meshStream = object.getMeshStream(this);
-
-        control.changeObject(ordinal,meshState,iconMode,jsonStream,meshStream);
-        }
-      }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    public int getHeightBar()
-      {
-      return mHeightBar;
-      }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
     public int getScreenWidthInPixels()
diff --git a/src/main/java/org/distorted/purchase/PurchaseScreen.java b/src/main/java/org/distorted/purchase/PurchaseScreen.java
index fd0455c2..58fe3397 100644
--- a/src/main/java/org/distorted/purchase/PurchaseScreen.java
+++ b/src/main/java/org/distorted/purchase/PurchaseScreen.java
@@ -70,7 +70,7 @@ public class PurchaseScreen
     layout.addView(layoutMid);
     layout.addView(layoutRight);
 
-    PurchaseScreenPane pane = new PurchaseScreenPane(act,ordinal);
+    PurchaseScreenPane pane = new PurchaseScreenPane(act);
     pane.updatePane(act,ordinal);
     }
 }
diff --git a/src/main/java/org/distorted/purchase/PurchaseScreenPane.java b/src/main/java/org/distorted/purchase/PurchaseScreenPane.java
index 6ae2c9d2..c61c00aa 100644
--- a/src/main/java/org/distorted/purchase/PurchaseScreenPane.java
+++ b/src/main/java/org/distorted/purchase/PurchaseScreenPane.java
@@ -9,12 +9,10 @@
 
 package org.distorted.purchase;
 
-import android.graphics.PorterDuff;
 import android.util.TypedValue;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
-import android.widget.RadioButton;
-import android.widget.RadioGroup;
+import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 import org.distorted.main.R;
@@ -24,22 +22,10 @@ import org.distorted.objects.RubikObjectList;
 
 import java.io.InputStream;
 
-import static org.distorted.objectlib.main.TwistyObject.MESH_FAST;
-import static org.distorted.objectlib.main.TwistyObject.MESH_NICE;
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 public class PurchaseScreenPane
 {
-  private static final int[] IDS =
-    {
-    R.id.purchaseDifficulty0,
-    R.id.purchaseDifficulty1,
-    R.id.purchaseDifficulty2,
-    R.id.purchaseDifficulty3,
-    R.id.purchaseDifficulty4
-    };
-
   private static final int[] IMAGES =
     {
     R.drawable.difficulty1,
@@ -49,22 +35,9 @@ public class PurchaseScreenPane
     R.drawable.difficulty5,
     };
 
-  private static final int NUM_IDS         = IDS.length;
+  private static final int NUM_IMAGES      = IMAGES.length;
   public  static final float PADDING_RATIO = 0.025f;
   private static final float TEXT_RATIO    = 0.042f;
-  private static final float RADIO_RATIO   = 0.900f;
-
-  private int mObjectOrdinal;
-  private boolean mProgramatic;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void switchMeshState(PurchaseActivity act, int meshState)
-    {
-    RubikObjectList.setMeshState(mObjectOrdinal,meshState);
-    RubikObject object = RubikObjectList.getObject(mObjectOrdinal);
-    act.changeMeshState(object,mObjectOrdinal);
-    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -75,74 +48,47 @@ public class PurchaseScreenPane
     if( object!=null )
       {
       InputStream stream = object.getObjectStream(act);
-
-      mObjectOrdinal = objectOrdinal;
       JsonReader reader = JsonReader.getInstance();
-      String name,author;
-      int year, difficulty;
+      String name;
+      int difficulty;
 
       try
         {
         reader.parseJsonFileMetadata(stream);
         name       = reader.getObjectName();
-        author     = reader.getInventor();
-        year       = reader.getYearOfInvention();
         difficulty = reader.getComplexity();
         }
       catch(Exception ex)
         {
         name = "?";
-        author = "?";
-        year = 0;
         difficulty = 0;
         }
 
-      String both = year>0 ? author+" "+year : author;
+      if( difficulty<0           ) difficulty=0;
+      if( difficulty>=NUM_IMAGES ) difficulty=NUM_IMAGES-1;
 
-      LinearLayout layout = act.findViewById(R.id.purchaseLayout);
-      TextView view = layout.findViewById(R.id.purchaseDetailsName2);
+      TextView view = act.findViewById(R.id.purchaseDetailsName);
       view.setText(name);
-      view = layout.findViewById(R.id.purchaseDetailsAuthor2);
-      view.setText(both);
-
-      if( difficulty<0       ) difficulty=0;
-      if( difficulty>NUM_IDS ) difficulty=NUM_IDS;
-
-      for(int i=0; i<NUM_IDS; i++)
-        {
-        ImageView image = layout.findViewById(IDS[i]);
-        image.setImageResource(IMAGES[i]);
-        image.setColorFilter( difficulty==i ? 0xffff0000 : 0xffffffff, PorterDuff.Mode.MULTIPLY );
-        }
-
-      int meshState = object.getMeshState();
-      int id = meshState==MESH_NICE ? R.id.meshNice : R.id.meshSimple;
-      RadioButton button = act.findViewById(id);
-
-      mProgramatic = true;
-      button.setChecked(true);
-      mProgramatic = false;
+      ImageView image = act.findViewById(R.id.purchaseDifficulty);
+      image.setImageResource(IMAGES[difficulty]);
       }
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  PurchaseScreenPane(final PurchaseActivity act, int objectOrdinal)
+  PurchaseScreenPane(final PurchaseActivity act)
     {
     int width = act.getScreenWidthInPixels();
     float textSize = width*TEXT_RATIO;
     int padding = (int)(width*PADDING_RATIO);
 
-    LinearLayout configLayout    = act.findViewById(R.id.purchaseLayout);
-    LinearLayout nameLayout      = configLayout.findViewById(R.id.purchaseLayoutName);
-    LinearLayout authorLayout    = configLayout.findViewById(R.id.purchaseLayoutAuthor);
-    LinearLayout difficultyLayout= configLayout.findViewById(R.id.purchaseLayoutDifficulty);
-    LinearLayout meshLayout      = configLayout.findViewById(R.id.purchaseLayoutMesh);
+    RelativeLayout upperBar  = act.findViewById(R.id.upperBar);
+    LinearLayout oneLayout   = act.findViewById(R.id.purchaseLayoutOne);
+    LinearLayout allLayout   = act.findViewById(R.id.purchaseLayoutAll);
 
-    nameLayout.setPadding(padding,padding,padding,padding/2);
-    authorLayout.setPadding(padding,padding/2,padding,padding/2);
-    difficultyLayout.setPadding(padding,padding/2,padding,padding/2);
-    meshLayout.setPadding(padding,padding/2,padding,padding);
+    upperBar.setPadding(padding,padding,padding,padding/2);
+    oneLayout.setPadding(padding,padding/2,padding,padding/2);
+    allLayout.setPadding(padding,padding/2,padding,padding/2);
 
     LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, 0, 1.00f);
     params.bottomMargin = 0;
@@ -150,48 +96,16 @@ public class PurchaseScreenPane
     params.leftMargin   = padding;
     params.rightMargin  = padding;
 
-    nameLayout.setLayoutParams(params);
-    authorLayout.setLayoutParams(params);
-    difficultyLayout.setLayoutParams(params);
-    meshLayout.setLayoutParams(params);
+    upperBar.setLayoutParams(params);
+    oneLayout.setLayoutParams(params);
+    allLayout.setLayoutParams(params);
 
     TextView text;
-    text = nameLayout.findViewById(R.id.purchaseDetailsName1);
-    text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
-    text = nameLayout.findViewById(R.id.purchaseDetailsName2);
+    text = upperBar.findViewById(R.id.purchaseDetailsName);
     text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
-    text = authorLayout.findViewById(R.id.purchaseDetailsAuthor1);
+    text = oneLayout.findViewById(R.id.purchaseTextOne);
     text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
-    text = authorLayout.findViewById(R.id.purchaseDetailsAuthor2);
+    text = allLayout.findViewById(R.id.purchaseTextAll);
     text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
-    text = difficultyLayout.findViewById(R.id.purchaseDifficultyTitle);
-    text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
-    text = meshLayout.findViewById(R.id.purchaseMeshTitle);
-    text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
-
-    RadioButton butt1 = meshLayout.findViewById(R.id.meshNice);
-    butt1.setTextSize(TypedValue.COMPLEX_UNIT_PX, RADIO_RATIO*textSize);
-    RadioButton butt2 = meshLayout.findViewById(R.id.meshSimple);
-    butt2.setTextSize(TypedValue.COMPLEX_UNIT_PX, RADIO_RATIO*textSize);
-
-    LinearLayout layoutDiff = difficultyLayout.findViewById(R.id.purchaseDifficultyLayout);
-    layoutDiff.setPadding(padding,padding,padding,padding);
-
-    RadioGroup radioGroup = meshLayout.findViewById(R.id.meshRadioGroup);
-
-    radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()
-      {
-      @Override
-      public void onCheckedChanged(RadioGroup group, int checkedId)
-        {
-        if( !mProgramatic )
-          {
-          int meshState = checkedId == R.id.meshNice ? MESH_NICE : MESH_FAST;
-          switchMeshState( act, meshState );
-          }
-        }
-      });
-
-    updatePane(act,objectOrdinal);
     }
 }
diff --git a/src/main/java/org/distorted/screens/RubikScreenPlay.java b/src/main/java/org/distorted/screens/RubikScreenPlay.java
index cd0ec504..59a11d97 100644
--- a/src/main/java/org/distorted/screens/RubikScreenPlay.java
+++ b/src/main/java/org/distorted/screens/RubikScreenPlay.java
@@ -338,7 +338,7 @@ public class RubikScreenPlay extends RubikScreenBase implements RubikNetwork.Upd
     mMenuPopup.setFocusable(true);
     int padding = (int)(width*RubikActivity.MEDIUM_MARGIN);
 
-    mMenuLayoutWidth = (int)(width*0.6f);
+    mMenuLayoutWidth = (int)(width*0.65f);
     mMenuLayoutHeight= padding + NUM_BUTTONS*(mMenuButtonHeight+padding) + 4*mMenuButtonHeight+6*padding;
 
     layout.setPadding(padding,0,padding,0);
diff --git a/src/main/res/layout/purchase.xml b/src/main/res/layout/purchase.xml
index 9ba28e0f..778c3a56 100644
--- a/src/main/res/layout/purchase.xml
+++ b/src/main/res/layout/purchase.xml
@@ -3,85 +3,67 @@
     android:id="@+id/mainLayout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="@color/light_grey"
     android:orientation="vertical">
 
+    <RelativeLayout
+         android:id="@+id/upperBar"
+         android:layout_width="fill_parent"
+         android:layout_height="100dp"
+         android:paddingLeft="5dp"
+         android:paddingRight="5dp"
+         android:background="@color/grey"
+         android:orientation="horizontal">
+
+         <TextView
+             android:id="@+id/purchaseDetailsName"
+             android:layout_width="wrap_content"
+             android:layout_height="match_parent"
+             android:layout_alignParentStart="true"
+             android:paddingStart="5dp"
+             android:textSize="26sp"
+             android:singleLine="true"
+             android:maxLines="1"/>
+
+         <ImageView
+             android:id="@+id/purchaseDifficulty"
+             android:layout_width="wrap_content"
+             android:layout_height="match_parent"
+             android:layout_alignParentEnd="true"/>
+    </RelativeLayout>
+
     <org.distorted.purchase.PurchaseSurfaceView
         android:id="@+id/purchaseSurfaceView"
         android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1.3"/>
-
-    <LinearLayout
-        android:id="@+id/purchaseLayout"
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1.0"
-        android:background="@color/light_grey"
-        android:orientation="vertical" >
+        android:layout_height="wrap_content"/>
 
         <LinearLayout
-            android:id="@+id/purchaseLayoutName"
+            android:id="@+id/purchaseLayoutOne"
             android:layout_width="fill_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1"
+            android:layout_height="10dp"
             android:paddingLeft="5dp"
             android:paddingRight="5dp"
             android:background="@color/grey"
             android:orientation="horizontal">
 
             <TextView
-                android:id="@+id/purchaseDetailsName1"
+                android:id="@+id/purchaseTextOne"
                 android:layout_width="0dp"
                 android:layout_height="match_parent"
-                android:layout_weight="1.0"
+                android:layout_weight="2.0"
                 android:gravity="center_vertical|start"
                 android:paddingStart="5dp"
                 android:textSize="26sp"
                 android:singleLine="true"
                 android:maxLines="1"
-                android:text="@string/config_name"/>
+                android:text="@string/buy_one"/>
 
-            <TextView
-                android:id="@+id/purchaseDetailsName2"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="2.1"
-                android:gravity="center_vertical|start"
-                android:paddingStart="5dp"
-                android:textSize="26sp"
-                android:singleLine="true"
-                android:maxLines="1"/>
-
-        </LinearLayout>
-
-        <LinearLayout
-            android:id="@+id/purchaseLayoutAuthor"
-            android:layout_width="fill_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1"
-            android:paddingLeft="5dp"
-            android:paddingRight="5dp"
-            android:background="@color/grey"
-            android:orientation="horizontal">
-
-            <TextView
-                android:id="@+id/purchaseDetailsAuthor1"
+            <Button
+                android:id="@+id/purchaseButtonOne"
                 android:layout_width="0dp"
                 android:layout_height="match_parent"
                 android:layout_weight="1.0"
-                android:gravity="center_vertical|start"
-                android:paddingStart="5dp"
-                android:textSize="26sp"
-                android:singleLine="true"
-                android:maxLines="1"
-                android:text="@string/config_author"/>
-
-            <TextView
-                android:id="@+id/purchaseDetailsAuthor2"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="2.1"
-                android:gravity="center_vertical|start"
+                android:gravity="center_vertical|end"
                 android:paddingStart="5dp"
                 android:textSize="26sp"
                 android:singleLine="true"
@@ -90,124 +72,38 @@
         </LinearLayout>
 
         <LinearLayout
-            android:id="@+id/purchaseLayoutDifficulty"
+            android:id="@+id/purchaseLayoutAll"
             android:layout_width="fill_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1"
+            android:layout_height="10dp"
             android:paddingLeft="5dp"
             android:paddingRight="5dp"
             android:background="@color/grey"
             android:orientation="horizontal">
 
             <TextView
-                android:id="@+id/purchaseDifficultyTitle"
+                android:id="@+id/purchaseTextAll"
                 android:layout_width="0dp"
                 android:layout_height="match_parent"
-                android:layout_weight="1.0"
+                android:layout_weight="2.0"
                 android:gravity="center_vertical|start"
                 android:paddingStart="5dp"
                 android:textSize="26sp"
                 android:singleLine="true"
                 android:maxLines="1"
-                android:text="@string/config_difficulty"/>
-
-            <LinearLayout
-                android:id="@+id/purchaseDifficultyLayout"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="2.5"
-                android:gravity="start"
-                android:paddingTop="20dp"
-                android:paddingBottom="20dp"
-                android:orientation="horizontal">
-
-                <ImageView
-                    android:id="@+id/purchaseDifficulty0"
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"/>
-
-                <ImageView
-                    android:id="@+id/purchaseDifficulty1"
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"/>
-
-                <ImageView
-                    android:id="@+id/purchaseDifficulty2"
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"/>
-
-                <ImageView
-                    android:id="@+id/purchaseDifficulty3"
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"/>
-
-                <ImageView
-                    android:id="@+id/purchaseDifficulty4"
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"/>
-
-            </LinearLayout>
-
-        </LinearLayout>
-
-         <LinearLayout
-            android:id="@+id/purchaseLayoutMesh"
-            android:layout_width="fill_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1"
-            android:paddingLeft="5dp"
-            android:paddingRight="5dp"
-            android:background="@color/grey"
-            android:orientation="horizontal">
+                android:text="@string/buy_all"/>
 
-            <TextView
-                android:id="@+id/purchaseMeshTitle"
+            <Button
+                android:id="@+id/purchaseButtonAll"
                 android:layout_width="0dp"
                 android:layout_height="match_parent"
                 android:layout_weight="1.0"
-                android:gravity="center_vertical|start"
+                android:gravity="center_vertical|end"
                 android:paddingStart="5dp"
                 android:textSize="26sp"
                 android:singleLine="true"
-                android:maxLines="1"
-                android:text="@string/config_mesh"/>
-
-            <RadioGroup
-                android:id="@+id/meshRadioGroup"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="2.1"
-                android:orientation="horizontal"
-                android:checkedButton="@+id/meshNice"
-                android:background="@color/grey">
-
-                <RadioButton
-                    android:id="@+id/meshSimple"
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"
-                    android:buttonTint="@color/white"
-                    android:text="@string/config_mesh_fast"/>
-
-                <RadioButton
-                    android:id="@+id/meshNice"
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"
-                    android:buttonTint="@color/white"
-                    android:text="@string/config_mesh_nice"/>
-
-            </RadioGroup>
-
+                android:maxLines="1"/>
         </LinearLayout>
 
-    </LinearLayout>
-
     <LinearLayout
         android:id="@+id/lowerBar"
         android:layout_width="match_parent"
diff --git a/src/main/res/values-de/strings.xml b/src/main/res/values-de/strings.xml
index 78c0387f..83de8d34 100755
--- a/src/main/res/values-de/strings.xml
+++ b/src/main/res/values-de/strings.xml
@@ -56,6 +56,9 @@
     <string name="install">Installieren</string>
     <string name="abandon_solve">Gib auf</string>
 
+    <string name="buy_one">Kaufen Sie dieses Cube</string>
+    <string name="buy_all">Kaufen Sie alle Cubes</string>
+
     <string name="config_details">Einzelheiten</string>
     <string name="config_name">Name</string>
     <string name="config_author">Autor</string>
diff --git a/src/main/res/values-es/strings.xml b/src/main/res/values-es/strings.xml
index 6ba3426e..48244863 100755
--- a/src/main/res/values-es/strings.xml
+++ b/src/main/res/values-es/strings.xml
@@ -56,6 +56,9 @@
     <string name="install">Instalar</string>
     <string name="abandon_solve">Abandonar</string>
 
+    <string name="buy_one">Compra este cubo</string>
+    <string name="buy_all">Compra todos cubos</string>
+
     <string name="config_details">Detalles</string>
     <string name="config_name">Nombre</string>
     <string name="config_author">Autor</string>
diff --git a/src/main/res/values-fr/strings.xml b/src/main/res/values-fr/strings.xml
index 2181d3cb..6b18f8e6 100755
--- a/src/main/res/values-fr/strings.xml
+++ b/src/main/res/values-fr/strings.xml
@@ -56,6 +56,9 @@
     <string name="install">Installer</string>
     <string name="abandon_solve">Abandonner</string>
 
+    <string name="buy_one">Acheter ce cube</string>
+    <string name="buy_all">Acheter tous cubes</string>
+
     <string name="config_details">Détails</string>
     <string name="config_name">Nom</string>
     <string name="config_author">Auteur</string>
diff --git a/src/main/res/values-ja/strings.xml b/src/main/res/values-ja/strings.xml
index c939ec1c..8c342418 100755
--- a/src/main/res/values-ja/strings.xml
+++ b/src/main/res/values-ja/strings.xml
@@ -56,6 +56,9 @@
     <string name="install">インストール</string>
     <string name="abandon_solve">あきらめる</string>
 
+    <string name="buy_one">このパズル</string>
+    <string name="buy_all">すべてのパズル</string>
+
     <string name="config_details">詳細</string>
     <string name="config_name">名前</string>
     <string name="config_author">著者</string>
diff --git a/src/main/res/values-ko/strings.xml b/src/main/res/values-ko/strings.xml
index 99b13b1e..d693df3e 100755
--- a/src/main/res/values-ko/strings.xml
+++ b/src/main/res/values-ko/strings.xml
@@ -56,6 +56,9 @@
     <string name="install">설치</string>
     <string name="abandon_solve">포기</string>
 
+    <string name="buy_one">이 퍼즐을 구입</string>
+    <string name="buy_all">모든 퍼즐 구매</string>
+
     <string name="config_details">세부</string>
     <string name="config_name">이름</string>
     <string name="config_author">작가</string>
diff --git a/src/main/res/values-pl/strings.xml b/src/main/res/values-pl/strings.xml
index bde4a821..01af3a03 100644
--- a/src/main/res/values-pl/strings.xml
+++ b/src/main/res/values-pl/strings.xml
@@ -56,6 +56,9 @@
     <string name="install">Zainstaluj</string>
     <string name="abandon_solve">Zrezygnuj</string>
 
+    <string name="buy_one">Kup tą kostkę</string>
+    <string name="buy_all">Kup wszystkie kostki</string>
+
     <string name="config_details">O kostce</string>
     <string name="config_name">Nazwa</string>
     <string name="config_author">Autor</string>
diff --git a/src/main/res/values-ru/strings.xml b/src/main/res/values-ru/strings.xml
index 7d1ff811..08520b2b 100755
--- a/src/main/res/values-ru/strings.xml
+++ b/src/main/res/values-ru/strings.xml
@@ -56,6 +56,9 @@
     <string name="install">Установите</string>
     <string name="abandon_solve">Сдаться</string>
 
+    <string name="buy_one">Куп эту головоломку</string>
+    <string name="buy_all">Куп все головоломки</string>
+
     <string name="config_details">Детали</string>
     <string name="config_name">Имя</string>
     <string name="config_author">Автор</string>
diff --git a/src/main/res/values-zh-rCN/strings.xml b/src/main/res/values-zh-rCN/strings.xml
index 3b50e5b2..f16d9398 100644
--- a/src/main/res/values-zh-rCN/strings.xml
+++ b/src/main/res/values-zh-rCN/strings.xml
@@ -56,6 +56,9 @@
     <string name="install">安装</string>
     <string name="abandon_solve">放弃</string>
 
+    <string name="buy_one">买这个拼图</string>
+    <string name="buy_all">购买所有拼图</string>
+
     <string name="config_details">细节</string>
     <string name="config_name">姓名</string>
     <string name="config_author">作者</string>
diff --git a/src/main/res/values-zh-rTW/strings.xml b/src/main/res/values-zh-rTW/strings.xml
index 8e2da0db..e39916df 100644
--- a/src/main/res/values-zh-rTW/strings.xml
+++ b/src/main/res/values-zh-rTW/strings.xml
@@ -56,6 +56,9 @@
     <string name="install">安裝</string>
     <string name="abandon_solve">放棄</string>
 
+    <string name="buy_one">買這個拼圖</string>
+    <string name="buy_all">購買所有拼圖</string>
+
     <string name="config_details">細節</string>
     <string name="config_name">姓名</string>
     <string name="config_author">作者</string>
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 95246a2a..fd65cb62 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -57,6 +57,9 @@
     <string name="no_updates">No update found</string>
     <string name="install">Install</string>
 
+    <string name="buy_one">Unlock this cube</string>
+    <string name="buy_all">Unlock all cubes</string>
+
     <string name="level1" translatable="false">1</string>
     <string name="level2" translatable="false">2</string>
     <string name="level3" translatable="false">3</string>
