feat: Murine-inspired dark, minimal UI

Restyle both screens into a dark card-based Material3 look: near-black
background, rounded surface cards, muted uppercase section labels, tonal
buttons, and a filled accent Save button. Update MainActivity DND status
colors to the new palette.
This commit is contained in:
avi 2026-08-07 14:42:13 -05:00
commit c0d15761db
7 changed files with 379 additions and 208 deletions

View file

@ -4,7 +4,6 @@ import android.Manifest
import android.app.NotificationManager import android.app.NotificationManager
import android.content.Intent import android.content.Intent
import android.content.pm.PackageManager import android.content.pm.PackageManager
import android.graphics.Color
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.provider.Settings import android.provider.Settings
@ -155,7 +154,9 @@ class MainActivity : AppCompatActivity() {
} else { } else {
getString(R.string.dnd_status_denied) getString(R.string.dnd_status_denied)
} }
tvDnd.setTextColor(if (dndGranted) Color.parseColor("#4CAF50") else Color.parseColor("#F44336")) tvDnd.setTextColor(
ContextCompat.getColor(this, if (dndGranted) R.color.status_good else R.color.status_bad)
)
tvStatus.text = buildString { tvStatus.text = buildString {
append("RECEIVE_SMS: ${if (isSmsGranted()) "granted" else "NOT granted"}\n") append("RECEIVE_SMS: ${if (isSmsGranted()) "granted" else "NOT granted"}\n")

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/surface_variant" />
<corners android:radius="14dp" />
</shape>

View file

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/bg"
android:fillViewport="true"> android:fillViewport="true">
<LinearLayout <LinearLayout
@ -10,93 +12,170 @@
android:orientation="vertical" android:orientation="vertical"
android:padding="20dp"> android:padding="20dp">
<!-- Title -->
<TextView <TextView
android:id="@+id/tvStatusHeader"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginTop="8dp"
android:text="Permission Status" android:text="@string/app_name"
android:textSize="20sp" android:textColor="@color/on_surface"
android:textSize="28sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <TextView
android:id="@+id/tvStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="15sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:background="#44000000" />
<TextView
android:id="@+id/tvDndHeader"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginBottom="20dp"
android:text="Do Not Disturb Override (Critical)" android:text="@string/tagline"
android:textSize="18sp" android:textColor="@color/on_surface_muted"
android:textSize="14sp" />
<!-- Do Not Disturb card -->
<com.google.android.material.card.MaterialCardView
android:id="@+id/cardDnd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="18dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:letterSpacing="0.08"
android:text="@string/label_dnd"
android:textAllCaps="true"
android:textColor="@color/on_surface_muted"
android:textSize="12sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <TextView
android:id="@+id/tvDnd" android:id="@+id/tvDnd"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="16sp" android:layout_marginTop="6dp"
android:textSize="17sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="6dp"
android:text="@string/dnd_explanation" android:text="@string/dnd_explanation"
android:textSize="14sp" /> android:textColor="@color/on_surface_muted"
android:textSize="13sp" />
<Button <Button
android:id="@+id/btnDndSettings" android:id="@+id/btnDndSettings"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="14dp"
android:text="@string/btn_dnd_settings" /> android:text="@string/btn_dnd_settings" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<!-- Permissions card -->
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="18dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:letterSpacing="0.08"
android:text="@string/tv_permissions_header"
android:textAllCaps="true"
android:textColor="@color/on_surface_muted"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tvStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:lineSpacingExtra="3dp"
android:textColor="@color/on_surface"
android:textSize="14sp" />
<Button <Button
android:id="@+id/btnSmsSettings" android:id="@+id/btnSmsSettings"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="14dp"
android:text="@string/btn_sms_settings" /> android:text="@string/btn_sms_settings" />
<Button <Button
android:id="@+id/btnGrantNotifications" android:id="@+id/btnGrantNotifications"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:text="@string/btn_notifications" /> android:text="@string/btn_notifications" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<!-- Ring controls card -->
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="18dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:letterSpacing="0.08"
android:text="@string/tv_ring_header"
android:textAllCaps="true"
android:textColor="@color/on_surface_muted"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/commands_help"
android:textColor="@color/on_surface_muted"
android:textSize="13sp" />
<Button <Button
android:id="@+id/btnSettings" android:id="@+id/btnSettings"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="24dp" android:layout_marginTop="14dp"
android:text="@string/btn_settings" /> android:text="@string/btn_settings" />
<Button <Button
android:id="@+id/btnTestRing" android:id="@+id/btnTestRing"
style="@style/Widget.Material3.Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:backgroundTint="#C62828" android:backgroundTint="@color/status_bad"
android:textColor="@color/on_accent"
android:text="@string/btn_test_ring" /> android:text="@string/btn_test_ring" />
</LinearLayout>
<TextView </com.google.android.material.card.MaterialCardView>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/commands_help"
android:textSize="13sp" />
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>

View file

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/bg"
android:fillViewport="true"> android:fillViewport="true">
<LinearLayout <LinearLayout
@ -10,82 +12,119 @@
android:orientation="vertical" android:orientation="vertical"
android:padding="20dp"> android:padding="20dp">
<!-- Title -->
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginTop="8dp"
android:text="@string/settings_header" android:text="@string/settings_header"
android:textSize="20sp" android:textColor="@color/on_surface"
android:textSize="24sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="16dp" android:layout_marginBottom="20dp"
android:text="@string/settings_subtitle" android:text="@string/settings_subtitle"
android:textColor="@color/on_surface_muted"
android:textSize="14sp" /> android:textSize="14sp" />
<!-- Trigger phrase --> <!-- Trigger card -->
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="18dp">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="6dp" android:letterSpacing="0.08"
android:text="@string/label_trigger" android:text="@string/card_trigger"
android:textSize="16sp" android:textAllCaps="true"
android:textColor="@color/on_surface_muted"
android:textSize="12sp"
android:textStyle="bold" /> android:textStyle="bold" />
<EditText <EditText
android:id="@+id/etTrigger" android:id="@+id/etTrigger"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="text" android:layout_marginTop="10dp"
android:background="@drawable/bg_input"
android:hint="@string/hint_trigger" android:hint="@string/hint_trigger"
android:maxLines="1" /> android:inputType="text"
android:maxLines="1"
android:padding="14dp"
android:textColor="@color/on_surface"
android:textColorHint="@color/on_surface_muted"
android:textSize="15sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="4dp" android:layout_marginTop="8dp"
android:text="@string/label_trigger_note" android:text="@string/label_trigger_note"
android:textColor="@color/on_surface_muted"
android:textSize="12sp" /> android:textSize="12sp" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<View <!-- Sound card -->
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:layout_marginBottom="16dp">
android:layout_marginBottom="20dp"
android:background="#44000000" /> <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="18dp">
<!-- Sound -->
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="6dp" android:letterSpacing="0.08"
android:text="@string/label_sound" android:text="@string/card_sound"
android:textSize="16sp" android:textAllCaps="true"
android:textColor="@color/on_surface_muted"
android:textSize="12sp"
android:textStyle="bold" /> android:textStyle="bold" />
<RadioGroup <RadioGroup
android:id="@+id/rgSound" android:id="@+id/rgSound"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="vertical"> android:orientation="vertical">
<RadioButton <RadioButton
android:id="@+id/rdbRingtone" android:id="@+id/rdbRingtone"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/rdb_ringtone" /> android:text="@string/rdb_ringtone"
android:textColor="@color/on_surface"
android:textSize="15sp" />
<RadioButton <RadioButton
android:id="@+id/rdbSong" android:id="@+id/rdbSong"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/rdb_song" /> android:text="@string/rdb_song"
android:textColor="@color/on_surface"
android:textSize="15sp" />
</RadioGroup> </RadioGroup>
<Button <Button
android:id="@+id/btnPickRingtone" android:id="@+id/btnPickRingtone"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
@ -93,6 +132,7 @@
<Button <Button
android:id="@+id/btnPickSong" android:id="@+id/btnPickSong"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
@ -100,59 +140,56 @@
<TextView <TextView
android:id="@+id/tvSelectedSound" android:id="@+id/tvSelectedSound"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textColor="@color/on_surface_muted"
android:textSize="13sp" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<!-- Timing card -->
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginBottom="16dp">
android:textSize="13sp" />
<View <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:orientation="vertical"
android:layout_marginBottom="20dp" android:padding="18dp">
android:background="#44000000" />
<!-- Duration -->
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="6dp" android:letterSpacing="0.08"
android:text="@string/label_duration" android:text="@string/card_timing"
android:textSize="16sp" android:textAllCaps="true"
android:textColor="@color/on_surface_muted"
android:textSize="12sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <TextView
android:id="@+id/tvDurationValue" android:id="@+id/tvDurationValue"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="16sp" /> android:layout_marginTop="10dp"
android:textColor="@color/on_surface"
android:textSize="15sp" />
<SeekBar <SeekBar
android:id="@+id/sbDuration" android:id="@+id/sbDuration"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_duration_range"
android:textSize="12sp" />
<!-- Volume -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginBottom="6dp"
android:text="@string/label_volume"
android:textSize="16sp"
android:textStyle="bold" />
<TextView <TextView
android:id="@+id/tvVolumeValue" android:id="@+id/tvVolumeValue"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="16sp" /> android:layout_marginTop="8dp"
android:textColor="@color/on_surface"
android:textSize="15sp" />
<SeekBar <SeekBar
android:id="@+id/sbVolume" android:id="@+id/sbVolume"
@ -162,14 +199,19 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/label_volume_range" android:text="@string/label_duration_range"
android:textColor="@color/on_surface_muted"
android:textSize="12sp" /> android:textSize="12sp" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<Button <Button
android:id="@+id/btnSave" android:id="@+id/btnSave"
style="@style/Widget.Material3.Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="24dp" android:backgroundTint="@color/accent"
android:textColor="@color/on_accent"
android:text="@string/btn_save_settings" /> android:text="@string/btn_save_settings" />
</LinearLayout> </LinearLayout>

View file

@ -1,6 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="primary">#1A73E8</color> <color name="bg">#0F0F13</color>
<color name="primary_variant">#174EA6</color> <color name="surface">#1A1A21</color>
<color name="white">#FFFFFF</color> <color name="surface_variant">#23232C</color>
<color name="on_surface">#F2F2F5</color>
<color name="on_surface_muted">#8F8F9C</color>
<color name="outline">#2C2C35</color>
<color name="accent">#7C7CF0</color>
<color name="on_accent">#101016</color>
<color name="status_good">#3FB98A</color>
<color name="status_bad">#E5534B</color>
<color name="primary">@color/accent</color>
<color name="primary_variant">@color/accent</color>
<color name="white">@color/on_surface</color>
</resources> </resources>

View file

@ -2,6 +2,11 @@
<resources> <resources>
<string name="app_name">Lost My Phone</string> <string name="app_name">Lost My Phone</string>
<string name="tagline">Find your phone with an SMS</string>
<string name="label_dnd">Do Not Disturb</string>
<string name="tv_permissions_header">Permissions</string>
<string name="tv_ring_header">Ring</string>
<string name="channel_name">Ring Playback</string> <string name="channel_name">Ring Playback</string>
<string name="channel_description">Media playback channel for ring-alert playback</string> <string name="channel_description">Media playback channel for ring-alert playback</string>
@ -37,6 +42,10 @@
<string name="settings_header">Ring Settings</string> <string name="settings_header">Ring Settings</string>
<string name="settings_subtitle">Control the SMS trigger, the sound it plays, and how long it rings.</string> <string name="settings_subtitle">Control the SMS trigger, the sound it plays, and how long it rings.</string>
<string name="card_trigger">Trigger</string>
<string name="card_sound">Sound</string>
<string name="card_timing">Timing</string>
<string name="label_trigger">Trigger phrase (SMS content)</string> <string name="label_trigger">Trigger phrase (SMS content)</string>
<string name="hint_trigger">e.g. RING_NOW</string> <string name="hint_trigger">e.g. RING_NOW</string>
<string name="label_trigger_note">An incoming SMS containing exactly this text (case-insensitive, trimmed) triggers the ring.</string> <string name="label_trigger_note">An incoming SMS containing exactly this text (case-insensitive, trimmed) triggers the ring.</string>

View file

@ -1,8 +1,31 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<style name="Theme.LostMyPhone" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <style name="Theme.LostMyPhone" parent="Theme.Material3.Dark.NoActionBar">
<item name="colorPrimary">@color/primary</item> <item name="colorPrimary">@color/accent</item>
<item name="colorPrimaryVariant">@color/primary_variant</item> <item name="colorOnPrimary">@color/on_accent</item>
<item name="colorOnPrimary">@color/white</item> <item name="colorPrimaryContainer">@color/accent</item>
<item name="colorOnPrimaryContainer">@color/on_accent</item>
<item name="colorSecondary">@color/accent</item>
<item name="colorOnSecondary">@color/on_accent</item>
<item name="android:colorBackground">@color/bg</item>
<item name="colorSurface">@color/bg</item>
<item name="colorOnSurface">@color/on_surface</item>
<item name="colorOnSurfaceVariant">@color/on_surface_muted</item>
<item name="colorOutline">@color/outline</item>
<item name="android:statusBarColor">@color/bg</item>
<item name="android:navigationBarColor">@color/bg</item>
<item name="android:windowBackground">@color/bg</item>
<item name="materialCardViewStyle">@style/Widget.LostMyPhone.Card</item>
</style>
<style name="Widget.LostMyPhone.Card" parent="Widget.Material3.CardView.Filled">
<item name="cardBackgroundColor">@color/surface</item>
<item name="cardCornerRadius">20dp</item>
<item name="cardElevation">0dp</item>
<item name="strokeWidth">0dp</item>
</style> </style>
</resources> </resources>