Revision de62316a
Added by Leszek Koltunski over 4 years ago
| src/main/java/org/distorted/states/RubikStatePlay.java | ||
|---|---|---|
| 53 | 53 |
|
| 54 | 54 |
private static final int[] BUTTON_LABELS = { R.string.scores, R.string.patterns, R.string.solver, R.string.tutorials, R.string.about };
|
| 55 | 55 |
private static final int NUM_BUTTONS = BUTTON_LABELS.length; |
| 56 |
private static final float LAST_BUTTON = 1.4f;
|
|
| 56 |
private static final float LAST_BUTTON = 1.5f;
|
|
| 57 | 57 |
|
| 58 | 58 |
private ImageButton mObjButton, mMenuButton, mSolveButton; |
| 59 | 59 |
private Button mPlayButton; |
| ... | ... | |
| 505 | 505 |
mLevelValue=1; |
| 506 | 506 |
} |
| 507 | 507 |
|
| 508 |
float width = act.getScreenWidthInPixels(); |
|
| 509 |
int margin = (int)(width*RubikActivity.MARGIN); |
|
| 510 |
int padding = (int)(width*RubikActivity.PADDING); |
|
| 508 |
float width = act.getScreenWidthInPixels(); |
|
| 509 |
int margin = (int)(width*RubikActivity.MARGIN); |
|
| 510 |
int padding = (int)(width*RubikActivity.PADDING); |
|
| 511 |
int butWidth = mPlayLayoutWidth - 2*padding; |
|
| 512 |
int butHeight= (int)mMenuItemSize; |
|
| 513 |
int lastButH = (int)(mMenuItemSize*LAST_BUTTON) ; |
|
| 511 | 514 |
|
| 512 |
LinearLayout.LayoutParams pM = new LinearLayout.LayoutParams( mPlayLayoutWidth - 2*padding, (int)mMenuItemSize);
|
|
| 515 |
LinearLayout.LayoutParams pM = new LinearLayout.LayoutParams( butWidth, butHeight );
|
|
| 513 | 516 |
pM.setMargins(margin, 0, margin, margin); |
| 514 |
LinearLayout.LayoutParams pT = new LinearLayout.LayoutParams( mPlayLayoutWidth - 2*padding, (int)mMenuItemSize);
|
|
| 517 |
LinearLayout.LayoutParams pT = new LinearLayout.LayoutParams( butWidth, butHeight );
|
|
| 515 | 518 |
pT.setMargins(margin, margin, margin, margin); |
| 516 |
LinearLayout.LayoutParams pB = new LinearLayout.LayoutParams( mPlayLayoutWidth - 2*padding, (int)(mMenuItemSize*LAST_BUTTON) );
|
|
| 519 |
LinearLayout.LayoutParams pB = new LinearLayout.LayoutParams( butWidth, lastButH );
|
|
| 517 | 520 |
pB.setMargins(margin, margin, margin, 2*margin); |
| 518 | 521 |
|
| 519 | 522 |
mPlayLayout.removeAllViews(); |
Also available in: Unified diff
Minor adjustments for the UI.