Fix lockscreen, playlist icon

This commit is contained in:
h4h13 2019-04-04 11:37:55 +05:30
parent 4470a66fb2
commit c9811ca06b
42 changed files with 350 additions and 262 deletions

View file

@ -5,9 +5,15 @@
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background_material_light"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/status_bar" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -24,6 +30,9 @@
tools:layout="@layout/fragment_lock_screen_playback_controls" />
</LinearLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -32,9 +41,9 @@
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
app:cardCornerRadius="8dp"
app:cardElevation="8dp">
@ -42,11 +51,10 @@
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:contentDescription="TODO" />
android:contentDescription="TODO"
android:scaleType="centerCrop" />
</com.google.android.material.card.MaterialCardView>
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<TextView
android:id="@+id/slide"
android:layout_width="match_parent"
@ -54,5 +62,5 @@
android:layout_weight="0"
android:gravity="center"
android:padding="16dp"
android:text="Swipe to unlock" />
android:text="@string/swipe_to_unlock" />
</LinearLayout>

View file

@ -137,7 +137,6 @@
android:id="@+id/playPauseButton"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_above="@id/title_container"
android:layout_centerInParent="true"
android:background="@drawable/color_circle_gradient"
android:elevation="4dp"
@ -150,17 +149,10 @@
android:id="@+id/volumeFragmentContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_weight="0"
android:paddingStart="8dp"
android:paddingEnd="8dp">
<fragment
android:id="@+id/volumeFragment"
android:name="code.name.monkey.retromusic.ui.fragments.VolumeFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
tools:layout="@layout/fragment_volume" />
</FrameLayout>
</LinearLayout>

View file

@ -50,7 +50,15 @@
<include layout="@layout/media_button" />
<include layout="@layout/volume_controls" />
<FrameLayout
android:id="@+id/volumeFragmentContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingStart="8dp"
android:paddingEnd="8dp">
</FrameLayout>
<LinearLayout

View file

@ -204,5 +204,9 @@
</RelativeLayout>
<include layout="@layout/volume_controls" />
<FrameLayout
android:id="@+id/volumeFragmentContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0" />
</LinearLayout>

View file

@ -8,6 +8,46 @@
android:paddingTop="8dp"
tools:ignore="MissingPrefix">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:gravity="center"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
android:textColor="?android:attr/textColorPrimary"
tools:text="Title" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textColor="?android:attr/textColorSecondary" />
</LinearLayout>
<SeekBar
android:id="@+id/progressSlider"
android:layout_width="match_parent"
@ -20,43 +60,10 @@
<include layout="@layout/player_time" />
<LinearLayout
<include layout="@layout/media_button" />
<FrameLayout
android:id="@+id/volumeFragmentContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:gravity="center"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:padding="16dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
tools:text="Title" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
tools:text="Title" />
</LinearLayout>
<include layout="@layout/media_button" />
<include layout="@layout/volume_controls" />
android:layout_weight="0" />
</LinearLayout>

View file

@ -8,54 +8,6 @@
android:orientation="vertical"
tools:ignore="MissingPrefix">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="28dp"
android:paddingStart="12dp"
android:paddingEnd="12dp">
<TextView
android:id="@+id/songCurrentProgress"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|left|end"
android:paddingLeft="8dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
<TextView
android:id="@+id/songTotalTime"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|right|end"
android:paddingRight="8dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
<SeekBar
android:id="@+id/progressSlider"
style="@style/MusicProgressSlider"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/songTotalTime"
android:layout_toRightOf="@id/songCurrentProgress"
android:maxHeight="3dp"
android:progressDrawable="@drawable/color_progress_seek"
android:splitTrack="false"
android:thumb="@drawable/switch_thumb_material"
tools:ignore="RtlHardcoded,UnusedAttribute"
tools:progress="20" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -96,8 +48,63 @@
android:textColor="?android:attr/textColorSecondary" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="28dp"
android:paddingStart="12dp"
android:paddingEnd="12dp">
<SeekBar
android:id="@+id/progressSlider"
style="@style/MusicProgressSlider"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/songTotalTime"
android:layout_toRightOf="@id/songCurrentProgress"
android:maxHeight="3dp"
android:progressDrawable="@drawable/color_progress_seek"
android:splitTrack="false"
android:thumb="@drawable/switch_thumb_material"
tools:ignore="RtlHardcoded,UnusedAttribute"
tools:progress="20" />
<TextView
android:id="@+id/songTotalTime"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|right|end"
android:paddingRight="8dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
<TextView
android:id="@+id/songCurrentProgress"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|left|end"
android:paddingLeft="8dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
</RelativeLayout>
<include layout="@layout/media_button" />
<include layout="@layout/volume_controls" />
<FrameLayout
android:id="@+id/volumeFragmentContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingStart="8dp"
android:paddingEnd="8dp">
</FrameLayout>
</LinearLayout>

View file

@ -2,32 +2,42 @@
<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:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:gravity="end"
android:orientation="vertical">
<FrameLayout
android:id="@+id/volumeFragmentContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:rotation="90"
android:visibility="gone" />
<ImageButton
android:id="@+id/playerRepeatButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/roundSelector"
android:contentDescription="TODO"
android:padding="16dp"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_repeat_white_24dp"
tools:ignore="MissingPrefix"
tools:tint="@color/md_black_1000"
android:contentDescription="TODO" />
tools:tint="@color/md_black_1000" />
<ImageButton
android:id="@+id/playerShuffleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/roundSelector"
android:contentDescription="TODO"
android:padding="16dp"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_shuffle_white_24dp"
tools:ignore="MissingPrefix"
tools:tint="@color/md_black_1000"
android:contentDescription="TODO" />
tools:tint="@color/md_black_1000" />
</LinearLayout>

View file

@ -6,14 +6,13 @@
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingStart="8dp"
android:paddingEnd="8dp"
tools:showIn="@layout/fragment_player_playback_controls">
android:paddingEnd="8dp" >
<fragment
<!-- <fragment
android:id="@+id/volumeFragment"
android:name="code.name.monkey.retromusic.ui.fragments.VolumeFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
tools:layout="@layout/fragment_volume" />
tools:layout="@layout/fragment_volume" />-->
</FrameLayout>