Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix now playing bug layout #1125

Merged
merged 3 commits into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ private void setInfo(BaseItemDto item) {
Glide.with(context)
.load(ImageUtils.getPrimaryImageUrl(item, get(ApiClient.class)))
.error(R.drawable.ic_album)
.override(35, 35)
.centerInside()
.into(npIcon);
currentDuration = TimeUtils.formatMillis(item.getRunTimeTicks() != null ? item.getRunTimeTicks() / 10000 : 0);
Expand Down
44 changes: 26 additions & 18 deletions app/src/main/res/layout/now_playing_bug.xml
Original file line number Diff line number Diff line change
@@ -1,40 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="250dp"
android:padding="5dp">

<ImageView
android:id="@+id/npIcon"
android:layout_width="35dp"
android:layout_height="35dp"
android:id="@+id/npIcon"
android:src="@drawable/ic_album"
/>
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/npStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/npStatus"
android:layout_alignParentBottom="false"
android:layout_alignParentStart="false"
android:layout_marginLeft="10sp"
android:layout_marginStart="10dp"
android:fontFamily="sans-serif-light"
android:maxLines="1"
android:layout_toRightOf="@+id/npIcon"
android:layout_marginTop="10dp"
android:fontFamily="sans-serif-light" />
app:layout_constraintBottom_toTopOf="@id/npDesc"
app:layout_constraintStart_toEndOf="@id/npIcon"
app:layout_constraintTop_toTopOf="parent"
tools:text="00:00 / 99:99" />

<TextView
android:id="@+id/npDesc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/npDesc"
android:layout_alignParentBottom="false"
android:layout_below="@+id/npIcon"
android:layout_alignParentStart="false"
android:layout_marginLeft="5sp"
android:maxLines="1"
android:layout_alignParentBottom="false"
android:layout_marginStart="10dp"
android:ellipsize="end"
android:layout_below="@+id/npIcon"
android:fontFamily="sans-serif-light"
android:gravity="center"
android:layout_alignRight="@+id/npStatus"
android:fontFamily="sans-serif-light" />
android:maxLines="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/npIcon"
app:layout_constraintTop_toBottomOf="@id/npStatus"
tools:text="Ozzy Osbourne" />

</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>