71 |
71 |
private static final float LAST_BUTTON = 1.5f;
|
72 |
72 |
private static final int[] mLocation = new int[2];
|
73 |
73 |
|
74 |
|
private TransparentImageButton mObjButton, mMenuButton, mSolveButton, mScrambleButton, mDetailsButton;
|
|
74 |
private TransparentImageButton mObjButton, mMenuButton, mSolveButton, mScrambleButton;
|
75 |
75 |
private TransparentButton mPlayButton;
|
76 |
76 |
private PopupWindow mObjectPopup, mMenuPopup, mPlayPopup;
|
77 |
77 |
private ObjectType mObject = DEF_OBJECT;
|
... | ... | |
258 |
258 |
objectGrid.setRowCount(mRowCount);
|
259 |
259 |
|
260 |
260 |
LinearLayout bottomLayout = view.findViewById(R.id.bottomLayout);
|
261 |
|
setupDetailsButton(act,layoutH);
|
262 |
|
bottomLayout.addView(mDetailsButton);
|
|
261 |
setupBottomLayout(act,bottomLayout,layoutH);
|
263 |
262 |
|
264 |
263 |
ViewGroup.LayoutParams paramsB = bottomLayout.getLayoutParams();
|
265 |
264 |
paramsB.height = layoutH;
|
... | ... | |
406 |
405 |
|
407 |
406 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
408 |
407 |
|
409 |
|
void setupDetailsButton(final RubikActivity act, int width)
|
|
408 |
void setupBottomLayout(final RubikActivity act, final LinearLayout layout, int width)
|
410 |
409 |
{
|
411 |
|
int icon = RubikActivity.getDrawable(R.drawable.ui_small_cube_solve_new,R.drawable.ui_medium_cube_solve_new, R.drawable.ui_big_cube_solve_new, R.drawable.ui_huge_cube_solve_new);
|
412 |
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(width,LinearLayout.LayoutParams.MATCH_PARENT);
|
413 |
|
mDetailsButton = new TransparentImageButton(act, icon, TransparentImageButton.GRAVITY_MIDDLE, params);
|
|
410 |
int icon1 = RubikActivity.getDrawable(R.drawable.ui_small_cube_solve_new,R.drawable.ui_medium_cube_solve_new, R.drawable.ui_big_cube_solve_new, R.drawable.ui_huge_cube_solve_new);
|
|
411 |
LinearLayout.LayoutParams params1 = new LinearLayout.LayoutParams(width,LinearLayout.LayoutParams.MATCH_PARENT,1.0f);
|
|
412 |
TransparentImageButton buttonTut = new TransparentImageButton(act, icon1, TransparentImageButton.GRAVITY_MIDDLE, params1);
|
|
413 |
|
|
414 |
int icon2 = RubikActivity.getDrawable(R.drawable.ui_small_cube_solve_new,R.drawable.ui_medium_cube_solve_new, R.drawable.ui_big_cube_solve_new, R.drawable.ui_huge_cube_solve_new);
|
|
415 |
LinearLayout.LayoutParams params2 = new LinearLayout.LayoutParams(width,LinearLayout.LayoutParams.MATCH_PARENT,1.0f);
|
|
416 |
TransparentImageButton buttonDet = new TransparentImageButton(act, icon2, TransparentImageButton.GRAVITY_MIDDLE, params2);
|
414 |
417 |
|
415 |
|
mDetailsButton.setOnClickListener( new View.OnClickListener()
|
|
418 |
buttonTut.setOnClickListener( new View.OnClickListener()
|
416 |
419 |
{
|
417 |
420 |
@Override
|
418 |
421 |
public void onClick(View v)
|
419 |
422 |
{
|
420 |
|
android.util.Log.e("D", "DETAILS CLICKED!!");
|
|
423 |
android.util.Log.e("D", "BUTTON TUT CLICKED!!");
|
421 |
424 |
}
|
422 |
425 |
});
|
|
426 |
|
|
427 |
buttonDet.setOnClickListener( new View.OnClickListener()
|
|
428 |
{
|
|
429 |
@Override
|
|
430 |
public void onClick(View v)
|
|
431 |
{
|
|
432 |
android.util.Log.e("D", "BUTTON DET CLICKED!!");
|
|
433 |
}
|
|
434 |
});
|
|
435 |
|
|
436 |
LinearLayout.LayoutParams paramsNul = new LinearLayout.LayoutParams(width,LinearLayout.LayoutParams.MATCH_PARENT,1.0f);
|
|
437 |
Button buttonNul = new Button(act);
|
|
438 |
buttonNul.setLayoutParams(paramsNul);
|
|
439 |
buttonNul.setVisibility(View.INVISIBLE);
|
|
440 |
|
|
441 |
layout.addView(buttonTut);
|
|
442 |
layout.addView(buttonNul);
|
|
443 |
layout.addView(buttonDet);
|
423 |
444 |
}
|
424 |
445 |
|
425 |
446 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
Add info pane: some progress2.