Project

General

Profile

« Previous | Next » 

Revision eb376d3a

Added by Leszek Koltunski about 4 years ago

Bigger 'OK' button in Dialogs.

View differences:

src/main/java/org/distorted/dialogs/RubikDialogAbout.java
58 58
    DisplayMetrics displaymetrics = new DisplayMetrics();
59 59
    act.getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
60 60
    final float titleSize= displaymetrics.widthPixels * RubikActivity.MENU_BIG_TEXT_SIZE;
61
    final float okSize   = displaymetrics.widthPixels * RubikActivity.MENU_MEDIUM_TEXT_SIZE;
61
    final float okSize   = displaymetrics.widthPixels * RubikActivity.DIALOG_BUTTON_SIZE;
62 62
    final float textSize = displaymetrics.widthPixels * RubikActivity.MENU_SMALL_TEXT_SIZE;
63 63

  
64 64
    TextView tv = (TextView) inflater.inflate(R.layout.dialog_title, null);
src/main/java/org/distorted/dialogs/RubikDialogEffects.java
225 225
    DisplayMetrics displaymetrics = new DisplayMetrics();
226 226
    act.getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
227 227
    final float titleSize= displaymetrics.widthPixels * RubikActivity.MENU_BIG_TEXT_SIZE;
228
    final float okSize   = displaymetrics.widthPixels * RubikActivity.MENU_MEDIUM_TEXT_SIZE;
228
    final float okSize   = displaymetrics.widthPixels * RubikActivity.DIALOG_BUTTON_SIZE;
229 229

  
230 230
    mTextSize = displaymetrics.widthPixels * RubikActivity.MENU_SMALL_TEXT_SIZE;
231 231

  
src/main/java/org/distorted/dialogs/RubikDialogError.java
54 54
    DisplayMetrics displaymetrics = new DisplayMetrics();
55 55
    act.getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
56 56
    final float titleSize= displaymetrics.widthPixels * RubikActivity.MENU_BIG_TEXT_SIZE;
57
    final float okSize   = displaymetrics.widthPixels * RubikActivity.MENU_MEDIUM_TEXT_SIZE;
57
    final float okSize   = displaymetrics.widthPixels * RubikActivity.DIALOG_BUTTON_SIZE;
58 58

  
59 59
    Bundle args = getArguments();
60 60
    String error;
src/main/java/org/distorted/dialogs/RubikDialogNewRecord.java
80 80
    DisplayMetrics displaymetrics = new DisplayMetrics();
81 81
    act.getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
82 82
    final float titleSize= displaymetrics.widthPixels * RubikActivity.MENU_BIG_TEXT_SIZE;
83
    final float okSize   = displaymetrics.widthPixels * RubikActivity.MENU_MEDIUM_TEXT_SIZE;
83
    final float okSize   = displaymetrics.widthPixels * RubikActivity.DIALOG_BUTTON_SIZE;
84 84
    final float textSize = displaymetrics.widthPixels * RubikActivity.MENU_BIG_TEXT_SIZE;
85 85

  
86 86
    TextView tv = (TextView) inflater.inflate(R.layout.dialog_title, null);
src/main/java/org/distorted/dialogs/RubikDialogPattern.java
62 62
    DisplayMetrics displaymetrics = new DisplayMetrics();
63 63
    act.getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
64 64
    final float titleSize= displaymetrics.widthPixels * RubikActivity.MENU_BIG_TEXT_SIZE;
65
    final float okSize   = displaymetrics.widthPixels * RubikActivity.MENU_MEDIUM_TEXT_SIZE;
65
    final float okSize   = displaymetrics.widthPixels * RubikActivity.DIALOG_BUTTON_SIZE;
66 66

  
67 67
    LayoutInflater layoutInflater = act.getLayoutInflater();
68 68
    TextView tv = (TextView) layoutInflater.inflate(R.layout.dialog_title, null);
src/main/java/org/distorted/dialogs/RubikDialogPrivacy.java
58 58
    DisplayMetrics displaymetrics = new DisplayMetrics();
59 59
    act.getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
60 60
    final float titleSize= displaymetrics.widthPixels * RubikActivity.MENU_BIG_TEXT_SIZE;
61
    final float butSize  = displaymetrics.widthPixels * RubikActivity.MENU_MEDIUM_TEXT_SIZE;
61
    final float butSize  = displaymetrics.widthPixels * RubikActivity.DIALOG_BUTTON_SIZE;
62 62

  
63 63
    TextView tv = (TextView) inflater.inflate(R.layout.dialog_title, null);
64 64
    tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, titleSize);
