Improve destauration on Color shortcut

This commit is contained in:
h4h13 2019-10-10 23:23:41 +05:30
commit 694e78e92e
22 changed files with 90 additions and 35 deletions

View file

@ -74,9 +74,9 @@
android:id="@+id/toolbarContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="58dp"
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
android:layout_marginTop="@dimen/toolbar_margin_vertical"
android:layout_marginEnd="58dp"
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
app:cardCornerRadius="8dp"
app:cardElevation="6dp"
@ -105,8 +105,8 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="64dp"
android:layout_marginEnd="64dp"
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
android:elevation="@dimen/card_elevation"
app:behavior_overlapTop="72dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

View file

@ -71,6 +71,8 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<include layout="@layout/home_content" />

View file

@ -19,10 +19,11 @@
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent">
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsingToolbarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
@ -57,7 +58,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="16dp"
app:cardElevation="0dp">
app:cardElevation="0dp"
app:cardPreventCornerOverlap="true">
<LinearLayout
android:layout_width="match_parent"

View file

@ -17,7 +17,9 @@
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent">
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"

View file

@ -27,9 +27,7 @@
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp">
app:liftOnScroll="true">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
@ -111,8 +109,8 @@
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="128dp"
android:layout_marginEnd="128dp"
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
app:cardCornerRadius="12dp">
<include layout="@layout/home_content" />

View file

@ -71,6 +71,8 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<include layout="@layout/home_content" />

View file

@ -71,6 +71,7 @@
android:layout_width="96dp"
android:layout_height="96dp"
android:layout_centerInParent="true"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:background="@drawable/color_circle_gradient"
android:elevation="4dp"
@ -78,7 +79,8 @@
app:layout_constraintBottom_toTopOf="@+id/volumeFragmentContainer"
app:layout_constraintStart_toEndOf="@id/previousButton"
app:layout_constraintTop_toBottomOf="@+id/text"
app:srcCompat="@drawable/ic_play_arrow_white_32dp" />
app:srcCompat="@drawable/ic_play_arrow_white_32dp"
tools:tint="@color/md_black_1000" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/nextButton"

View file

@ -15,21 +15,19 @@
<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/main_fragment_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="?colorPrimary">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp">
app:liftOnScroll="true">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
@ -111,8 +109,9 @@
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="64dp"
android:layout_marginEnd="64dp"
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
app:cardBackgroundColor="?colorPrimary"
app:cardCornerRadius="12dp">
<include layout="@layout/home_content" />

View file

@ -72,10 +72,9 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="64dp"
android:layout_marginEnd="64dp"
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
android:layout_weight="1"
android:background="@color/md_white_1000"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<include layout="@layout/home_content" />

View file

@ -51,6 +51,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintEnd_toStartOf="@+id/lastAdded"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"

View file

@ -16,7 +16,7 @@
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">
android:layout_height="match_parent" >
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"

View file

@ -16,6 +16,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="?colorPrimary"
android:layout_height="match_parent"
android:orientation="vertical">

View file

@ -18,7 +18,7 @@
<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/contentContainer"
android:background="?colorPrimary"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="blocksDescendants"

View file

@ -73,6 +73,7 @@
android:layout_margin="0dp"
android:layout_weight="0"
android:rotation="90"
android:layout_gravity="center"
app:tint="?colorOnSecondary"
tools:visibility="visible" />
</LinearLayout>

View file

@ -0,0 +1,18 @@
<?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.
-->
<resources>
<bool name="is_dark_mode">true</bool>
</resources>

View file

@ -1,5 +1,5 @@
<resources>
<dimen name="toolbar_margin_horizontal">128dp</dimen>
<dimen name="toolbar_margin_horizontal">64dp</dimen>
<dimen name="toolbar_height">64dp</dimen>
<dimen name="toolbar_margin_vertical">16dp</dimen>
<dimen name="item_song_height">64dp</dimen>

View file

@ -36,6 +36,7 @@
</declare-styleable>
<declare-styleable name="ColorIconsImageView">
<attr name="iconBackgroundColor" format="color" />
<attr name="colorIconColor" format="color" />
<attr name="icon" format="reference" />
</declare-styleable>

View file

@ -0,0 +1,17 @@
<?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.
-->
<resources>
<bool name="is_dark_mode">false</bool>
</resources>