|
36 | 36 | android:text="@string/classic_label" |
37 | 37 | android:textColor="@color/classic_accent" /> |
38 | 38 |
|
39 | | - <LinearLayout |
| 39 | + <FrameLayout |
40 | 40 | android:layout_width="match_parent" |
41 | 41 | android:layout_height="wrap_content" |
42 | | - android:layout_marginTop="16dp" |
43 | | - android:orientation="horizontal"> |
44 | | - |
45 | | - <com.google.android.material.button.MaterialButton |
46 | | - android:id="@+id/classic_resume_button" |
47 | | - style="@style/Widget.Material3.Button" |
48 | | - android:layout_width="0dp" |
49 | | - android:layout_height="wrap_content" |
50 | | - android:layout_marginEnd="4dp" |
51 | | - android:layout_weight="1" |
52 | | - android:text="@string/resume_game" |
53 | | - android:theme="@style/ClassicButtonTheme" |
54 | | - android:visibility="gone" /> |
| 42 | + android:layout_marginTop="16dp"> |
55 | 43 |
|
56 | 44 | <com.google.android.material.button.MaterialButton |
57 | 45 | android:id="@+id/classic_new_game_button" |
58 | 46 | style="@style/Widget.Material3.Button" |
59 | | - android:layout_width="0dp" |
| 47 | + android:layout_width="match_parent" |
60 | 48 | android:layout_height="wrap_content" |
61 | | - android:layout_marginStart="4dp" |
62 | | - android:layout_weight="1" |
63 | 49 | android:text="@string/new_game" |
64 | 50 | android:theme="@style/ClassicButtonTheme" /> |
65 | | - </LinearLayout> |
| 51 | + |
| 52 | + <com.google.android.material.button.MaterialButtonToggleGroup |
| 53 | + android:id="@+id/classic_split_button_group" |
| 54 | + android:layout_width="match_parent" |
| 55 | + android:layout_height="wrap_content" |
| 56 | + android:visibility="gone" |
| 57 | + app:singleSelection="true"> |
| 58 | + |
| 59 | + <com.google.android.material.button.MaterialButton |
| 60 | + android:id="@+id/classic_resume_button" |
| 61 | + style="@style/Widget.Material3.Button" |
| 62 | + android:layout_width="0dp" |
| 63 | + android:layout_height="wrap_content" |
| 64 | + android:layout_marginEnd="2dp" |
| 65 | + android:layout_weight="1" |
| 66 | + android:text="@string/resume_game" |
| 67 | + android:theme="@style/ClassicButtonTheme" |
| 68 | + app:shapeAppearanceOverlay="@style/SplitButtonLeft" /> |
| 69 | + |
| 70 | + <com.google.android.material.button.MaterialButton |
| 71 | + android:id="@+id/classic_dropdown_button" |
| 72 | + style="@style/Widget.Material3.Button" |
| 73 | + android:layout_width="48dp" |
| 74 | + android:layout_height="wrap_content" |
| 75 | + android:insetLeft="0dp" |
| 76 | + android:insetRight="0dp" |
| 77 | + android:padding="0dp" |
| 78 | + android:theme="@style/ClassicButtonTheme" |
| 79 | + app:icon="@drawable/ic_expand_more" |
| 80 | + app:iconGravity="textStart" |
| 81 | + app:iconPadding="0dp" |
| 82 | + app:shapeAppearanceOverlay="@style/SplitButtonRight" /> |
| 83 | + |
| 84 | + </com.google.android.material.button.MaterialButtonToggleGroup> |
| 85 | + </FrameLayout> |
66 | 86 |
|
67 | 87 | <com.google.android.material.button.MaterialButton |
68 | 88 | android:id="@+id/classic_statistics_button" |
|
94 | 114 | android:text="@string/arcade_label" |
95 | 115 | android:textColor="@color/arcade_accent" /> |
96 | 116 |
|
97 | | - <LinearLayout |
| 117 | + <FrameLayout |
98 | 118 | android:layout_width="match_parent" |
99 | 119 | android:layout_height="wrap_content" |
100 | | - android:layout_marginTop="16dp" |
101 | | - android:orientation="horizontal"> |
102 | | - |
103 | | - <com.google.android.material.button.MaterialButton |
104 | | - android:id="@+id/arcade_resume_button" |
105 | | - style="@style/Widget.Material3.Button" |
106 | | - android:layout_width="0dp" |
107 | | - android:layout_height="wrap_content" |
108 | | - android:layout_marginEnd="4dp" |
109 | | - android:layout_weight="1" |
110 | | - android:text="@string/resume_game" |
111 | | - android:theme="@style/ArcadeButtonTheme" |
112 | | - android:visibility="gone" /> |
| 120 | + android:layout_marginTop="16dp"> |
113 | 121 |
|
114 | 122 | <com.google.android.material.button.MaterialButton |
115 | 123 | android:id="@+id/arcade_new_game_button" |
116 | 124 | style="@style/Widget.Material3.Button" |
117 | | - android:layout_width="0dp" |
| 125 | + android:layout_width="match_parent" |
118 | 126 | android:layout_height="wrap_content" |
119 | | - android:layout_marginStart="4dp" |
120 | | - android:layout_weight="1" |
121 | 127 | android:text="@string/new_game" |
122 | 128 | android:theme="@style/ArcadeButtonTheme" /> |
123 | | - </LinearLayout> |
| 129 | + |
| 130 | + <com.google.android.material.button.MaterialButtonToggleGroup |
| 131 | + android:id="@+id/arcade_split_button_group" |
| 132 | + android:layout_width="match_parent" |
| 133 | + android:layout_height="wrap_content" |
| 134 | + android:visibility="gone" |
| 135 | + app:singleSelection="true"> |
| 136 | + |
| 137 | + <com.google.android.material.button.MaterialButton |
| 138 | + android:id="@+id/arcade_resume_button" |
| 139 | + style="@style/Widget.Material3.Button" |
| 140 | + android:layout_width="0dp" |
| 141 | + android:layout_height="wrap_content" |
| 142 | + android:layout_marginEnd="2dp" |
| 143 | + android:layout_weight="1" |
| 144 | + android:text="@string/resume_game" |
| 145 | + android:theme="@style/ArcadeButtonTheme" |
| 146 | + app:shapeAppearanceOverlay="@style/SplitButtonLeft" /> |
| 147 | + |
| 148 | + <com.google.android.material.button.MaterialButton |
| 149 | + android:id="@+id/arcade_dropdown_button" |
| 150 | + style="@style/Widget.Material3.Button" |
| 151 | + android:layout_width="48dp" |
| 152 | + android:layout_height="wrap_content" |
| 153 | + android:insetLeft="0dp" |
| 154 | + android:insetRight="0dp" |
| 155 | + android:padding="0dp" |
| 156 | + android:theme="@style/ArcadeButtonTheme" |
| 157 | + app:icon="@drawable/ic_expand_more" |
| 158 | + app:iconGravity="textStart" |
| 159 | + app:iconPadding="0dp" |
| 160 | + app:shapeAppearanceOverlay="@style/SplitButtonRight" /> |
| 161 | + |
| 162 | + </com.google.android.material.button.MaterialButtonToggleGroup> |
| 163 | + </FrameLayout> |
124 | 164 |
|
125 | 165 | <com.google.android.material.button.MaterialButton |
126 | 166 | android:id="@+id/arcade_statistics_button" |
|
0 commit comments