music: rework loading ui flow
Rework the UI flow for music loading to be more coherent with runtime rescanning. The loading progress is now shown as a card on the bottom of the screen. This way, app use is not completely crippled when the app has to rescan the music library, albeit the shuffle button still has to be disabled during this period.
This commit is contained in:
@@ -29,60 +29,72 @@
|
||||
|
||||
</org.oxycblt.auxio.ui.coordinator.EdgeAppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/home_content"
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/home_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
||||
tools:layout="@layout/fragment_home_list" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<FrameLayout
|
||||
android:id="@+id/home_indexing_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:animateLayoutChanges="true"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/home_indexing_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:paddingEnd="@dimen/spacing_medium">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_medium">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/home_indexing_status"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:gravity="center"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
|
||||
app:layout_constraintBottom_toTopOf="@+id/home_indexing_action"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="Status" />
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/home_indexing_progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
app:indeterminateAnimationType="disjoint"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_indexing_action"
|
||||
app:layout_constraintTop_toTopOf="@+id/home_indexing_action"
|
||||
app:trackColor="@color/sel_track" />
|
||||
<TextView
|
||||
android:id="@+id/home_indexing_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_medium"
|
||||
android:gravity="center"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
|
||||
app:layout_constraintBottom_toTopOf="@+id/home_indexing_action"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="Status" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/home_indexing_action"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lbl_retry"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_indexing_status" />
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/home_indexing_progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:indeterminate="true"
|
||||
app:indeterminateAnimationType="disjoint"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_indexing_action"
|
||||
app:layout_constraintTop_toTopOf="@+id/home_indexing_action"
|
||||
app:trackColor="@color/sel_track" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<Button
|
||||
android:id="@+id/home_indexing_action"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lbl_retry"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_indexing_status" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/home_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
||||
tools:layout="@layout/fragment_home_list" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user