src/main/java/org/distorted/dialogs/RubikDialogScores.java
61 61
    DisplayMetrics displaymetrics = new DisplayMetrics();
62 62
    act.getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
63 63
    final float titleSize= displaymetrics.widthPixels * RubikActivity.MENU_BIG_TEXT_SIZE;
64
    final float okSize   = displaymetrics.widthPixels * RubikActivity.MENU_MEDIUM_TEXT_SIZE;
64
    final float okSize   = displaymetrics.widthPixels * RubikActivity.DIALOG_BUTTON_SIZE;
65 65

  
66 66
    LayoutInflater layoutInflater = act.getLayoutInflater();
67 67
    TextView tv = (TextView) layoutInflater.inflate(R.layout.dialog_title, null);
src/main/java/org/distorted/dialogs/RubikDialogSetName.java
86 86
    DisplayMetrics displaymetrics = new DisplayMetrics();
87 87
    act.getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
88 88
    final float titleSize= displaymetrics.widthPixels * RubikActivity.MENU_BIG_TEXT_SIZE;
89
    final float okSize   = displaymetrics.widthPixels * RubikActivity.MENU_MEDIUM_TEXT_SIZE;
89
    final float okSize   = displaymetrics.widthPixels * RubikActivity.DIALOG_BUTTON_SIZE;
90 90
    final float textSize = displaymetrics.widthPixels * RubikActivity.MENU_SMALL_TEXT_SIZE;
91 91

  
92 92
    Bundle args = getArguments();
src/main/java/org/distorted/dialogs/RubikDialogSolved.java
55 55
    DisplayMetrics displaymetrics = new DisplayMetrics();
56 56
    act.getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
57 57
    final float titleSize= displaymetrics.widthPixels * RubikActivity.MENU_BIG_TEXT_SIZE;
58
    final float okSize   = displaymetrics.widthPixels * RubikActivity.MENU_MEDIUM_TEXT_SIZE;
58
    final float okSize   = displaymetrics.widthPixels * RubikActivity.DIALOG_BUTTON_SIZE;
59 59
    final float textSize = displaymetrics.widthPixels * RubikActivity.MENU_BIG_TEXT_SIZE;
60 60

  
61 61
    TextView tv = (TextView) inflater.inflate(R.layout.dialog_title, null);
src/main/java/org/distorted/dialogs/RubikDialogSolverError.java
54 54
    DisplayMetrics displaymetrics = new DisplayMetrics();
55 55
    act.getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
56 56
    final float titleSize= displaymetrics.widthPixels * RubikActivity.MENU_BIG_TEXT_SIZE;
57
    final float okSize   = displaymetrics.widthPixels * RubikActivity.MENU_MEDIUM_TEXT_SIZE;
57
    final float okSize   = displaymetrics.widthPixels * RubikActivity.DIALOG_BUTTON_SIZE;
58 58
    final float textSize = displaymetrics.widthPixels * RubikActivity.MENU_BIG_TEXT_SIZE;
59 59

  
60 60
    TextView tv = (TextView) inflater.inflate(R.layout.dialog_title, null);
src/main/java/org/distorted/main/RubikActivity.java
64 64
    public static final float PATTERN_CHILD_TEXT  = 0.02f;
65 65
    public static final float SCORES_LEVEL_TEXT   = 0.035f;
66 66
    public static final float SCORES_ITEM_TEXT    = 0.030f;
67

  
68
    public static final float MENU_BIG_TEXT_SIZE   = 0.05f;
69
    public static final float MENU_MEDIUM_TEXT_SIZE= 0.04f;
70
    public static final float MENU_SMALL_TEXT_SIZE = 0.035f;
67
    public static final float DIALOG_BUTTON_SIZE  = 0.06f;
68
    public static final float MENU_BIG_TEXT_SIZE  = 0.05f;
69
    public static final float MENU_MED_TEXT_SIZE  = 0.04f;
70
    public static final float MENU_SMALL_TEXT_SIZE= 0.035f;
71 71

  
72 72
    public static final int FLAGS =  View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
73 73
                                   | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
src/main/java/org/distorted/states/RubikStatePlay.java
94 94
  void enterState(final RubikActivity act)
95 95
    {
96 96
    float width = act.getScreenWidthInPixels();
97
    mMenuTextSize = width*RubikActivity.MENU_MEDIUM_TEXT_SIZE;
97
    mMenuTextSize = width*RubikActivity.MENU_MED_TEXT_SIZE;
98 98
    mButtonSize   = width*RubikActivity.BUTTON_TEXT_SIZE;
99 99
    mMenuItemSize = width*RubikActivity.MENU_ITEM_SIZE;
100 100

  

Also available in: Unified diff