2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

For #1072: Fixes nits

This commit is contained in:
Sawyer Blatz 2019-03-21 10:44:50 -07:00 committed by Colin Lee
parent f4648525f1
commit da35581c54
2 changed files with 19 additions and 63 deletions

View File

@ -62,18 +62,19 @@ class QuickActionSheet @JvmOverloads constructor(
val peakHeightMultiplier = if (duration == demoBounceAnimationLength) val peakHeightMultiplier = if (duration == demoBounceAnimationLength)
demoBounceAnimationPeekHeightMultiplier else bounceAnimationPeekHeightMultiplier demoBounceAnimationPeekHeightMultiplier else bounceAnimationPeekHeightMultiplier
val valueAnimator = ValueAnimator.ofFloat(normalPeekHeight.toFloat(), ValueAnimator.ofFloat(normalPeekHeight.toFloat(),
normalPeekHeight * peakHeightMultiplier) normalPeekHeight * peakHeightMultiplier)?.let {
valueAnimator.addUpdateListener { it.addUpdateListener {
quickActionSheetBehavior.peekHeight = (it.animatedValue as Float).toInt() quickActionSheetBehavior.peekHeight = (it.animatedValue as Float).toInt()
} }
valueAnimator.repeatMode = ValueAnimator.REVERSE it.repeatMode = ValueAnimator.REVERSE
valueAnimator.repeatCount = 1 it.repeatCount = 1
valueAnimator.interpolator = FastOutSlowInInterpolator() it.interpolator = FastOutSlowInInterpolator()
valueAnimator.duration = duration it.duration = duration
valueAnimator.start() it.start()
}
} }
companion object { companion object {

View File

@ -20,59 +20,6 @@
android:background="?attr/quickActionPullTabColor" android:background="?attr/quickActionPullTabColor"
android:src="@drawable/ic_drawer_pull_tab"/> android:src="@drawable/ic_drawer_pull_tab"/>
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="bottom"
android:layout_width="match_parent"
android:layout_marginBottom="3dp"
android:layout_height="wrap_content"
android:background="?attr/toolbarColor">
<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:contentDescription="@string/quick_action_share"
android:src="@drawable/quick_action_icon_share"
android:background="?attr/toolbarColor"/>
<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:contentDescription="@string/quick_action_download"
android:src="@drawable/library_icon_downloads_circle_background"
android:background="?attr/toolbarColor"/>
<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:contentDescription="@string/quick_action_favorite"
android:src="@drawable/library_icon_favorites_circle_background"
android:background="?attr/toolbarColor"/>
<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:contentDescription="@string/quick_action_read"
android:src="@drawable/quick_action_icon_read"
android:background="?attr/toolbarColor"/>
</LinearLayout>
<LinearLayout <LinearLayout
android:orientation="horizontal" android:orientation="horizontal"
android:layout_gravity="bottom" android:layout_gravity="bottom"
@ -84,6 +31,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:layout_width="0dp" android:layout_width="0dp"
android:drawableTop="@drawable/quick_action_icon_share"
android:drawablePadding="5dp"
android:textAlignment="center" android:textAlignment="center"
android:textSize="12sp" android:textSize="12sp"
android:textColor="?attr/toolbarTextColor" android:textColor="?attr/toolbarTextColor"
@ -93,6 +42,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:layout_width="0dp" android:layout_width="0dp"
android:drawableTop="@drawable/library_icon_downloads_circle_background"
android:drawablePadding="5dp"
android:textAlignment="center" android:textAlignment="center"
android:textSize="12sp" android:textSize="12sp"
android:textColor="?attr/toolbarTextColor" android:textColor="?attr/toolbarTextColor"
@ -102,6 +53,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:layout_width="0dp" android:layout_width="0dp"
android:drawableTop="@drawable/library_icon_favorites_circle_background"
android:drawablePadding="5dp"
android:textAlignment="center" android:textAlignment="center"
android:textSize="12sp" android:textSize="12sp"
android:textColor="?attr/toolbarTextColor" android:textColor="?attr/toolbarTextColor"
@ -111,6 +64,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:layout_width="0dp" android:layout_width="0dp"
android:drawableTop="@drawable/quick_action_icon_read"
android:drawablePadding="5dp"
android:textAlignment="center" android:textAlignment="center"
android:textSize="12sp" android:textSize="12sp"
android:textColor="?attr/toolbarTextColor" android:textColor="?attr/toolbarTextColor"