Better Cast
Now there won't be any need of ugly cast mini player as cast will be able to respond to UI events of app like seek, changing song, pause
This commit is contained in:
parent
70e323eb0a
commit
4b4aadcc5b
7 changed files with 127 additions and 205 deletions
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:id="@+id/container_all"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="0dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/container_current"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/cast_mini_controller_height">
|
||||
|
||||
<View
|
||||
android:id="@+id/center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/icon_container"
|
||||
android:layout_width="@dimen/cast_mini_controller_image_size"
|
||||
android:layout_height="@dimen/cast_mini_controller_image_size"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentStart="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_audio_art" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/button_0"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/cast_mini_controller_control_button_margin"
|
||||
android:layout_toStartOf="@+id/button_1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/button_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/cast_mini_controller_control_button_margin"
|
||||
android:layout_toStartOf="@+id/button_2" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/button_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/center"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="-3dp"
|
||||
android:layout_toStartOf="@+id/button_0"
|
||||
android:layout_toEndOf="@+id/icon_container"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="?attr/castTitleTextAppearance" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitle_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/center"
|
||||
android:layout_alignStart="@+id/title_view"
|
||||
android:layout_alignEnd="@+id/title_view"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_toStartOf="@+id/button_0"
|
||||
android:layout_toEndOf="@+id/icon_container"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="?attr/castSubtitleTextAppearance" />
|
||||
|
||||
<!-- Note: The ProgressBar is deliberately laid out in absolute LTR -->
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layoutDirection="ltr"
|
||||
android:progressDrawable="@drawable/cast_mini_controller_progress_drawable" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -11,8 +11,8 @@
|
|||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:defaultNavHost="true"
|
||||
android:background="?attr/colorSurface"
|
||||
app:defaultNavHost="true"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
||||
tools:layout="@layout/fragment_home" />
|
||||
|
||||
|
@ -39,12 +39,6 @@
|
|||
android:layout_height="@dimen/mini_player_height"
|
||||
tools:layout="@layout/fragment_mini_player" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/castMiniController"
|
||||
class="com.google.android.gms.cast.framework.media.widget.MiniControllerFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<code.name.monkey.retromusic.views.BottomNavigationBarTinted
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue