Carved out from the lofi-app monorepo. Kotlin MVVM client with HLS playback for the 20 curated lo-fi channels, including a containerized build.
238 lines
11 KiB
XML
238 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<LinearLayout 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_height="match_parent"
|
|
android:orientation="vertical">
|
|
|
|
<com.google.android.material.appbar.MaterialToolbar
|
|
android:id="@+id/toolbar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="?attr/actionBarSize"
|
|
android:background="@color/primary"
|
|
android:elevation="4dp"
|
|
app:title="@string/settings"
|
|
app:titleTextColor="@color/on_primary" />
|
|
|
|
<ScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1"
|
|
android:fillViewport="true">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp"
|
|
style="@style/Widget.LofiRadio.Card">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/streaming_mode"
|
|
android:textColor="@color/on_surface"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginBottom="4dp" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/streaming_mode_desc"
|
|
android:textColor="@color/on_surface_variant"
|
|
android:textSize="12sp"
|
|
android:layout_marginBottom="16dp" />
|
|
|
|
<RadioGroup
|
|
android:id="@+id/radio_streaming_mode"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<RadioButton
|
|
android:id="@+id/radio_server"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/mode_server"
|
|
android:textColor="@color/on_surface"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/mode_server_desc"
|
|
android:textColor="@color/on_surface_variant"
|
|
android:textSize="11sp"
|
|
android:layout_marginStart="36dp"
|
|
android:layout_marginBottom="12dp" />
|
|
|
|
<RadioButton
|
|
android:id="@+id/radio_direct"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/mode_direct"
|
|
android:textColor="@color/on_surface"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/mode_direct_desc"
|
|
android:textColor="@color/on_surface_variant"
|
|
android:textSize="11sp"
|
|
android:layout_marginStart="36dp" />
|
|
</RadioGroup>
|
|
</LinearLayout>
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp"
|
|
style="@style/Widget.LofiRadio.Card"
|
|
android:id="@+id/server_settings_card">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/server_url"
|
|
android:textColor="@color/on_surface"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginBottom="4dp" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/server_url_desc"
|
|
android:textColor="@color/on_surface_variant"
|
|
android:textSize="12sp"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/et_server_url"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="http://192.168.1.100:8000"
|
|
android:inputType="textUri"
|
|
android:textColor="@color/on_surface" />
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
</LinearLayout>
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp"
|
|
style="@style/Widget.LofiRadio.Card"
|
|
android:id="@+id/youtube_api_card">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/youtube_api_key"
|
|
android:textColor="@color/on_surface"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginBottom="4dp" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/youtube_api_key_desc"
|
|
android:textColor="@color/on_surface_variant"
|
|
android:textSize="12sp"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/et_youtube_api_key"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="AIza..."
|
|
android:inputType="text"
|
|
android:textColor="@color/on_surface" />
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
</LinearLayout>
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp"
|
|
style="@style/Widget.LofiRadio.Card">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/auto_advance"
|
|
android:textColor="@color/on_surface"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginBottom="4dp" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/auto_advance_desc"
|
|
android:textColor="@color/on_surface_variant"
|
|
android:textSize="12sp"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<Switch
|
|
android:id="@+id/switch_auto_advance"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content" />
|
|
</LinearLayout>
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Lofi Radio v1.0"
|
|
android:textColor="@color/on_surface_variant"
|
|
android:textSize="12sp"
|
|
android:gravity="center"
|
|
android:layout_marginTop="16dp" />
|
|
</LinearLayout>
|
|
</ScrollView>
|
|
</LinearLayout> |