Project

General

Profile

« Previous | Next » 

Revision 83e021c5

Added by Leszek Koltunski about 2 years ago

Bandaged 3x3 UI: progress

View differences:

src/main/java/org/distorted/bandaged/BandagedCreatorObjectView.java
61 61
    int lMargin  = (int)(width*RubikActivity.LARGE_MARGIN);
62 62
    int textSize = (int)(width*RubikActivity.BUTTON_TEXT_SIZE);
63 63

  
64
    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( (int)(width*0.35f), LinearLayout.LayoutParams.MATCH_PARENT);
64
    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( (int)(width*0.36f), LinearLayout.LayoutParams.MATCH_PARENT);
65 65
    params.bottomMargin = lMargin;
66 66
    params.topMargin    = lMargin;
67 67
    params.leftMargin   = leftmost ? lMargin : 0;
......
72 72
    LinearLayout bottom = mPane.findViewById(R.id.bandagedCreatorObjectLayout);
73 73

  
74 74
    TransparentButton plaButton = new TransparentButton(act, R.string.play, textSize);
75
    plaButton.setSingleLine();
75 76

  
76
    final int icon = RubikActivity.getDrawable(R.drawable.ui_small_trash,R.drawable.ui_medium_trash, R.drawable.ui_big_trash, R.drawable.ui_huge_trash);
77
    final int icon = R.drawable.ui_trash;
77 78
    LinearLayout.LayoutParams paramsB = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,3.0f);
78 79
    TransparentImageButton delButton = new TransparentImageButton(act, icon, TransparentImageButton.GRAVITY_MIDDLE, paramsB);
79 80

  
81
    int height = act.getScreenHeightInPixels();
82
    int iconHeight = (int)(0.15f*(BandagedCreatorActivity.RATIO_SCROLL-2*RubikActivity.PADDING)*height);
83
    delButton.setIconSize(iconHeight);
84

  
80 85
    bottom.addView(plaButton);
81 86
    bottom.addView(delButton);
82 87

  

Also available in: Unified diff