Fix many compilation warnings
This commit is contained in:
@@ -10,15 +10,16 @@ abstract class FABAnimationBase : FloatingActionButton.Behavior() {
|
||||
var isAnimatingOut = false
|
||||
|
||||
override fun onStartNestedScroll(coordinatorLayout: CoordinatorLayout, child: FloatingActionButton,
|
||||
directTargetChild: View, target: View, nestedScrollAxes: Int): Boolean {
|
||||
directTargetChild: View, target: View, axes: Int, type: Int): Boolean {
|
||||
// Ensure we react to vertical scrolling
|
||||
return nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL ||
|
||||
super.onStartNestedScroll(coordinatorLayout, child, directTargetChild, target, nestedScrollAxes)
|
||||
return axes == ViewCompat.SCROLL_AXIS_VERTICAL ||
|
||||
super.onStartNestedScroll(coordinatorLayout, child, directTargetChild, target, axes, type)
|
||||
}
|
||||
|
||||
override fun onNestedScroll(coordinatorLayout: CoordinatorLayout, child: FloatingActionButton, target: View,
|
||||
dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int) {
|
||||
super.onNestedScroll(coordinatorLayout, child, target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed)
|
||||
override fun onNestedScroll(coordinatorLayout: CoordinatorLayout, child: FloatingActionButton,
|
||||
target: View, dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int,
|
||||
dyUnconsumed: Int, type: Int) {
|
||||
super.onNestedScroll(coordinatorLayout, child, target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, type)
|
||||
if (dyConsumed > 0 && !isAnimatingOut && child.visibility == View.VISIBLE) {
|
||||
// User scrolled down and the FAB is currently visible -> hide the FAB
|
||||
animateOut(child)
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.view.animation.Animation
|
||||
import android.view.animation.AnimationUtils
|
||||
import eu.kanade.tachiyomi.R
|
||||
|
||||
@Suppress("unused", "UNUSED_PARAMETER")
|
||||
class FABAnimationUpDown @JvmOverloads constructor(ctx: Context, attrs: AttributeSet? = null) : FABAnimationBase() {
|
||||
|
||||
private val INTERPOLATOR = FastOutSlowInInterpolator()
|
||||
|
||||
@@ -48,6 +48,7 @@ open class SimpleNavigationView @JvmOverloads constructor(
|
||||
R.styleable.NavigationView_elevation, 0).toFloat())
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
ViewCompat.setFitsSystemWindows(this,
|
||||
a.getBoolean(R.styleable.NavigationView_android_fitsSystemWindows, false))
|
||||
|
||||
@@ -61,6 +62,7 @@ open class SimpleNavigationView @JvmOverloads constructor(
|
||||
/**
|
||||
* Overriden to measure the width of the navigation view.
|
||||
*/
|
||||
@SuppressLint("SwitchIntDef")
|
||||
override fun onMeasure(widthSpec: Int, heightSpec: Int) {
|
||||
val width = when (MeasureSpec.getMode(widthSpec)) {
|
||||
MeasureSpec.AT_MOST -> MeasureSpec.makeMeasureSpec(
|
||||
|
||||
@@ -31,14 +31,14 @@ abstract class LoginDialogPreference(bundle: Bundle? = null) : DialogController(
|
||||
.negativeText(android.R.string.cancel)
|
||||
.build()
|
||||
|
||||
onViewCreated(dialog.view, savedState)
|
||||
onViewCreated(dialog.view)
|
||||
|
||||
return dialog
|
||||
}
|
||||
|
||||
fun onViewCreated(view: View, savedState: Bundle?) {
|
||||
fun onViewCreated(view: View) {
|
||||
v = view.apply {
|
||||
show_password.setOnCheckedChangeListener { v, isChecked ->
|
||||
show_password.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked)
|
||||
password.transformationMethod = null
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user