show loading screen while loading media fragment
* use material components for shaped images and progress indicator
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -15,10 +14,12 @@
|
||||
android:layout_gravity="center" />
|
||||
<!-- app:controller_layout_id="@layout/player_custom_control"/>-->
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.ProgressIndicator
|
||||
android:id="@+id/loading"
|
||||
style="@style/Widget.MaterialComponents.ProgressIndicator.Circular.Indeterminate"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_gravity="center" />
|
||||
android:layout_gravity="center"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</FrameLayout>
|
17
app/src/main/res/layout/fragment_loading.xml
Normal file
17
app/src/main/res/layout/fragment_loading.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#f5f5f5"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<com.google.android.material.progressindicator.ProgressIndicator
|
||||
android:id="@+id/progressBar2"
|
||||
style="@style/Widget.MaterialComponents.ProgressIndicator.Circular.Indeterminate"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_gravity="center"
|
||||
tools:visibility="visible" />
|
||||
</FrameLayout>
|
@ -30,12 +30,13 @@
|
||||
android:minHeight="220dp"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<ImageView
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/image_poster"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="200dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_launcher_background" />
|
||||
app:shapeAppearance="@style/ShapeAppearance.Teapod.RoundedPoster"
|
||||
app:srcCompat="@drawable/ic_launcher_background" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
@ -14,12 +14,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/image_episode"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="72dp"
|
||||
android:contentDescription="@string/component_poster_desc"
|
||||
app:srcCompat="@color/md_disabled_text_dark_theme" />
|
||||
app:srcCompat="@color/md_disabled_text_dark_theme"
|
||||
app:shapeAppearance="@style/ShapeAppearance.Teapod.RoundedPoster"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_episode_title"
|
||||
|
@ -14,5 +14,10 @@
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
</style>
|
||||
|
||||
<!-- shapes -->
|
||||
<style name="ShapeAppearance.Teapod.RoundedPoster" parent="ShapeAppearance.MaterialComponents.LargeComponent">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">5dp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
Reference in New Issue
Block a user