mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-12 20:19:05 +01:00
Use Kolinter Gradle plugin for linting instead of ktlint directly
This commit is contained in:
@@ -59,11 +59,13 @@ class ActionToolbar @JvmOverloads constructor(context: Context, attrs: Attribute
|
||||
*/
|
||||
fun hide() {
|
||||
val bottomAnimation = AnimationUtils.loadAnimation(context, R.anim.exit_to_bottom)
|
||||
bottomAnimation.setAnimationListener(object : SimpleAnimationListener() {
|
||||
override fun onAnimationEnd(animation: Animation) {
|
||||
common_action_toolbar.isVisible = false
|
||||
bottomAnimation.setAnimationListener(
|
||||
object : SimpleAnimationListener() {
|
||||
override fun onAnimationEnd(animation: Animation) {
|
||||
common_action_toolbar.isVisible = false
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
common_action_toolbar.startAnimation(bottomAnimation)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ import androidx.annotation.StringRes
|
||||
import androidx.appcompat.widget.AppCompatButton
|
||||
import androidx.core.view.isVisible
|
||||
import eu.kanade.tachiyomi.R
|
||||
import kotlin.random.Random
|
||||
import kotlinx.android.synthetic.main.common_view_empty.view.actions_container
|
||||
import kotlinx.android.synthetic.main.common_view_empty.view.text_face
|
||||
import kotlinx.android.synthetic.main.common_view_empty.view.text_label
|
||||
import kotlin.random.Random
|
||||
|
||||
class EmptyView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||
RelativeLayout(context, attrs) {
|
||||
|
||||
@@ -12,7 +12,9 @@ class MaterialFastScroll @JvmOverloads constructor(context: Context, attrs: Attr
|
||||
|
||||
init {
|
||||
setViewsToUse(
|
||||
R.layout.material_fastscroll, R.id.fast_scroller_bubble, R.id.fast_scroller_handle
|
||||
R.layout.material_fastscroll,
|
||||
R.id.fast_scroller_bubble,
|
||||
R.id.fast_scroller_handle
|
||||
)
|
||||
autoHideEnabled = true
|
||||
ignoreTouchesOutsideHandle = true
|
||||
|
||||
@@ -18,7 +18,9 @@ class NegativeSeekBar @JvmOverloads constructor(context: Context, attrs: Attribu
|
||||
init {
|
||||
val styledAttributes = context.obtainStyledAttributes(
|
||||
attrs,
|
||||
R.styleable.NegativeSeekBar, 0, 0
|
||||
R.styleable.NegativeSeekBar,
|
||||
0,
|
||||
0
|
||||
)
|
||||
|
||||
try {
|
||||
@@ -28,19 +30,21 @@ class NegativeSeekBar @JvmOverloads constructor(context: Context, attrs: Attribu
|
||||
styledAttributes.recycle()
|
||||
}
|
||||
|
||||
super.setOnSeekBarChangeListener(object : OnSeekBarChangeListener {
|
||||
override fun onProgressChanged(seekBar: SeekBar?, value: Int, fromUser: Boolean) {
|
||||
listener?.onProgressChanged(seekBar, minValue + value, fromUser)
|
||||
}
|
||||
super.setOnSeekBarChangeListener(
|
||||
object : OnSeekBarChangeListener {
|
||||
override fun onProgressChanged(seekBar: SeekBar?, value: Int, fromUser: Boolean) {
|
||||
listener?.onProgressChanged(seekBar, minValue + value, fromUser)
|
||||
}
|
||||
|
||||
override fun onStartTrackingTouch(p0: SeekBar?) {
|
||||
listener?.onStartTrackingTouch(p0)
|
||||
}
|
||||
override fun onStartTrackingTouch(p0: SeekBar?) {
|
||||
listener?.onStartTrackingTouch(p0)
|
||||
}
|
||||
|
||||
override fun onStopTrackingTouch(p0: SeekBar?) {
|
||||
listener?.onStopTrackingTouch(p0)
|
||||
override fun onStopTrackingTouch(p0: SeekBar?) {
|
||||
listener?.onStopTrackingTouch(p0)
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
override fun setProgress(progress: Int) {
|
||||
|
||||
@@ -25,7 +25,11 @@ class RevealAnimationView @JvmOverloads constructor(context: Context, attrs: Att
|
||||
|
||||
// Create the animation (the final radius is zero).
|
||||
val anim = ViewAnimationUtils.createCircularReveal(
|
||||
this, centerX, centerY, initialRadius.toFloat(), 0f
|
||||
this,
|
||||
centerX,
|
||||
centerY,
|
||||
initialRadius.toFloat(),
|
||||
0f
|
||||
)
|
||||
|
||||
// Set duration of animation.
|
||||
@@ -55,7 +59,11 @@ class RevealAnimationView @JvmOverloads constructor(context: Context, attrs: Att
|
||||
|
||||
// Create animation
|
||||
val anim = ViewAnimationUtils.createCircularReveal(
|
||||
this, centerX, centerY, 0f, height.toFloat()
|
||||
this,
|
||||
centerX,
|
||||
centerY,
|
||||
0f,
|
||||
height.toFloat()
|
||||
)
|
||||
|
||||
// Set duration of animation
|
||||
|
||||
@@ -18,8 +18,8 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import com.google.android.material.R
|
||||
import com.google.android.material.internal.ScrimInsetsFrameLayout
|
||||
import com.google.android.material.textfield.TextInputLayout
|
||||
import eu.kanade.tachiyomi.R as TR
|
||||
import eu.kanade.tachiyomi.util.view.inflate
|
||||
import eu.kanade.tachiyomi.R as TR
|
||||
|
||||
@Suppress("LeakingThis")
|
||||
@SuppressLint("PrivateResource", "RestrictedApi")
|
||||
@@ -37,20 +37,24 @@ open class SimpleNavigationView @JvmOverloads constructor(
|
||||
init {
|
||||
// Custom attributes
|
||||
val a = TintTypedArray.obtainStyledAttributes(
|
||||
context, attrs,
|
||||
R.styleable.NavigationView, defStyleAttr,
|
||||
context,
|
||||
attrs,
|
||||
R.styleable.NavigationView,
|
||||
defStyleAttr,
|
||||
R.style.Widget_Design_NavigationView
|
||||
)
|
||||
|
||||
ViewCompat.setBackground(
|
||||
this, a.getDrawable(R.styleable.NavigationView_android_background)
|
||||
this,
|
||||
a.getDrawable(R.styleable.NavigationView_android_background)
|
||||
)
|
||||
|
||||
if (a.hasValue(R.styleable.NavigationView_elevation)) {
|
||||
ViewCompat.setElevation(
|
||||
this,
|
||||
a.getDimensionPixelSize(
|
||||
R.styleable.NavigationView_elevation, 0
|
||||
R.styleable.NavigationView_elevation,
|
||||
0
|
||||
).toFloat()
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user