diff --git a/app/src/main/java/io/legado/app/ui/widget/DetailSeekBar.kt b/app/src/main/java/io/legado/app/ui/widget/DetailSeekBar.kt index 5198599e4..010ebba78 100644 --- a/app/src/main/java/io/legado/app/ui/widget/DetailSeekBar.kt +++ b/app/src/main/java/io/legado/app/ui/widget/DetailSeekBar.kt @@ -13,7 +13,10 @@ import io.legado.app.utils.progressAdd import kotlinx.android.synthetic.main.view_detail_seek_bar.view.* import org.jetbrains.anko.sdk27.listeners.onClick -class DetailSeekBar(context: Context, attrs: AttributeSet?) : FrameLayout(context, attrs), +class DetailSeekBar @JvmOverloads constructor( + context: Context, + attrs: AttributeSet? = null +) : FrameLayout(context, attrs), SeekBar.OnSeekBarChangeListener { private val isBottomBackground: Boolean var valueFormat: ((progress: Int) -> String)? = null diff --git a/app/src/main/java/io/legado/app/ui/widget/LabelsBar.kt b/app/src/main/java/io/legado/app/ui/widget/LabelsBar.kt index 4d51c5b80..01c4957db 100644 --- a/app/src/main/java/io/legado/app/ui/widget/LabelsBar.kt +++ b/app/src/main/java/io/legado/app/ui/widget/LabelsBar.kt @@ -8,7 +8,10 @@ import io.legado.app.ui.widget.text.AccentBgTextView import io.legado.app.utils.dp @Suppress("unused", "MemberVisibilityCanBePrivate") -class LabelsBar(context: Context, attrs: AttributeSet?) : LinearLayout(context, attrs) { +class LabelsBar @JvmOverloads constructor( + context: Context, + attrs: AttributeSet? = null +) : LinearLayout(context, attrs) { private val unUsedViews = arrayListOf() private val usedViews = arrayListOf() diff --git a/app/src/main/java/io/legado/app/ui/widget/SelectActionBar.kt b/app/src/main/java/io/legado/app/ui/widget/SelectActionBar.kt index fd478ae42..3fc481e8b 100644 --- a/app/src/main/java/io/legado/app/ui/widget/SelectActionBar.kt +++ b/app/src/main/java/io/legado/app/ui/widget/SelectActionBar.kt @@ -17,7 +17,10 @@ import kotlinx.android.synthetic.main.view_select_action_bar.view.* import org.jetbrains.anko.sdk27.listeners.onClick @Suppress("unused") -class SelectActionBar(context: Context, attrs: AttributeSet?) : FrameLayout(context, attrs) { +class SelectActionBar @JvmOverloads constructor( + context: Context, + attrs: AttributeSet? = null +) : FrameLayout(context, attrs) { private var callBack: CallBack? = null private var selMenu: PopupMenu? = null diff --git a/app/src/main/java/io/legado/app/ui/widget/ShadowLayout.kt b/app/src/main/java/io/legado/app/ui/widget/ShadowLayout.kt index 76668e772..95e54ac63 100644 --- a/app/src/main/java/io/legado/app/ui/widget/ShadowLayout.kt +++ b/app/src/main/java/io/legado/app/ui/widget/ShadowLayout.kt @@ -14,11 +14,10 @@ import io.legado.app.utils.getCompatColor /** * ShadowLayout.java * - * * Created by lijiankun on 17/8/11. */ @Suppress("unused") -class ShadowLayout( +class ShadowLayout @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null ) : RelativeLayout(context, attrs) { diff --git a/app/src/main/java/io/legado/app/ui/widget/TitleBar.kt b/app/src/main/java/io/legado/app/ui/widget/TitleBar.kt index a30873671..51a04f97d 100644 --- a/app/src/main/java/io/legado/app/ui/widget/TitleBar.kt +++ b/app/src/main/java/io/legado/app/ui/widget/TitleBar.kt @@ -22,7 +22,10 @@ import org.jetbrains.anko.bottomPadding import org.jetbrains.anko.topPadding @Suppress("unused") -class TitleBar(context: Context, attrs: AttributeSet?) : AppBarLayout(context, attrs) { +class TitleBar @JvmOverloads constructor( + context: Context, + attrs: AttributeSet? = null +) : AppBarLayout(context, attrs) { val toolbar: Toolbar val menu: Menu