mirror of
https://github.com/cmclark00/mintris.git
synced 2025-05-22 12:35:27 +01:00
Add random mode toggle and fix resource linking issues
This commit is contained in:
parent
0b78bf7833
commit
b2a9c40539
6 changed files with 209 additions and 100 deletions
9
app/src/main/res/drawable/menu_item_background.xml
Normal file
9
app/src/main/res/drawable/menu_item_background.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="8dp" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#33FFFFFF" />
|
||||
<solid android:color="#1AFFFFFF" />
|
||||
</shape>
|
|
@ -691,6 +691,37 @@
|
|||
android:focusable="true"
|
||||
android:focusableInTouchMode="true" />
|
||||
|
||||
<!-- Random Mode Switch -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@drawable/menu_section_background"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/random_mode"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="sans-serif" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/randomModeSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Block Skin Selector -->
|
||||
<com.mintris.ui.BlockSkinSelector
|
||||
android:id="@+id/customizationBlockSkinSelector"
|
||||
|
|
|
@ -602,7 +602,38 @@
|
|||
<com.mintris.ui.BlockSkinSelector
|
||||
android:id="@+id/customizationBlockSkinSelector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/menu_item_background"
|
||||
android:padding="16dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/randomModeContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/menu_item_background"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/random_mode"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/randomModeSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleX="1.5"
|
||||
android:scaleY="1.5"
|
||||
android:thumbTint="@color/switch_thumb_color"
|
||||
android:trackTint="@color/switch_track_color" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Back Button -->
|
||||
<Button
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="black">#000000</color>
|
||||
<color name="white">#FFFFFF</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="gray_dark">#222222</color>
|
||||
<color name="gray_light">#CCCCCC</color>
|
||||
<color name="transparent">#00000000</color>
|
||||
<color name="switch_track_color">#33FFFFFF</color>
|
||||
<color name="switch_thumb_color">#FFFFFF</color>
|
||||
</resources>
|
|
@ -48,4 +48,5 @@
|
|||
<string name="reset_stats">reset stats</string>
|
||||
<string name="music">music</string>
|
||||
<string name="customization">Customization</string>
|
||||
<string name="random_mode">Random Mode</string>
|
||||
</resources>
|
Loading…
Add table
Add a link
Reference in a new issue