pull/441/head
gedoor 4 years ago
parent 3891fadc64
commit 34e61195b3
  1. 1
      app/src/main/java/io/legado/app/ui/widget/dynamiclayout/DynamicFrameLayout.kt
  2. 2
      app/src/main/java/io/legado/app/ui/widget/number/NumberPickerDialog.kt
  3. 1
      app/src/main/java/io/legado/app/ui/widget/prefs/ColorPreference.kt
  4. 1
      app/src/main/java/io/legado/app/ui/widget/recycler/DividerNoLast.kt
  5. 2
      app/src/main/java/io/legado/app/ui/widget/recycler/DragSelectTouchHelper.kt
  6. 1
      app/src/main/java/io/legado/app/ui/widget/recycler/ItemTouchCallback.kt
  7. 1
      app/src/main/java/io/legado/app/ui/widget/recycler/LoadMoreView.kt
  8. 1
      app/src/main/java/io/legado/app/ui/widget/recycler/UpLinearLayoutManager.kt
  9. 1
      app/src/main/java/io/legado/app/ui/widget/recycler/scroller/FastScrollRecyclerView.kt
  10. 2
      app/src/main/java/io/legado/app/ui/widget/recycler/scroller/FastScroller.kt
  11. 1
      app/src/main/java/io/legado/app/ui/widget/seekbar/VerticalSeekBar.kt
  12. 3
      app/src/main/java/io/legado/app/utils/FloatExtensions.kt
  13. 2
      app/src/main/java/io/legado/app/utils/NetworkUtils.kt

