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

@ -1,4 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"

View file

@ -1,4 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
@ -7,5 +19,14 @@
<path
android:fillColor="@color/md_white_1000"
android:pathData="M3 10h12v2H3zm0 4h8v2H3zm0-8h12v2H3zm14 8.18c-0.31-0.11-0.65-0.18-1-0.18-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3V8h3V6h-5v8.18zM16 18c-0.55 0-1-0.45-1-1s0.45-1 1-1 1 0.45 1 1-0.45 1-1 1z" />
android:pathData="M22,5 L22,7 L19,7 L19,16 C19,17.66 17.66,19 16,19 C14.34,19 13,17.66 13,16 C13,14.34 14.34,13 16,13 C16.35,13 16.69,13.07 17,13.18 L17,5 L22,5 Z M15,16 C15,16.55 15.45,17 16,17 C16.55,17 17,16.55 17,16 C17,15.45 16.55,15 16,15 C15.45,15 15,15.45 15,16 Z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M 15 5 L 3 5 L 3 7 L 15 7 Z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M 15 9 L 3 9 L 3 11 L 15 11 Z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M 11 13 L 3 13 L 3 15 L 11 15 Z" />
</vector>

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>

View file

@ -607,5 +607,6 @@
<string name="pick_image_intent_text">Pick image</string>
<string name="set_photo">Set a profile photo</string>
<string name="edit">Edit</string>
<string name="swipe_to_unlock">Swipe to unlock</string>
</resources>

View file

@ -82,7 +82,7 @@
</style>
<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="md_corner_radius">12dp</item>
<item name="md_font_title">@font/circular</item>
<item name="md_font_body">@font/circular</item>