Update LoadingFragment layout
Update the layout of LoadingFragment with a new error icon/text style.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M11,15h2v2h-2zM11,7h2v6h-2zM11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?attr/colorPrimary" />
|
||||
@@ -23,7 +23,7 @@
|
||||
android:indeterminateTint="?attr/colorPrimary"
|
||||
android:indeterminateTintMode="src_in"
|
||||
android:paddingBottom="@dimen/padding_tiny"
|
||||
app:layout_constraintBottom_toTopOf="@+id/error_text"
|
||||
app:layout_constraintBottom_toTopOf="@+id/status_icon"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -31,37 +31,54 @@
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:indeterminateTint="@color/blue" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/status_icon"
|
||||
android:layout_width="@dimen/status_icon_size"
|
||||
android:layout_height="@dimen/status_icon_size"
|
||||
android:indeterminateTint="?attr/colorPrimary"
|
||||
android:indeterminateTintMode="src_in"
|
||||
android:src="@drawable/ic_error"
|
||||
android:contentDescription="@string/description_error_icon"
|
||||
app:layout_constraintBottom_toTopOf="@+id/error_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/loading_bar"
|
||||
app:srcCompat="@drawable/ic_error"
|
||||
tools:tint="@color/blue" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/reset_button"
|
||||
android:layout_marginTop="@dimen/margin_small"
|
||||
app:layout_constraintBottom_toTopOf="@+id/retry_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/loading_bar"
|
||||
app:layout_constraintTop_toBottomOf="@+id/status_icon"
|
||||
tools:text="Some kind of error." />
|
||||
|
||||
<Button
|
||||
android:id="@+id/reset_button"
|
||||
android:id="@+id/retry_button"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:onClick="@{() -> loadingModel.retry()}"
|
||||
android:text="@string/label_retry"
|
||||
android:visibility="gone"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/error_text"
|
||||
tools:visibility="visible"
|
||||
tools:textColor="@color/blue" />
|
||||
app:layout_constraintVertical_bias="0.673"
|
||||
tools:textColor="@color/blue"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -7,10 +7,12 @@
|
||||
<dimen name="margin_small">8dp</dimen>
|
||||
<dimen name="margin_medium">16dp</dimen>
|
||||
|
||||
<dimen name="cover_size_compact">44dp</dimen>
|
||||
<dimen name="cover_size_normal">56dp</dimen>
|
||||
<dimen name="status_icon_size">48dp</dimen>
|
||||
|
||||
<dimen name="tab_menu_size">40dp</dimen>
|
||||
|
||||
<dimen name="cover_size_compact">44dp</dimen>
|
||||
<dimen name="cover_size_normal">56dp</dimen>
|
||||
|
||||
<dimen name="elevation_normal">4dp</dimen>
|
||||
</resources>
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
<string name="error_no_music">No music found.</string>
|
||||
<string name="error_music_load_failed">Music loading failed.</string>
|
||||
<string name="error_no_perms">Auxio needs to be allowed to read your music library.</string>
|
||||
|
||||
<string name="label_retry">Retry</string>
|
||||
<string name="label_single_song">1 Song</string>
|
||||
@@ -18,4 +19,5 @@
|
||||
<string name="format_song_info">%s / %s</string>
|
||||
|
||||
<string name="description_cover_art">Cover art for </string>
|
||||
<string name="description_error_icon">Error Icon</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user