@ -12,6 +12,7 @@ import androidx.appcompat.widget.AppCompatTextView
import io.legado.app.R import io.legado.app.R
import kotlinx.android.synthetic.main.view_dynamic.view.* import kotlinx.android.synthetic.main.view_dynamic.view.*
@Suppress("unused")
class DynamicFrameLayout(context: Context, attrs: AttributeSet?) : FrameLayout(context, attrs), ViewSwitcher { class DynamicFrameLayout(context: Context, attrs: AttributeSet?) : FrameLayout(context, attrs), ViewSwitcher {
private var errorView: View? = null private var errorView: View? = null

@ -48,7 +48,7 @@ class NumberPickerDialog(context: Context) {
listener?.invoke() listener?.invoke()
} }
} }
return this; return this
} }
fun show(callBack: ((value: Int) -> Unit)?) { fun show(callBack: ((value: Int) -> Unit)?) {

@ -16,6 +16,7 @@ import com.jaredrummler.android.colorpicker.*
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.utils.ColorUtils import io.legado.app.utils.ColorUtils
@Suppress("MemberVisibilityCanBePrivate", "unused")
class ColorPreference(context: Context, attrs: AttributeSet) : Preference(context, attrs), class ColorPreference(context: Context, attrs: AttributeSet) : Preference(context, attrs),
ColorPickerDialogListener { ColorPickerDialogListener {

@ -14,6 +14,7 @@ import kotlin.math.roundToInt
/** /**
* 不画最后一条分隔线 * 不画最后一条分隔线
*/ */
@Suppress("MemberVisibilityCanBePrivate", "RedundantRequireNotNullCall", "unused")
class DividerNoLast(context: Context, orientation: Int) : class DividerNoLast(context: Context, orientation: Int) :
RecyclerView.ItemDecoration() { RecyclerView.ItemDecoration() {

@ -51,7 +51,7 @@ import kotlin.math.min
* | | ----------------------------------------------> | | * | | ----------------------------------------------> | |
* +-------------------+ +-----------------------+ * +-------------------+ +-----------------------+
*/ */
@Suppress("unused") @Suppress("unused", "MemberVisibilityCanBePrivate")
class DragSelectTouchHelper( class DragSelectTouchHelper(
/** /**
* Developer callback which controls the behavior of DragSelectTouchHelper. * Developer callback which controls the behavior of DragSelectTouchHelper.

@ -12,6 +12,7 @@ import androidx.viewpager.widget.ViewPager
* Created by GKF on 2018/3/16. * Created by GKF on 2018/3/16.
*/ */
@Suppress("MemberVisibilityCanBePrivate")
class ItemTouchCallback(private val callback: Callback) : ItemTouchHelper.Callback() { class ItemTouchCallback(private val callback: Callback) : ItemTouchHelper.Callback() {
private var swipeRefreshLayout: SwipeRefreshLayout? = null private var swipeRefreshLayout: SwipeRefreshLayout? = null

@ -9,6 +9,7 @@ import io.legado.app.utils.invisible
import io.legado.app.utils.visible 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")
class LoadMoreView(context: Context) : FrameLayout(context) { class LoadMoreView(context: Context) : FrameLayout(context) {
var hasMore = true var hasMore = true

@ -4,6 +4,7 @@ import android.content.Context
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.LinearSmoothScroller import androidx.recyclerview.widget.LinearSmoothScroller
@Suppress("MemberVisibilityCanBePrivate", "unused")
class UpLinearLayoutManager(val context: Context) : LinearLayoutManager(context) { class UpLinearLayoutManager(val context: Context) : LinearLayoutManager(context) {
fun smoothScrollToPosition(position: Int) { fun smoothScrollToPosition(position: Int) {

@ -7,6 +7,7 @@ import androidx.annotation.ColorInt
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import io.legado.app.R import io.legado.app.R
@Suppress("MemberVisibilityCanBePrivate", "unused")
class FastScrollRecyclerView : RecyclerView { class FastScrollRecyclerView : RecyclerView {
private lateinit var mFastScroller: FastScroller private lateinit var mFastScroller: FastScroller

@ -33,9 +33,11 @@ import kotlin.math.min
import kotlin.math.roundToInt import kotlin.math.roundToInt
@Suppress("SameParameterValue")
class FastScroller : LinearLayout { class FastScroller : LinearLayout {
@ColorInt @ColorInt
private var mBubbleColor: Int = 0 private var mBubbleColor: Int = 0
@ColorInt @ColorInt
private var mHandleColor: Int = 0 private var mHandleColor: Int = 0
private var mBubbleHeight: Int = 0 private var mBubbleHeight: Int = 0

@ -16,6 +16,7 @@ import io.legado.app.lib.theme.ThemeStore
import java.lang.reflect.InvocationTargetException import java.lang.reflect.InvocationTargetException
import java.lang.reflect.Method import java.lang.reflect.Method
@Suppress("SameParameterValue")
class VerticalSeekBar : AppCompatSeekBar { class VerticalSeekBar : AppCompatSeekBar {
private var mIsDragging: Boolean = false private var mIsDragging: Boolean = false

@ -1,3 +1,5 @@
@file:Suppress("unused")
package io.legado.app.utils package io.legado.app.utils
import android.content.res.Resources import android.content.res.Resources
@ -7,7 +9,6 @@ val Float.dp: Float
android.util.TypedValue.COMPLEX_UNIT_DIP, this, Resources.getSystem().displayMetrics android.util.TypedValue.COMPLEX_UNIT_DIP, this, Resources.getSystem().displayMetrics
) )
val Float.sp: Float val Float.sp: Float
get() = android.util.TypedValue.applyDimension( get() = android.util.TypedValue.applyDimension(
android.util.TypedValue.COMPLEX_UNIT_SP, this, Resources.getSystem().displayMetrics android.util.TypedValue.COMPLEX_UNIT_SP, this, Resources.getSystem().displayMetrics

@ -8,7 +8,7 @@ import java.net.URL
import java.util.* import java.util.*
import java.util.regex.Pattern import java.util.regex.Pattern
@Suppress("unused") @Suppress("unused", "MemberVisibilityCanBePrivate")
object NetworkUtils { object NetworkUtils {
fun getUrl(response: Response<*>): String { fun getUrl(response: Response<*>): String {
val networkResponse = response.raw().networkResponse() val networkResponse = response.raw().networkResponse()

Loading…
Cancel
Save