Added peak theme

This commit is contained in:
h4h13 2019-10-04 16:28:28 +05:30
parent 4de36e5bc5
commit 6f362e1ab7
20 changed files with 641 additions and 38 deletions

View file

@ -65,7 +65,7 @@
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewHeadline5"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
tools:ignore="MissingPrefix"
tools:text="Title" />

View file

@ -91,7 +91,7 @@
android:scrollHorizontally="true"
android:textStyle="bold"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textAppearance="@style/TextViewHeadline6"
app:layout_constraintBottom_toTopOf="@+id/text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"

View file

@ -95,7 +95,7 @@
android:layout_marginBottom="2dp"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="@style/TextViewSubtitle1"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
tools:text="@tools:sample/lorem/random" />

View file

@ -73,7 +73,7 @@
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/text"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -72,7 +72,7 @@
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
tools:text="@tools:sample/lorem/random" />

View file

@ -77,7 +77,7 @@
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/text"
app:layout_constraintEnd_toEndOf="parent"
@ -96,7 +96,7 @@
android:maxLines="1"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:textAppearance="@style/TextViewBody2"
android:textAppearance="@style/TextViewBody1"
app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"

View file

@ -0,0 +1,167 @@
<?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.
-->
<androidx.constraintlayout.widget.ConstraintLayout 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:orientation="vertical">
<RelativeLayout
android:id="@+id/progressContainer"
android:layout_width="match_parent"
android:layout_height="@dimen/progress_slider_height"
android:layout_marginTop="16dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.textview.MaterialTextView
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:textColor="?colorOnSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:22" />
<com.google.android.material.textview.MaterialTextView
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:textColor="?colorOnSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:22" />
<androidx.appcompat.widget.AppCompatSeekBar
android:id="@+id/progressSlider"
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@id/songTotalTime"
android:layout_toRightOf="@id/songCurrentProgress"
android:maxHeight="3dp"
android:progressDrawable="@drawable/color_progress_seek"
android:splitTrack="false"
tools:ignore="RtlHardcoded,UnusedAttribute"
tools:progress="20" />
</RelativeLayout>
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/playPauseButton"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_centerVertical="true"
android:background="?attr/roundSelector"
android:padding="8dp"
android:scaleType="fitCenter"
app:layout_constraintEnd_toStartOf="@+id/nextButton"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/previousButton"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"
app:srcCompat="@drawable/ic_pause_white_24dp"
tools:tint="@color/md_black_1000" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/previousButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:background="?attr/roundSelector"
android:padding="16dp"
android:scaleType="fitCenter"
app:layout_constraintBottom_toTopOf="@+id/volumeFragmentContainer"
app:layout_constraintEnd_toStartOf="@+id/playPauseButton"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/repeatButton"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"
app:srcCompat="@drawable/ic_skip_previous_white_24dp"
tools:ignore="MissingPrefix"
tools:tint="@color/md_black_1000" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/nextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:background="?attr/roundSelector"
android:padding="16dp"
android:scaleType="fitCenter"
app:layout_constraintBottom_toBottomOf="@+id/playPauseButton"
app:layout_constraintEnd_toStartOf="@+id/shuffleButton"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/playPauseButton"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"
app:srcCompat="@drawable/ic_skip_next_white_24dp"
tools:ignore="MissingPrefix"
tools:tint="@color/md_black_1000" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/repeatButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:background="?attr/roundSelector"
android:padding="16dp"
android:scaleType="fitCenter"
app:layout_constraintBottom_toTopOf="@+id/volumeFragmentContainer"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"
app:srcCompat="@drawable/ic_repeat_white_24dp"
tools:ignore="MissingPrefix"
tools:tint="@color/md_black_1000" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/shuffleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:background="?attr/roundSelector"
android:padding="16dp"
android:scaleType="fitCenter"
app:layout_constraintBottom_toTopOf="@+id/volumeFragmentContainer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"
app:srcCompat="@drawable/ic_shuffle_white_24dp"
tools:ignore="MissingPrefix"
tools:tint="@color/md_black_1000" />
<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"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/playPauseButton"
tools:backgroundTint="@color/md_red_400"
tools:layout_height="52dp" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,99 @@
<?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.
-->
<androidx.constraintlayout.widget.ConstraintLayout 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:orientation="vertical">
<FrameLayout
android:id="@+id/toolbarContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/playerToolbar"
style="@style/Toolbar"
android:layout_gravity="bottom"
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
</FrameLayout>
<com.google.android.material.card.MaterialCardView
android:id="@+id/imageContainer"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_marginStart="8dp"
app:cardCornerRadius="8dp"
app:cardUseCompatPadding="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbarContainer">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/playerImage"
android:layout_width="72dp"
android:layout_height="72dp"
tools:src="@tools:sample/avatars" />
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:maxLines="1"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constraintBottom_toTopOf="@+id/text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/imageContainer"
app:layout_constraintTop_toBottomOf="@+id/toolbarContainer"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:maxLines="2"
android:textAppearance="@style/TextViewBody2"
android:textColor="?colorOnSecondary"
app:layout_constraintBottom_toBottomOf="@+id/imageContainer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageContainer"
app:layout_constraintTop_toBottomOf="@+id/title"
tools:text="@tools:sample/lorem" />
<FrameLayout
android:id="@+id/playbackControlsFragmentContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/imageContainer">
<fragment
android:id="@+id/playbackControlsFragment"
android:name="code.name.monkey.retromusic.fragments.player.peak.PeakPlayerControlFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout="@layout/fragment_peak_control_player" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -40,7 +40,7 @@
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewHeadline5"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
tools:ignore="MissingPrefix"
tools:text="Title" />

View file

@ -78,7 +78,7 @@
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textAppearance="@style/TextViewHeadline6"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/text"

View file

@ -22,7 +22,7 @@
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textAppearance="@style/TextViewHeadline6"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/text"

View file

@ -24,15 +24,16 @@
android:padding="@dimen/mi_baseline">
<androidx.appcompat.widget.AppCompatImageView
tools:srcCompat="@tools:sample/backgrounds/scenic[4]"
android:id="@id/mi_image"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/mi_baseline"
android:layout_weight="1"
android:gravity="center"
android:scaleType="center"
app:layout_parallaxFactor="0.75"
tools:ignore="ContentDescription" />
tools:ignore="ContentDescription"
tools:srcCompat="@tools:sample/backgrounds/scenic[4]" />
<com.google.android.material.textview.MaterialTextView
android:id="@id/mi_title"

View file

@ -25,7 +25,7 @@
<FrameLayout
android:id="@+id/slidingPanel"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content">
<FrameLayout

View file

@ -658,4 +658,5 @@
<string name="action_toggle_shuffle">Toggle shuffle mode</string>
<string name="action_toggle_favorite">Toggle favorite</string>
<string name="pref_dialog_corner_title">Dialog corner</string>
<string name="peak">Peak</string>
</resources>