commit af0710b67a4b4d793fc7b6420512315d5c3e2f83
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Wed Aug 17 23:54:41 2022 +0200

    IAP: finish the 'Purschase' activity.

diff --git a/src/main/java/org/distorted/config/ConfigRenderer.java b/src/main/java/org/distorted/config/ConfigRenderer.java
index 59266bc9..c7f20bbd 100644
--- a/src/main/java/org/distorted/config/ConfigRenderer.java
+++ b/src/main/java/org/distorted/config/ConfigRenderer.java
@@ -72,6 +72,7 @@ public class ConfigRenderer implements GLSurfaceView.Renderer, DistortedLibrary.
       BaseEffect.Type.enableEffects();
 
       DistortedLibrary.onSurfaceCreated(mView.getContext(),this,1);
+      DistortedLibrary.setCull(true);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/purchase/PurchaseRenderer.java b/src/main/java/org/distorted/purchase/PurchaseRenderer.java
index a84e3c28..a5c242e1 100644
--- a/src/main/java/org/distorted/purchase/PurchaseRenderer.java
+++ b/src/main/java/org/distorted/purchase/PurchaseRenderer.java
@@ -27,7 +27,7 @@ import javax.microedition.khronos.opengles.GL10;
 public class PurchaseRenderer implements GLSurfaceView.Renderer, DistortedLibrary.ExceptionListener
 {
    private static final int NUM_SCRAMBLES = 5;
-   private static final int DURATION = NUM_SCRAMBLES*2*2500;
+   private static final int DURATION = NUM_SCRAMBLES*2*1500;
 
    private final PurchaseSurfaceView mView;
    private final DistortedScreen mScreen;
@@ -82,6 +82,7 @@ public class PurchaseRenderer implements GLSurfaceView.Renderer, DistortedLibrar
       BaseEffect.Type.enableEffects();
 
       DistortedLibrary.onSurfaceCreated(mView.getContext(),this,1);
+      DistortedLibrary.setCull(true);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/purchase/PurchaseScreenPane.java b/src/main/java/org/distorted/purchase/PurchaseScreenPane.java
index 482ad9d9..3a1ab62e 100644
--- a/src/main/java/org/distorted/purchase/PurchaseScreenPane.java
+++ b/src/main/java/org/distorted/purchase/PurchaseScreenPane.java
@@ -93,7 +93,7 @@ public class PurchaseScreenPane
     LinearLayout oneLayout = act.findViewById(R.id.purchaseLayoutOne);
     LinearLayout allLayout = act.findViewById(R.id.purchaseLayoutAll);
 
-    upperBar.setPadding( padding,padding/2,padding,padding/2);
+    upperBar.setPadding( padding,padding  ,padding,padding  );
     oneLayout.setPadding(padding,padding/2,padding,padding/2);
     allLayout.setPadding(padding,padding/2,padding,padding/2);
 
@@ -109,8 +109,14 @@ public class PurchaseScreenPane
     params2.leftMargin   = padding;
     params2.rightMargin  = padding;
 
+    LinearLayout.LayoutParams params3 = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, 0, 1.00f);
+    params3.bottomMargin = 0;
+    params3.topMargin    = 0;
+    params3.leftMargin   = padding;
+    params3.rightMargin  = padding;
+
     upperBar.setLayoutParams(params1);
-    oneLayout.setLayoutParams(params1);
+    oneLayout.setLayoutParams(params3);
     allLayout.setLayoutParams(params2);
 
     TextView text;
diff --git a/src/main/res/layout/purchase.xml b/src/main/res/layout/purchase.xml
index d3632cff..27aebcfd 100644
--- a/src/main/res/layout/purchase.xml
+++ b/src/main/res/layout/purchase.xml
@@ -55,72 +55,72 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"/>
 
-        <LinearLayout
-            android:id="@+id/purchaseLayoutOne"
-            android:layout_width="fill_parent"
-            android:layout_height="10dp"
-            android:paddingLeft="5dp"
-            android:paddingRight="5dp"
-            android:background="@color/grey"
-            android:orientation="horizontal">
+    <LinearLayout
+        android:id="@+id/purchaseLayoutOne"
+        android:layout_width="fill_parent"
+        android:layout_height="10dp"
+        android:paddingLeft="5dp"
+        android:paddingRight="5dp"
+        android:background="@color/grey"
+        android:orientation="horizontal">
 
-            <TextView
-                android:id="@+id/purchaseTextOne"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                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/buy_one"/>
+        <TextView
+            android:id="@+id/purchaseTextOne"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            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/buy_one"/>
 
-            <Button
-                android:id="@+id/purchaseButtonOne"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1.0"
-                android:gravity="center_vertical|end"
-                android:paddingStart="5dp"
-                android:textSize="26sp"
-                android:singleLine="true"
-                android:maxLines="1"/>
+        <Button
+            android:id="@+id/purchaseButtonOne"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1.0"
+            android:gravity="center_vertical|end"
+            android:paddingStart="5dp"
+            android:textSize="26sp"
+            android:singleLine="true"
+            android:maxLines="1"/>
 
-        </LinearLayout>
+    </LinearLayout>
 
-        <LinearLayout
-            android:id="@+id/purchaseLayoutAll"
-            android:layout_width="fill_parent"
-            android:layout_height="10dp"
-            android:paddingLeft="5dp"
-            android:paddingRight="5dp"
-            android:background="@color/grey"
-            android:orientation="horizontal">
+    <LinearLayout
+        android:id="@+id/purchaseLayoutAll"
+        android:layout_width="fill_parent"
+        android:layout_height="10dp"
+        android:paddingLeft="5dp"
+        android:paddingRight="5dp"
+        android:background="@color/grey"
+        android:orientation="horizontal">
 
-            <TextView
-                android:id="@+id/purchaseTextAll"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                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/buy_all"/>
+        <TextView
+            android:id="@+id/purchaseTextAll"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            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/buy_all"/>
 
-            <Button
-                android:id="@+id/purchaseButtonAll"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1.0"
-                android:gravity="center_vertical|end"
-                android:paddingStart="5dp"
-                android:textSize="26sp"
-                android:singleLine="true"
-                android:maxLines="1"/>
-        </LinearLayout>
+        <Button
+            android:id="@+id/purchaseButtonAll"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1.0"
+            android:gravity="center_vertical|end"
+            android:paddingStart="5dp"
+            android:textSize="26sp"
+            android:singleLine="true"
+            android:maxLines="1"/>
+    </LinearLayout>
 
     <LinearLayout
         android:id="@+id/lowerBar"
