Fix more fast-scroll issues
Fix two more fast scrolling issues: - Fixed size of the view would cut off larger fonts - Thumb would briefly show when the view would initially start This custom view was a mistake, but anything for less kbs.
This commit is contained in:
parent
6d5ed6dd7b
commit
194bcfcd05
4 changed files with 13 additions and 3 deletions
|
@ -105,7 +105,7 @@ dependencies {
|
|||
implementation "com.google.android.material:material:1.3.0"
|
||||
|
||||
// Dialogs
|
||||
// TODO: Eliminate these, don't want their bloat.
|
||||
// TODO: Eliminate these, would eliminate ~100kb from the app size
|
||||
implementation "com.afollestad.material-dialogs:core:3.3.0"
|
||||
implementation "com.afollestad.material-dialogs:files:3.3.0"
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import android.view.MotionEvent
|
|||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.core.view.postDelayed
|
||||
import androidx.dynamicanimation.animation.DynamicAnimation
|
||||
import androidx.dynamicanimation.animation.SpringAnimation
|
||||
import androidx.dynamicanimation.animation.SpringForce
|
||||
|
@ -71,6 +72,14 @@ class FastScrollView @JvmOverloads constructor(
|
|||
it.dampingRatio = SpringForce.DAMPING_RATIO_NO_BOUNCY
|
||||
}
|
||||
}
|
||||
|
||||
// Prevent the disappear animation from being displayed on startup by making the thumb
|
||||
// invisible, it will be made visible once the animation ends
|
||||
binding.scrollThumb.visibility = View.INVISIBLE
|
||||
|
||||
postDelayed(200) {
|
||||
binding.scrollThumb.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/scroll_indicator_text"
|
||||
android:layout_width="@dimen/width_fast_scroll"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:gravity="center"
|
||||
|
@ -40,6 +40,7 @@
|
|||
android:lineSpacingExtra="@dimen/padding_tiny"
|
||||
android:paddingTop="@dimen/padding_tiny"
|
||||
android:paddingBottom="@dimen/padding_tiny"
|
||||
android:minWidth="@dimen/width_fast_scroll"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<!-- Width Namespace | Width for UI elements -->
|
||||
<dimen name="width_track_number">32dp</dimen>
|
||||
<dimen name="width_play_stroke">1dp</dimen>
|
||||
<dimen name="width_fast_scroll">18dp</dimen>
|
||||
<dimen name="width_fast_scroll">20dp</dimen>
|
||||
<dimen name="width_dialog_button_min">64dp</dimen>
|
||||
|
||||
<!-- Size Namespace | Width & Heights for UI elements -->
|
||||
|
|
Loading…
Reference in a new issue