Revision af0710b6
Added by Leszek Koltunski over 3 years ago
| src/main/java/org/distorted/config/ConfigRenderer.java | ||
|---|---|---|
| 72 | 72 |
BaseEffect.Type.enableEffects(); |
| 73 | 73 |
|
| 74 | 74 |
DistortedLibrary.onSurfaceCreated(mView.getContext(),this,1); |
| 75 |
DistortedLibrary.setCull(true); |
|
| 75 | 76 |
} |
| 76 | 77 |
|
| 77 | 78 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| src/main/java/org/distorted/purchase/PurchaseRenderer.java | ||
|---|---|---|
| 27 | 27 |
public class PurchaseRenderer implements GLSurfaceView.Renderer, DistortedLibrary.ExceptionListener |
| 28 | 28 |
{
|
| 29 | 29 |
private static final int NUM_SCRAMBLES = 5; |
| 30 |
private static final int DURATION = NUM_SCRAMBLES*2*2500;
|
|
| 30 |
private static final int DURATION = NUM_SCRAMBLES*2*1500;
|
|
| 31 | 31 |
|
| 32 | 32 |
private final PurchaseSurfaceView mView; |
| 33 | 33 |
private final DistortedScreen mScreen; |
| ... | ... | |
| 82 | 82 |
BaseEffect.Type.enableEffects(); |
| 83 | 83 |
|
| 84 | 84 |
DistortedLibrary.onSurfaceCreated(mView.getContext(),this,1); |
| 85 |
DistortedLibrary.setCull(true); |
|
| 85 | 86 |
} |
| 86 | 87 |
|
| 87 | 88 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| src/main/java/org/distorted/purchase/PurchaseScreenPane.java | ||
|---|---|---|
| 93 | 93 |
LinearLayout oneLayout = act.findViewById(R.id.purchaseLayoutOne); |
| 94 | 94 |
LinearLayout allLayout = act.findViewById(R.id.purchaseLayoutAll); |
| 95 | 95 |
|
| 96 |
upperBar.setPadding( padding,padding/2,padding,padding/2);
|
|
| 96 |
upperBar.setPadding( padding,padding ,padding,padding );
|
|
| 97 | 97 |
oneLayout.setPadding(padding,padding/2,padding,padding/2); |
| 98 | 98 |
allLayout.setPadding(padding,padding/2,padding,padding/2); |
| 99 | 99 |
|
| ... | ... | |
| 109 | 109 |
params2.leftMargin = padding; |
| 110 | 110 |
params2.rightMargin = padding; |
| 111 | 111 |
|
| 112 |
LinearLayout.LayoutParams params3 = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, 0, 1.00f); |
|
| 113 |
params3.bottomMargin = 0; |
|
| 114 |
params3.topMargin = 0; |
|
| 115 |
params3.leftMargin = padding; |
|
| 116 |
params3.rightMargin = padding; |
|
| 117 |
|
|
| 112 | 118 |
upperBar.setLayoutParams(params1); |
| 113 |
oneLayout.setLayoutParams(params1);
|
|
| 119 |
oneLayout.setLayoutParams(params3);
|
|
| 114 | 120 |
allLayout.setLayoutParams(params2); |
| 115 | 121 |
|
| 116 | 122 |
TextView text; |
| src/main/res/layout/purchase.xml | ||
|---|---|---|
| 55 | 55 |
android:layout_width="match_parent" |
| 56 | 56 |
android:layout_height="wrap_content"/> |
| 57 | 57 |
|
| 58 |
<LinearLayout
|
|
| 59 |
android:id="@+id/purchaseLayoutOne"
|
|
| 60 |
android:layout_width="fill_parent"
|
|
| 61 |
android:layout_height="10dp"
|
|
| 62 |
android:paddingLeft="5dp"
|
|
| 63 |
android:paddingRight="5dp"
|
|
| 64 |
android:background="@color/grey"
|
|
| 65 |
android:orientation="horizontal">
|
|
| 58 |
<LinearLayout |
|
| 59 |
android:id="@+id/purchaseLayoutOne" |
|
| 60 |
android:layout_width="fill_parent" |
|
| 61 |
android:layout_height="10dp" |
|
| 62 |
android:paddingLeft="5dp" |
|
| 63 |
android:paddingRight="5dp" |
|
| 64 |
android:background="@color/grey" |
|
| 65 |
android:orientation="horizontal"> |
|
| 66 | 66 |
|
| 67 |
<TextView
|
|
| 68 |
android:id="@+id/purchaseTextOne"
|
|
| 69 |
android:layout_width="0dp"
|
|
| 70 |
android:layout_height="match_parent"
|
|
| 71 |
android:layout_weight="2.0"
|
|
| 72 |
android:gravity="center_vertical|start"
|
|
| 73 |
android:paddingStart="5dp"
|
|
| 74 |
android:textSize="26sp"
|
|
| 75 |
android:singleLine="true"
|
|
| 76 |
android:maxLines="1"
|
|
| 77 |
android:text="@string/buy_one"/>
|
|
| 67 |
<TextView |
|
| 68 |
android:id="@+id/purchaseTextOne" |
|
| 69 |
android:layout_width="0dp" |
|
| 70 |
android:layout_height="match_parent" |
|
| 71 |
android:layout_weight="2.0" |
|
| 72 |
android:gravity="center_vertical|start" |
|
| 73 |
android:paddingStart="5dp" |
|
| 74 |
android:textSize="26sp" |
|
| 75 |
android:singleLine="true" |
|
| 76 |
android:maxLines="1" |
|
| 77 |
android:text="@string/buy_one"/> |
|
| 78 | 78 |
|
| 79 |
<Button
|
|
| 80 |
android:id="@+id/purchaseButtonOne"
|
|
| 81 |
android:layout_width="0dp"
|
|
| 82 |
android:layout_height="match_parent"
|
|
| 83 |
android:layout_weight="1.0"
|
|
| 84 |
android:gravity="center_vertical|end"
|
|
| 85 |
android:paddingStart="5dp"
|
|
| 86 |
android:textSize="26sp"
|
|
| 87 |
android:singleLine="true"
|
|
| 88 |
android:maxLines="1"/>
|
|
| 79 |
<Button |
|
| 80 |
android:id="@+id/purchaseButtonOne" |
|
| 81 |
android:layout_width="0dp" |
|
| 82 |
android:layout_height="match_parent" |
|
| 83 |
android:layout_weight="1.0" |
|
| 84 |
android:gravity="center_vertical|end" |
|
| 85 |
android:paddingStart="5dp" |
|
| 86 |
android:textSize="26sp" |
|
| 87 |
android:singleLine="true" |
|
| 88 |
android:maxLines="1"/> |
|
| 89 | 89 |
|
| 90 |
</LinearLayout>
|
|
| 90 |
</LinearLayout> |
|
| 91 | 91 |
|
| 92 |
<LinearLayout
|
|
| 93 |
android:id="@+id/purchaseLayoutAll"
|
|
| 94 |
android:layout_width="fill_parent"
|
|
| 95 |
android:layout_height="10dp"
|
|
| 96 |
android:paddingLeft="5dp"
|
|
| 97 |
android:paddingRight="5dp"
|
|
| 98 |
android:background="@color/grey"
|
|
| 99 |
android:orientation="horizontal">
|
|
| 92 |
<LinearLayout |
|
| 93 |
android:id="@+id/purchaseLayoutAll" |
|
| 94 |
android:layout_width="fill_parent" |
|
| 95 |
android:layout_height="10dp" |
|
| 96 |
android:paddingLeft="5dp" |
|
| 97 |
android:paddingRight="5dp" |
|
| 98 |
android:background="@color/grey" |
|
| 99 |
android:orientation="horizontal"> |
|
| 100 | 100 |
|
| 101 |
<TextView
|
|
| 102 |
android:id="@+id/purchaseTextAll"
|
|
| 103 |
android:layout_width="0dp"
|
|
| 104 |
android:layout_height="match_parent"
|
|
| 105 |
android:layout_weight="2.0"
|
|
| 106 |
android:gravity="center_vertical|start"
|
|
| 107 |
android:paddingStart="5dp"
|
|
| 108 |
android:textSize="26sp"
|
|
| 109 |
android:singleLine="true"
|
|
| 110 |
android:maxLines="1"
|
|
| 111 |
android:text="@string/buy_all"/>
|
|
| 101 |
<TextView |
|
| 102 |
android:id="@+id/purchaseTextAll" |
|
| 103 |
android:layout_width="0dp" |
|
| 104 |
android:layout_height="match_parent" |
|
| 105 |
android:layout_weight="2.0" |
|
| 106 |
android:gravity="center_vertical|start" |
|
| 107 |
android:paddingStart="5dp" |
|
| 108 |
android:textSize="26sp" |
|
| 109 |
android:singleLine="true" |
|
| 110 |
android:maxLines="1" |
|
| 111 |
android:text="@string/buy_all"/> |
|
| 112 | 112 |
|
| 113 |
<Button
|
|
| 114 |
android:id="@+id/purchaseButtonAll"
|
|
| 115 |
android:layout_width="0dp"
|
|
| 116 |
android:layout_height="match_parent"
|
|
| 117 |
android:layout_weight="1.0"
|
|
| 118 |
android:gravity="center_vertical|end"
|
|
| 119 |
android:paddingStart="5dp"
|
|
| 120 |
android:textSize="26sp"
|
|
| 121 |
android:singleLine="true"
|
|
| 122 |
android:maxLines="1"/>
|
|
| 123 |
</LinearLayout>
|
|
| 113 |
<Button |
|
| 114 |
android:id="@+id/purchaseButtonAll" |
|
| 115 |
android:layout_width="0dp" |
|
| 116 |
android:layout_height="match_parent" |
|
| 117 |
android:layout_weight="1.0" |
|
| 118 |
android:gravity="center_vertical|end" |
|
| 119 |
android:paddingStart="5dp" |
|
| 120 |
android:textSize="26sp" |
|
| 121 |
android:singleLine="true" |
|
| 122 |
android:maxLines="1"/> |
|
| 123 |
</LinearLayout> |
|
| 124 | 124 |
|
| 125 | 125 |
<LinearLayout |
| 126 | 126 |
android:id="@+id/lowerBar" |
Also available in: Unified diff
IAP: finish the 'Purschase' activity.