Revision dd874ae8
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/screens/RubikScreenBase.java | ||
---|---|---|
20 | 20 |
package org.distorted.screens; |
21 | 21 |
|
22 | 22 |
import android.app.Activity; |
23 |
import android.widget.ImageButton; |
|
24 | 23 |
import android.widget.LinearLayout; |
25 | 24 |
|
25 |
import org.distorted.helpers.TransparentImageButton; |
|
26 | 26 |
import org.distorted.main.RubikActivity; |
27 | 27 |
import org.distorted.objectlib.main.ObjectControl; |
28 | 28 |
|
... | ... | |
39 | 39 |
|
40 | 40 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
41 | 41 |
|
42 |
void createBottomPane(final RubikActivity act, float width, ImageButton button)
|
|
42 |
void createBottomPane(final RubikActivity act, TransparentImageButton left, TransparentImageButton right)
|
|
43 | 43 |
{ |
44 | 44 |
mMovesController.clearMoves(act); |
45 | 45 |
|
... | ... | |
56 | 56 |
layoutRight.setLayoutParams(params); |
57 | 57 |
|
58 | 58 |
ObjectControl control = act.getControl(); |
59 |
mMovesController.setupButton(act,control,width);
|
|
59 |
mMovesController.setupButton(act,control); |
|
60 | 60 |
layoutLeft.addView(mMovesController.getButton()); |
61 |
mLockController.setupButton(act,control,width);
|
|
61 |
mLockController.setupButton(act,control); |
|
62 | 62 |
layoutMid.addView(mLockController.getButton()); |
63 |
layoutRight.addView(button); |
|
63 |
|
|
64 |
if( left !=null ) layoutRight.addView(left); |
|
65 |
if( right!=null ) layoutRight.addView(right); |
|
64 | 66 |
|
65 | 67 |
layoutBot.addView(layoutLeft); |
66 | 68 |
layoutBot.addView(layoutMid); |
Also available in: Unified diff
Convert the theme to be a MaterialTheme and the TransparentImageButton to be a MaterialButton - the first forced by the second, and the second because a MaterialButton gives us control over the location of the icon in top of it. We need that because of the new 'solve/scramble' split-button in the lower right of the Play screen.