pull/436/head 3.20.102119
gedoor 4 years ago
parent f3d7ada581
commit 4f9728e51d
  1. 5
      app/src/main/java/io/legado/app/ui/widget/ArcView.kt
  2. 5
      app/src/main/java/io/legado/app/ui/widget/SearchView.kt
  3. 5
      app/src/main/java/io/legado/app/ui/widget/anima/RefreshProgressBar.kt
  4. 5
      app/src/main/java/io/legado/app/ui/widget/anima/RotateLoading.kt
  5. 6
      app/src/main/java/io/legado/app/ui/widget/image/CoverImageView.kt
  6. 5
      app/src/main/java/io/legado/app/ui/widget/image/FilletImageView.kt
  7. 5
      app/src/main/java/io/legado/app/ui/widget/image/PhotoView.kt
  8. 3
      app/src/main/java/io/legado/app/ui/widget/recycler/LoadMoreView.kt
  9. 5
      app/src/main/java/io/legado/app/ui/widget/seekbar/VerticalSeekBarWrapper.kt
  10. 6
      app/src/main/java/io/legado/app/ui/widget/text/BadgeView.kt
  11. 15
      app/src/main/java/io/legado/app/ui/widget/text/InertiaScrollTextView.kt

@ -8,9 +8,8 @@ import io.legado.app.R
class ArcView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : View(context, attrs, defStyleAttr) {
attrs: AttributeSet? = null
) : View(context, attrs) {
private var mWidth = 0
private var mHeight = 0

@ -18,9 +18,8 @@ import io.legado.app.R
class SearchView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : SearchView(context, attrs, defStyleAttr) {
attrs: AttributeSet? = null
) : SearchView(context, attrs) {
private var mSearchHintIcon: Drawable? = null
private var textView: TextView? = null

@ -14,9 +14,8 @@ import io.legado.app.R
@Suppress("unused", "MemberVisibilityCanBePrivate")
class RefreshProgressBar @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : View(context, attrs, defStyleAttr) {
attrs: AttributeSet? = null
) : View(context, attrs) {
private var a = 1
private var durProgress = 0
private var secondDurProgress = 0

@ -20,9 +20,8 @@ import io.legado.app.utils.dp
@Suppress("MemberVisibilityCanBePrivate")
class RotateLoading @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : View(context, attrs, defStyleAttr) {
attrs: AttributeSet? = null
) : View(context, attrs) {
private var mPaint: Paint

@ -22,12 +22,10 @@ import io.legado.app.utils.getPrefString
@Suppress("unused")
class CoverImageView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
attrs: AttributeSet? = null
) : androidx.appcompat.widget.AppCompatImageView(
context,
attrs,
defStyleAttr
attrs
) {
internal var width: Float = 0.toFloat()
internal var height: Float = 0.toFloat()

@ -12,9 +12,8 @@ import kotlin.math.max
class FilletImageView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : AppCompatImageView(context, attrs, defStyleAttr) {
attrs: AttributeSet? = null
) : AppCompatImageView(context, attrs) {
internal var width: Float = 0.toFloat()
internal var height: Float = 0.toFloat()
private var leftTopRadius: Int = 0

@ -27,9 +27,8 @@ import kotlin.math.roundToInt
@Suppress("UNUSED_PARAMETER", "unused", "MemberVisibilityCanBePrivate", "PropertyName")
class PhotoView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : AppCompatImageView(context, attrs, defStyleAttr) {
attrs: AttributeSet? = null
) : AppCompatImageView(context, attrs) {
val MIN_ROTATE = 35
val ANIMA_DURING = 340
val MAX_SCALE = 2.5f

@ -1,6 +1,7 @@
package io.legado.app.ui.widget.recycler
import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.view.ViewGroup
import android.widget.FrameLayout
@ -10,7 +11,7 @@ import io.legado.app.utils.visible
import kotlinx.android.synthetic.main.view_load_more.view.*
@Suppress("unused")
class LoadMoreView(context: Context) : FrameLayout(context) {
class LoadMoreView(context: Context, attrs: AttributeSet? = null) : FrameLayout(context, attrs) {
var hasMore = true
private set

@ -13,9 +13,8 @@ import kotlin.math.max
class VerticalSeekBarWrapper @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : FrameLayout(context, attrs, defStyleAttr) {
attrs: AttributeSet? = null
) : FrameLayout(context, attrs) {
private val childSeekBar: VerticalSeekBar?
get() {

@ -24,11 +24,11 @@ import io.legado.app.utils.visible
/**
* Created by milad heydari on 5/6/2016.
*/
@Suppress("MemberVisibilityCanBePrivate", "unused")
class BadgeView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = android.R.attr.textViewStyle
) : AppCompatTextView(context, attrs, defStyle) {
attrs: AttributeSet? = null
) : AppCompatTextView(context, attrs) {
var isHideOnNull = true
set(hideOnNull) {

@ -15,14 +15,11 @@ import kotlin.math.max
import kotlin.math.min
open class InertiaScrollTextView : AppCompatTextView {
constructor(context: Context) : super(context)
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int)
: super(context, attrs, defStyleAttr)
@Suppress("unused")
open class InertiaScrollTextView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null
) : AppCompatTextView(context, attrs) {
private val scrollStateIdle = 0
private val scrollStateDragging = 1
@ -218,7 +215,7 @@ open class InertiaScrollTextView : AppCompatTextView {
}
}
internal fun postOnAnimation() {
fun postOnAnimation() {
if (mEatRunOnAnimationRequest) {
mReSchedulePostAnimationCallback = true
} else {

Loading…
Cancel
Save