adjust size of rewind/fast forward button
This commit is contained in:
parent
6ce263832b
commit
0f0573e5bd
@ -34,7 +34,7 @@ class FastForwardButton(context: Context, attrs: AttributeSet): FrameLayout(cont
|
||||
addListener(object : AnimatorListenerAdapter() {
|
||||
override fun onAnimationStart(animation: Animator?) {
|
||||
imageButton.isEnabled = false // disable button
|
||||
imageButton.setImageResource(R.drawable.ic_baseline_forward_24)
|
||||
imageButton.setBackgroundResource(R.drawable.ic_baseline_forward_24)
|
||||
}
|
||||
override fun onAnimationEnd(animation: Animator?) {
|
||||
imageButton.isEnabled = true // enable button
|
||||
@ -50,7 +50,7 @@ class FastForwardButton(context: Context, attrs: AttributeSet): FrameLayout(cont
|
||||
addListener(object : AnimatorListenerAdapter() {
|
||||
override fun onAnimationEnd(animation: Animator?) {
|
||||
imageButton.isEnabled = true // enable button
|
||||
imageButton.setImageResource(R.drawable.ic_baseline_forward_10_24)
|
||||
imageButton.setBackgroundResource(R.drawable.ic_baseline_forward_10_24)
|
||||
|
||||
textView.visibility = View.GONE
|
||||
textView.animate().translationX(0f)
|
||||
|
@ -34,7 +34,7 @@ class RewindButton(context: Context, attrs: AttributeSet): FrameLayout(context,
|
||||
addListener(object : AnimatorListenerAdapter() {
|
||||
override fun onAnimationStart(animation: Animator?) {
|
||||
imageButton.isEnabled = false // disable button
|
||||
imageButton.setImageResource(R.drawable.ic_baseline_rewind_24)
|
||||
imageButton.setBackgroundResource(R.drawable.ic_baseline_rewind_24)
|
||||
}
|
||||
override fun onAnimationEnd(animation: Animator?) {
|
||||
imageButton.isEnabled = true // enable button
|
||||
@ -50,7 +50,7 @@ class RewindButton(context: Context, attrs: AttributeSet): FrameLayout(context,
|
||||
addListener(object : AnimatorListenerAdapter() {
|
||||
override fun onAnimationEnd(animation: Animator?) {
|
||||
imageButton.isEnabled = true // enable button
|
||||
imageButton.setImageResource(R.drawable.ic_baseline_rewind_10_24)
|
||||
imageButton.setBackgroundResource(R.drawable.ic_baseline_rewind_10_24)
|
||||
|
||||
textView.visibility = View.GONE
|
||||
textView.animate().translationX(0f)
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
@ -9,11 +8,8 @@
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="@android:color/transparent"
|
||||
android:contentDescription="@string/forward_10"
|
||||
android:scaleX="1.5"
|
||||
android:scaleY="1.5"
|
||||
app:srcCompat="@drawable/ic_baseline_forward_10_24" />
|
||||
android:background="@drawable/ic_baseline_forward_10_24"
|
||||
android:contentDescription="@string/forward_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true">
|
||||
@ -10,11 +9,8 @@
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="@android:color/transparent"
|
||||
android:contentDescription="@string/forward_10"
|
||||
android:scaleX="1.5"
|
||||
android:scaleY="1.5"
|
||||
app:srcCompat="@drawable/ic_baseline_rewind_10_24" />
|
||||
android:background="@drawable/ic_baseline_rewind_10_24"
|
||||
android:contentDescription="@string/forward_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
|
Loading…
Reference in New Issue
Block a user