For #1072: Modifies icons
parent
d2af87f8f8
commit
504fc41e51
|
@ -38,12 +38,12 @@ class QuickActionSheet @JvmOverloads constructor(
|
||||||
bounceSheet(quickActionSheetBehavior)
|
bounceSheet(quickActionSheetBehavior)
|
||||||
}
|
}
|
||||||
|
|
||||||
bounceSheet(quickActionSheetBehavior, 600L)
|
bounceSheet(quickActionSheetBehavior, 500L)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun bounceSheet(quickActionSheetBehavior: QuickActionSheetBehavior, duration: Long = 400L) {
|
private fun bounceSheet(quickActionSheetBehavior: QuickActionSheetBehavior, duration: Long = 400L) {
|
||||||
val normalPeekHeight = quickActionSheetBehavior.peekHeight
|
val normalPeekHeight = quickActionSheetBehavior.peekHeight
|
||||||
val valueAnimator = ValueAnimator.ofFloat(normalPeekHeight.toFloat(), normalPeekHeight*6f)
|
val valueAnimator = ValueAnimator.ofFloat(normalPeekHeight.toFloat(), normalPeekHeight*5f)
|
||||||
|
|
||||||
valueAnimator.addUpdateListener {
|
valueAnimator.addUpdateListener {
|
||||||
quickActionSheetBehavior.peekHeight = (it.animatedValue as Float).toInt()
|
quickActionSheetBehavior.peekHeight = (it.animatedValue as Float).toInt()
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="oval">
|
<shape android:shape="oval">
|
||||||
<size
|
<size
|
||||||
android:width="48dp"
|
android:width="40dp"
|
||||||
android:height="48dp" />
|
android:height="40dp" />
|
||||||
<solid android:color="@color/library_downloads_icon_background" />
|
<solid android:color="@color/library_downloads_icon_background" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="oval">
|
<shape android:shape="oval">
|
||||||
<size
|
<size
|
||||||
android:width="48dp"
|
android:width="40dp"
|
||||||
android:height="48dp" />
|
android:height="40dp" />
|
||||||
<solid android:color="@color/library_favorites_icon_background" />
|
<solid android:color="@color/library_favorites_icon_background" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="oval">
|
<shape android:shape="oval">
|
||||||
<size
|
<size
|
||||||
android:width="48dp"
|
android:width="40dp"
|
||||||
android:height="48dp" />
|
android:height="40dp" />
|
||||||
<solid android:color="@color/library_history_icon_background" />
|
<solid android:color="@color/library_history_icon_background" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="oval">
|
<shape android:shape="oval">
|
||||||
<size
|
<size
|
||||||
android:width="48dp"
|
android:width="40dp"
|
||||||
android:height="48dp" />
|
android:height="40dp" />
|
||||||
<solid android:color="@color/library_key_icon_background" />
|
<solid android:color="@color/library_key_icon_background" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="oval">
|
<shape android:shape="oval">
|
||||||
<size
|
<size
|
||||||
android:width="48dp"
|
android:width="40dp"
|
||||||
android:height="48dp" />
|
android:height="40dp" />
|
||||||
<solid android:color="@color/library_screenshots_icon_background" />
|
<solid android:color="@color/library_screenshots_icon_background" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="oval">
|
<shape android:shape="oval">
|
||||||
<size
|
<size
|
||||||
android:width="48dp"
|
android:width="40dp"
|
||||||
android:height="48dp" />
|
android:height="40dp" />
|
||||||
<solid android:color="@color/library_screenshots_icon_background" />
|
<solid android:color="@color/library_screenshots_icon_background" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="oval">
|
<shape android:shape="oval">
|
||||||
<size
|
<size
|
||||||
android:width="48dp"
|
android:width="40dp"
|
||||||
android:height="48dp" />
|
android:height="40dp" />
|
||||||
<solid android:color="@color/library_sessions_icon_background" />
|
<solid android:color="@color/library_sessions_icon_background" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="oval">
|
||||||
|
<size
|
||||||
|
android:width="40dp"
|
||||||
|
android:height="40dp" />
|
||||||
|
<solid android:color="@color/quick_action_share_icon_background"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item
|
||||||
|
android:bottom="8dp"
|
||||||
|
android:left="8dp"
|
||||||
|
android:right="8dp"
|
||||||
|
android:top="8dp">
|
||||||
|
<vector
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@color/quick_action_share_icon"
|
||||||
|
android:pathData="M17,14a4,4 0,0 0,-2.91 1.27L9.87,13a3.68,3.68 0,0 0,0 -1.94l4.22,-2.3A4,4 0,1 0,13 6a3.85,3.85 0,0 0,0.13 1L8.91,9.27a4,4 0,1 0,0 5.46L13.13,17a3.85,3.85 0,0 0,-0.13 1,4 4,0 1,0 4,-4zM17,4a2,2 0,1 1,-2 2,2 2,0 0,1 2,-2zM6,14a2,2 0,1 1,2 -2,2 2,0 0,1 -2,2zM17,20a2,2 0,1 1,2 -2,2 2,0 0,1 -2,2z"/>
|
||||||
|
</vector>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
|
@ -8,24 +8,39 @@
|
||||||
android:id="@+id/quick_action_sheet"
|
android:id="@+id/quick_action_sheet"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="80dp"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/off_white">
|
android:background="@color/off_white">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/quick_action_sheet_handle"
|
android:id="@+id/quick_action_sheet_handle"
|
||||||
android:layout_marginTop="7dp"
|
android:layout_marginBottom="13dp"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="2dp"
|
android:layout_height="2dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center_horizontal"
|
||||||
android:background="@drawable/ic_drawer_pull_tab"/>
|
android:background="@drawable/ic_drawer_pull_tab"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="78dp"
|
android:layout_marginBottom="3dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/off_white">
|
android:background="@color/off_white">
|
||||||
|
|
||||||
|
<LinearLayout android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1">
|
||||||
|
</LinearLayout>
|
||||||
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:src="@drawable/quick_action_icon_share"
|
||||||
|
android:background="?android:attr/selectableItemBackground"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -37,6 +52,7 @@
|
||||||
android:background="?android:attr/selectableItemBackground"/>
|
android:background="?android:attr/selectableItemBackground"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -44,11 +60,10 @@
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:src="@drawable/library_icon_downloads_circle_background"
|
android:src="@drawable/library_icon_downloads_circle_background"
|
||||||
android:background="?android:attr/selectableItemBackground"/>
|
android:background="?android:attr/selectableItemBackgroundBorderless"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
|
android:layout_weight="1"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
|
@ -64,17 +79,54 @@
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:src="@drawable/library_icon_history_circle_background"
|
android:src="@drawable/quick_action_icon_read"
|
||||||
android:background="?android:attr/selectableItemBackground"/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:src="@drawable/library_icon_history_circle_background"
|
|
||||||
android:background="?android:attr/selectableItemBackground"/>
|
android:background="?android:attr/selectableItemBackground"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/off_white">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:text="Share"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:text="Screenshot"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:text="Download"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:text="Favorite"/>
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:text="Read"/>
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -79,4 +79,10 @@
|
||||||
|
|
||||||
<color name="crash_page_accent">#45a1ff</color>
|
<color name="crash_page_accent">#45a1ff</color>
|
||||||
<color name="crash_page_off_accent">@color/photonGrey30</color>
|
<color name="crash_page_off_accent">@color/photonGrey30</color>
|
||||||
|
|
||||||
|
<color name="quick_action_share_icon">#174291</color>
|
||||||
|
<color name="quick_action_share_icon_background">#b9f0fd</color>
|
||||||
|
|
||||||
|
<color name="quick_action_read_icon">#8a201f</color>
|
||||||
|
<color name="quick_action_read_icon_background">#fce98f</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue