Revision cc0fc0c5
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/purchase/PurchaseScreenPane.java | ||
---|---|---|
51 | 51 |
|
52 | 52 |
private static final int NUM_IMAGES = IMAGES.length; |
53 | 53 |
public static final float PADDING_RATIO = 0.017f; |
54 |
private static final float TEXT_RATIO = 0.032f; |
|
54 |
private static final float TEXT_RATIO_1 = 0.032f; |
|
55 |
private static final float TEXT_RATIO_2 = 0.020f; |
|
55 | 56 |
|
56 | 57 |
private final WeakReference<PurchaseActivity> mAct; |
57 | 58 |
private RubikObject mObject; |
... | ... | |
221 | 222 |
{ |
222 | 223 |
mAct = new WeakReference<>(act); |
223 | 224 |
int height = act.getScreenHeightInPixels(); |
224 |
float textSize = height*TEXT_RATIO; |
|
225 |
float textSize1 = height*TEXT_RATIO_1; |
|
226 |
float textSize2 = height*TEXT_RATIO_2; |
|
225 | 227 |
int margin = (int)(height*PADDING_RATIO); |
226 | 228 |
int padding = margin/3; |
227 | 229 |
|
... | ... | |
257 | 259 |
|
258 | 260 |
TextView text; |
259 | 261 |
text = upperBar.findViewById(R.id.purchaseUpperName); |
260 |
text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize); |
|
262 |
text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize1);
|
|
261 | 263 |
text = upperBar.findViewById(R.id.purchaseUpperAuthor); |
262 |
text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize); |
|
264 |
text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize2);
|
|
263 | 265 |
text = oneLayout.findViewById(R.id.purchaseTextOne); |
264 |
text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize); |
|
266 |
text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize1);
|
|
265 | 267 |
text = allLayout.findViewById(R.id.purchaseTextAll); |
266 |
text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize); |
|
268 |
text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize1);
|
|
267 | 269 |
|
268 | 270 |
setUpButtons(act,oneLayout,allLayout); |
269 | 271 |
} |
src/main/java/org/distorted/screens/RubikScreenPlay.java | ||
---|---|---|
57 | 57 |
|
58 | 58 |
public class RubikScreenPlay extends RubikScreenBase implements RubikNetwork.Updatee |
59 | 59 |
{ |
60 |
private static final float MENU_BUTTON_HEIGHT = 0.075f;
|
|
61 |
private static final float MENU_TEXT_SIZE = 0.032f;
|
|
60 |
private static final float MENU_BUTTON_HEIGHT = 0.068f;
|
|
61 |
private static final float MENU_TEXT_SIZE = 0.027f;
|
|
62 | 62 |
private static final float MENU_MARGIN = 0.008f; |
63 | 63 |
|
64 | 64 |
public static final int NUM_COLUMNS = 5; |
src/main/res/layout/dialog_stars_status.xml | ||
---|---|---|
50 | 50 |
android:layout_width="0dp" |
51 | 51 |
android:layout_height="wrap_content" |
52 | 52 |
android:layout_weight="1.5" |
53 |
android:padding="5dp" |
|
53 | 54 |
android:layout_gravity="center_vertical|start" |
54 | 55 |
android:scaleType="fitStart" |
55 | 56 |
android:src="@drawable/price_50" |
... | ... | |
78 | 79 |
android:layout_width="0dp" |
79 | 80 |
android:layout_height="wrap_content" |
80 | 81 |
android:layout_weight="1.5" |
82 |
android:padding="5dp" |
|
81 | 83 |
android:layout_gravity="center_vertical|start" |
82 | 84 |
android:scaleType="fitStart" |
83 | 85 |
android:src="@drawable/price_200" |
... | ... | |
106 | 108 |
android:layout_width="0dp" |
107 | 109 |
android:layout_height="wrap_content" |
108 | 110 |
android:layout_weight="1.5" |
111 |
android:padding="5dp" |
|
109 | 112 |
android:layout_gravity="center_vertical|start" |
110 | 113 |
android:scaleType="fitStart" |
111 | 114 |
android:src="@drawable/price_600" |
Also available in: Unified diff
Further improvements for the UI.