Project

General

Profile

« Previous | Next » 

Revision 4c650458

Added by Leszek Koltunski over 2 years ago

Minor.

View differences:

src/main/java/org/distorted/screens/RubikScreenPlay.java
246 246
    mObjectSize = (int)(cubeWidth + 2*margin + 0.5f);
247 247
    mMaxRowCount = (int)((height-1.8f*mUpperBarHeight)/mObjectSize);
248 248
    int layoutH = (int)(1.5f*mObjectSize);
249
    int viewID = R.layout.popup_object;
249 250

  
250
    int viewID = mMaxRowCount<mRowCount ? R.layout.popup_object_withscroll : R.layout.popup_object_scrollless;
251
    View view = inflate( act, viewID, null);
251
    LinearLayout view = (LinearLayout)inflate( act, viewID, null);
252 252
    GridLayout objectGrid = view.findViewById(R.id.objectGrid);
253 253

  
254 254
    GridLayout.Spec[] rowSpecs = new GridLayout.Spec[mRowCount];
......
407 407

  
408 408
  void setupBottomLayout(final RubikActivity act, final LinearLayout layout, int width)
409 409
    {
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);
410
    int iconT = RubikActivity.getDrawable(R.drawable.ui_small_tutorial,R.drawable.ui_medium_tutorial, R.drawable.ui_big_tutorial, R.drawable.ui_huge_tutorial);
411
    LinearLayout.LayoutParams paramsT = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,LinearLayout.LayoutParams.MATCH_PARENT,1.0f);
412
    TransparentImageButton buttonTut = new TransparentImageButton(act, iconT, TransparentImageButton.GRAVITY_MIDDLE, paramsT);
413 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
    int iconD = RubikActivity.getDrawable(R.drawable.ui_small_info,R.drawable.ui_medium_info, R.drawable.ui_big_info, R.drawable.ui_huge_info);
415
    LinearLayout.LayoutParams paramsD = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,LinearLayout.LayoutParams.MATCH_PARENT,1.0f);
416
    TransparentImageButton buttonDet = new TransparentImageButton(act, iconD, TransparentImageButton.GRAVITY_MIDDLE, paramsD);
417 417

  
418 418
    buttonTut.setOnClickListener( new View.OnClickListener()
419 419
      {
420 420
      @Override
421 421
      public void onClick(View v)
422 422
        {
423
        android.util.Log.e("D", "BUTTON TUT CLICKED!!");
423
        if( mObjectPopup!=null ) mObjectPopup.dismiss();
424
        RubikDialogTutorial tDiag = new RubikDialogTutorial();
425
        tDiag.show( act.getSupportFragmentManager(), RubikDialogTutorial.getDialogTag() );
424 426
        }
425 427
      });
426 428

  
......
433 435
        }
434 436
      });
435 437

  
436
    LinearLayout.LayoutParams paramsNul = new LinearLayout.LayoutParams(width,LinearLayout.LayoutParams.MATCH_PARENT,1.0f);
438
    LinearLayout.LayoutParams paramsNul = new LinearLayout.LayoutParams(width,LinearLayout.LayoutParams.MATCH_PARENT,2.0f);
437 439
    Button buttonNul = new Button(act);
438 440
    buttonNul.setLayoutParams(paramsNul);
439 441
    buttonNul.setVisibility(View.INVISIBLE);

Also available in: Unified diff