Files
plexamp-lite/res/layout/activity_now_playing.xml
XoséandClaude Opus 5.5 13f29e26c4 Plexamp Lite 1.14: Android 4.1 build with ExoPlayer, lyrics, home-screen widget
- One build per Android level, as in Tenda: build/PlexampLite.apk (Android 2.2+, versionCode 1508) and
  build/PlexampLite-api16.apk (Android 4.1+, 1516), from shared src/ plus platform/api8 or platform/api16.
- Android 4.1 build: ExoPlayer 2.18.7 behind a small Engine interface (gapless hand-over to read-ahead and
  downloaded files, a longer buffer, MediaPlayer fallback for tracks it can't decode), a notification and
  lock screen with art and buttons, a resizable widget, Holo, a menu button without a Menu key, metered networks.
  R8 shrinks ExoPlayer and Guava (tools/fetch_exoplayer.sh, tools/r8-rules.pro).
- Both builds: lyrics in Now Playing as in the Mac app (timed lyrics follow and seek), a home-screen widget,
  media play/pause keys, the moon icon drawn without clipPath.
- PlexampLite-noreport on the SD card stops play reports, for tests against a real server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:41:26 +01:00

158 lines
7.9 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_lyrics_btn" style="@style/IconButton" android:contentDescription="@string/lyrics" />
<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" />
<com.minamp.LyricsView
android:id="@+id/np_lyrics"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
</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>