Files
plexamp-lite/res/layout/activity_now_playing.xml
xockoandClaude Opus 5.5 bbdab09f83 Minamp 1.6: adjustable UI size, larger text and controls
- New setting "Text and button size" (Normal / Large / Extra large): scales
  text, icons and buttons on top of the phone's density (App.UI_SCALES)
- Larger default text, rows, tiles, touch targets and player icons; all sizes
  now live in res/values/dimens.xml
- Seek bar knob drawn in code, since Android 2.x caches XML shapes at the
  size they were first loaded
- Full-width buttons wrap to two lines instead of cutting words off
- Shorter labels so they fit 240x320 screens in both languages
- tools/check_fit.py checks that UI texts fit their slots at every size and
  language using Droid Sans metrics; build.sh runs it and setup_toolchain.sh
  fetches the font

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 08:02:49 +02:00

152 lines
7.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/np_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/np_topbar"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingLeft="2dp"
android:paddingRight="2dp">
<ImageButton android:id="@+id/np_down" style="@style/IconButton" />
<LinearLayout
android:layout_width="0dp" android:layout_height="wrap_content"
android:layout_weight="1" android:orientation="vertical" android:gravity="center">
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="@string/playing_from" android:textSize="@dimen/text_tiny" android:textStyle="bold"
android:textColor="@color/text2" android:singleLine="true" />
<TextView android:id="@+id/np_from" style="@style/Sub"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/text" android:textSize="@dimen/text_sub" />
</LinearLayout>
<ImageButton android:id="@+id/np_queue" style="@style/IconButton" />
</LinearLayout>
<FrameLayout
android:id="@+id/np_art_box"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingTop="2dp"
android:paddingBottom="4dp">
<com.minamp.SquareImageView
android:id="@+id/np_art"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:scaleType="centerCrop" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:paddingRight="4dp">
<LinearLayout
android:layout_width="0dp" android:layout_height="wrap_content"
android:layout_weight="1" android:orientation="vertical">
<TextView android:id="@+id/np_title" style="@style/Title"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:textSize="@dimen/text_np_title" />
<TextView android:id="@+id/np_sub" style="@style/Sub"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:textSize="@dimen/text_np_sub" android:textColor="#CCFFFFFF" />
</LinearLayout>
<ImageButton android:id="@+id/np_love" style="@style/IconButton" />
</LinearLayout>
<SeekBar
android:id="@+id/np_seek"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="1000"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="6dp"
android:paddingBottom="2dp"
android:thumbOffset="10dp"
android:maxHeight="@dimen/seek_track"
android:minHeight="@dimen/seek_track"
android:progressDrawable="@drawable/seek_progress"
android:thumb="@drawable/seek_thumb" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<TextView android:id="@+id/np_elapsed"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="@dimen/text_tiny" android:textColor="#CCFFFFFF" />
<TextView android:id="@+id/np_status"
android:layout_width="0dp" android:layout_height="wrap_content"
android:layout_weight="1" android:gravity="center"
android:textSize="@dimen/text_tiny" android:textColor="#CCFFFFFF"
android:singleLine="true" android:ellipsize="end"
android:paddingLeft="4dp" android:paddingRight="4dp" />
<TextView android:id="@+id/np_remaining"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="@dimen/text_tiny" android:textColor="#CCFFFFFF" />
</LinearLayout>
<!-- five equal cells: never wider than the screen, whatever the UI size -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/np_controls"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingLeft="4dp"
android:paddingRight="4dp">
<ImageButton android:id="@+id/np_shuffle" style="@style/IconButton"
android:layout_width="0dp" android:layout_weight="1" />
<ImageButton android:id="@+id/np_prev" style="@style/IconButton"
android:layout_width="0dp" android:layout_weight="1" android:layout_height="@dimen/np_play" />
<FrameLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1.3">
<ImageButton android:id="@+id/np_play"
android:layout_width="@dimen/np_play" android:layout_height="@dimen/np_play"
android:layout_gravity="center"
android:background="@drawable/bg_play_circle" android:scaleType="center" />
</FrameLayout>
<ImageButton android:id="@+id/np_next" style="@style/IconButton"
android:layout_width="0dp" android:layout_weight="1" android:layout_height="@dimen/np_play" />
<ImageButton android:id="@+id/np_repeat" style="@style/IconButton"
android:layout_width="0dp" android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/np_bottom"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:layout_marginBottom="2dp">
<LinearLayout android:id="@+id/np_sleep"
android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent"
android:orientation="horizontal" android:gravity="center_vertical"
android:background="@drawable/bg_pressable" android:paddingLeft="8dp" android:paddingRight="8dp">
<ImageView android:id="@+id/np_sleep_icon"
android:layout_width="@dimen/np_small_icon" android:layout_height="@dimen/np_small_icon" />
<TextView android:id="@+id/np_sleep_text"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="@dimen/text_np_small" android:textColor="#CCFFFFFF" android:paddingLeft="6dp"
android:singleLine="true" android:ellipsize="end"
android:text="@string/sleep" />
</LinearLayout>
<TextView android:id="@+id/np_artist_link"
android:layout_width="wrap_content" android:layout_height="match_parent"
android:gravity="center_vertical" android:background="@drawable/bg_pressable"
android:paddingLeft="8dp" android:paddingRight="8dp" android:singleLine="true"
android:textSize="@dimen/text_np_small" android:textColor="#CCFFFFFF" android:text="@string/album_link" />
</LinearLayout>
</LinearLayout>