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( class ArcView @JvmOverloads constructor(
context: Context, context: Context,
attrs: AttributeSet? = null, attrs: AttributeSet? = null
defStyleAttr: Int = 0 ) : View(context, attrs) {
) : View(context, attrs, defStyleAttr) {
private var mWidth = 0 private var mWidth = 0
private var mHeight = 0 private var mHeight = 0

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save