Files
Playtube-Android/app/src/main/res/layout/activity_jam.xml
T
FojadrachiandClaude Opus 5.5 3b3b746329 feat: Playtube Jam – gemeinsam hoeren, synchron auf dem eigenen Handy (1.4.0)
Jam starten (laufender Song wird der erste) oder per Code/Link beitreten, Jam-Ansicht
im Stil von "PC steuern": Teilnehmer, Warteschlange, Einladen per Teilen/Kopieren,
Host-Rechte. Die YouTube-Music-WebView gleicht sich mit dem Jam ab; Benachrichtigung
und Kopfhoerertasten steuern im Jam den Jam. App-Links jam.fojadrachi.de,
playtube://jam/<CODE> und "Teilen" von YouTube-Links. OkHttp fuer den WebSocket.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 01:36:55 +01:00

494 lines
22 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Playtube Jam (JamActivity): dunkel, Lila/Pink wie "PC steuern". -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/jamRoot"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/remote_background"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="56dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="8dp"
android:paddingEnd="16dp">
<ImageButton
android:id="@+id/jamBack"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/pc_back_to_player"
android:src="@drawable/ic_keyboard_arrow_down" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_weight="1"
android:text="@string/jam_title"
android:textColor="@color/text"
android:textSize="24sp"
android:textStyle="bold" />
<Button
android:id="@+id/jamLeave"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/jam_leave"
android:textColor="@color/text_muted"
android:visibility="gone" />
</LinearLayout>
<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:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingBottom="24dp">
<TextView
android:id="@+id/jamStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:textColor="@color/text_muted"
android:textSize="14sp" />
<!-- Noch in keinem Jam -->
<LinearLayout
android:id="@+id/jamSetup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_card"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/jam_intro"
android:textColor="@color/text_muted"
android:textSize="14sp" />
<EditText
android:id="@+id/jamName"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="16dp"
android:background="@drawable/bg_input"
android:hint="@string/jam_name_hint"
android:importantForAutofill="no"
android:inputType="textPersonName|textCapWords"
android:maxLength="32"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:textColor="@color/text"
android:textColorHint="@color/text_muted" />
<Button
android:id="@+id/jamStart"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="12dp"
android:background="@drawable/bg_brand_button"
android:text="@string/jam_start"
android:textAllCaps="false"
android:textColor="@color/text"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/jam_start_hint"
android:textColor="@color/text_muted"
android:textSize="12sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:orientation="horizontal">
<EditText
android:id="@+id/jamCode"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:background="@drawable/bg_input"
android:hint="@string/jam_code_hint"
android:importantForAutofill="no"
android:inputType="textCapCharacters|textNoSuggestions"
android:maxLength="60"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:textColor="@color/text"
android:textColorHint="@color/text_muted" />
<Button
android:id="@+id/jamJoin"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_marginStart="8dp"
android:background="@drawable/bg_brand_button"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:text="@string/jam_join"
android:textAllCaps="false"
android:textColor="@color/text"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
<!-- Im Jam -->
<LinearLayout
android:id="@+id/jamPanel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<!-- Läuft gerade -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_card"
android:orientation="vertical"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/jamCover"
android:layout_width="96dp"
android:layout_height="54dp"
android:background="@drawable/bg_tile"
android:contentDescription="@string/pc_cover"
android:scaleType="centerCrop" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/jamNowTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/text"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/jamNowArtist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/text_muted"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/jamCantPlay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/jam_cant_play_here"
android:textColor="#FCA5A5"
android:textSize="13sp"
android:visibility="gone" />
<SeekBar
android:id="@+id/jamSeek"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:max="1000"
android:progressTint="@color/brand_to"
android:thumbTint="@color/text" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<TextView
android:id="@+id/jamTime"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/text_muted"
android:textSize="12sp" />
<TextView
android:id="@+id/jamDuration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_muted"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center"
android:orientation="horizontal">
<ImageButton
android:id="@+id/jamPrevious"
android:layout_width="56dp"
android:layout_height="56dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/jam_previous"
android:src="@drawable/ic_skip_previous" />
<ImageButton
android:id="@+id/jamPlayPause"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:background="@drawable/bg_play_button"
android:contentDescription="@string/jam_play_pause"
android:padding="16dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_play" />
<ImageButton
android:id="@+id/jamNext"
android:layout_width="56dp"
android:layout_height="56dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/jam_next"
android:src="@drawable/ic_skip_next" />
</LinearLayout>
</LinearLayout>
<!-- Hinzufügen und Warteschlange -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:background="@drawable/bg_card"
android:orientation="vertical"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<EditText
android:id="@+id/jamAddInput"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:background="@drawable/bg_input"
android:hint="@string/jam_add_hint"
android:imeOptions="actionGo"
android:importantForAutofill="no"
android:inputType="text"
android:maxLength="200"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:textColor="@color/text"
android:textColorHint="@color/text_muted" />
<Button
android:id="@+id/jamAddButton"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_marginStart="8dp"
android:background="@drawable/bg_brand_button"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:text="@string/jam_add"
android:textAllCaps="false"
android:textColor="@color/text"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/jam_add_hint_share"
android:textColor="@color/text_muted"
android:textSize="12sp" />
<LinearLayout
android:id="@+id/jamResults"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="vertical" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/jam_queue"
android:textColor="@color/text"
android:textSize="16sp"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/jamQueue"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</LinearLayout>
<!-- Einladen -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:background="@drawable/bg_card"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/jam_invite"
android:textColor="@color/text"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/jamInviteCode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:letterSpacing="0.1"
android:textColor="@color/text"
android:textSize="28sp"
android:textStyle="bold" />
<TextView
android:id="@+id/jamInviteLink"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/text_muted"
android:textIsSelectable="true"
android:textSize="13sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<Button
android:id="@+id/jamShare"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_weight="1"
android:background="@drawable/bg_brand_button"
android:text="@string/jam_share"
android:textAllCaps="false"
android:textColor="@color/text" />
<Button
android:id="@+id/jamCopy"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_marginStart="8dp"
android:layout_weight="1"
android:background="@drawable/bg_input"
android:text="@string/jam_copy"
android:textAllCaps="false"
android:textColor="@color/text" />
</LinearLayout>
</LinearLayout>
<!-- Nur für den Host -->
<LinearLayout
android:id="@+id/jamHostBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:background="@drawable/bg_card"
android:orientation="vertical"
android:padding="16dp">
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/jamAllControl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/jam_all_control"
android:textColor="@color/text"
android:textSize="15sp" />
<Button
android:id="@+id/jamEnd"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="@string/jam_end"
android:textAllCaps="false"
android:textColor="#F87171" />
</LinearLayout>
<!-- Teilnehmer -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:background="@drawable/bg_card"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/jam_members"
android:textColor="@color/text"
android:textSize="16sp"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/jamMembers"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/jam_play_hint"
android:textColor="@color/text_muted"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>