Skip to content

Commit 37bede3

Browse files
author
yuriel
committed
fixed lints
1 parent 2880963 commit 37bede3

File tree

5 files changed

+18
-38
lines changed

5 files changed

+18
-38
lines changed

components/src/main/kotlin/com/exyui/android/debugbottle/components/TestingActivity.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("DEPRECATION")
2+
13
package com.exyui.android.debugbottle.components
24

35
import android.app.Activity
@@ -12,7 +14,6 @@ import com.exyui.android.debugbottle.ui.layout.__DisplayBlockActivity
1214
/**
1315
* Created by yuriel on 8/11/16.
1416
*/
15-
@Suppress("DEPRECATION")
1617
@Deprecated("This activity is not in used.")
1718
internal class TestingActivity : Activity() {
1819
val button1 by lazy {

components/src/main/kotlin/com/exyui/android/debugbottle/components/dialog/quickviews/__QuickDialogMainView.kt

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,37 +40,26 @@ class __QuickDialogMainView: ScrollView {
4040
}
4141
private val contents by lazy { findViewById(R.id.__dt_content) }
4242

43+
@Suppress("unused")
4344
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
4445
@SuppressLint("NewApi")
4546
@JvmOverloads
4647
constructor(context: Context,
4748
attr: AttributeSet? = null,
4849
defStyleAttr: Int = 0,
4950
defStyleRes: Int = 0) : super(context, attr, defStyleAttr, defStyleRes) {
50-
init(context, attr, defStyleAttr, defStyleRes)
51+
init()
5152
}
5253

53-
private fun init(context: Context, attr: AttributeSet? = null, defStyleAttr: Int? = null, defStyleRes: Int? = null) {
54+
private fun init() {
5455
bindViews()
55-
initAttrs(context, attr, defStyleAttr?: 0, defStyleRes?: 0)
5656
}
5757

5858
private fun bindViews() {
5959
inflate(context, R.layout.__view_quick_main, this)
6060
rootChild.generateItemViews()
6161
}
6262

63-
private fun initAttrs(context: Context, attr: AttributeSet?, defStyleAttr: Int = 0, defStyleRes: Int = 0) {
64-
// val ta = context.theme.obtainStyledAttributes(attr, R.styleable.__DTListItem, defStyleAttr, defStyleRes)
65-
// try {
66-
// title = ta.getString(R.styleable.__DTListItem___dt_title)?: ""
67-
// content = ta.getString(R.styleable.__DTListItem___dt_content)?: ""
68-
// isSmart = ta.getBoolean(R.styleable.__DTListItem___dt_smart, false)
69-
// } finally {
70-
// ta.recycle()
71-
// }
72-
}
73-
7463
private fun ViewGroup.generateItemViews()/*: List<__QuickDialogItemView>*/ {
7564
if (QuickEntry.isEmpty()) {
7665
emptyView.visibility = VISIBLE

components/src/main/kotlin/com/exyui/android/debugbottle/components/dialog/quickviews/__QuickDialogTogglesView.kt

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,24 @@ class __QuickDialogTogglesView: ScrollView {
3232
private val frameSwitcher by lazy { rootView?.frameSwitcher(R.id.__dt_frame_switcher) }
3333

3434
constructor(context: Context): super(context) {
35-
init(context)
35+
init()
3636
}
3737
constructor(context: Context, attr: AttributeSet): super(context, attr) {
38-
init(context, attr)
38+
init()
3939
}
4040
constructor(context: Context, attr: AttributeSet, defStyleAttr: Int): super(context, attr, defStyleAttr) {
41-
init(context, attr, defStyleAttr)
41+
init()
4242
}
4343

44+
@Suppress("unused")
4445
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
4546
@SuppressLint("NewApi")
4647
constructor(context: Context, attr: AttributeSet, defStyleAttr: Int, defStyleRes: Int): super(context, attr, defStyleAttr, defStyleRes) {
47-
init(context, attr, defStyleAttr, defStyleRes)
48+
init()
4849
}
4950

50-
private fun init(context: Context, attr: AttributeSet? = null, defStyleAttr: Int? = null, defStyleRes: Int? = null) {
51+
private fun init() {
5152
bindViews()
52-
initAttrs(context, attr, defStyleAttr?: 0, defStyleRes?: 0)
5353
}
5454

5555
private fun bindViews() {
@@ -58,17 +58,6 @@ class __QuickDialogTogglesView: ScrollView {
5858
frameSwitcher
5959
}
6060

61-
private fun initAttrs(context: Context, attr: AttributeSet?, defStyleAttr: Int = 0, defStyleRes: Int = 0) {
62-
// val ta = context.theme.obtainStyledAttributes(attr, R.styleable.__DTListItem, defStyleAttr, defStyleRes)
63-
// try {
64-
// title = ta.getString(R.styleable.__DTListItem___dt_title)?: ""
65-
// content = ta.getString(R.styleable.__DTListItem___dt_content)?: ""
66-
// isSmart = ta.getBoolean(R.styleable.__DTListItem___dt_smart, false)
67-
// } finally {
68-
// ta.recycle()
69-
// }
70-
}
71-
7261
override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) {
7362
super.onLayout(changed, l, t, r, b)
7463
registerBubbleStatusChangeReceiver()

components/src/main/kotlin/com/exyui/android/debugbottle/components/dialog/quickviews/__QuickStackView.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,23 @@ class __QuickStackView: ScrollView {
2121
private val TAG = "__QuickStackView"
2222

2323
constructor(context: Context): super(context) {
24-
init(context)
24+
init()
2525
}
2626
constructor(context: Context, attr: AttributeSet): super(context, attr) {
27-
init(context, attr)
27+
init()
2828
}
2929
constructor(context: Context, attr: AttributeSet, defStyleAttr: Int): super(context, attr, defStyleAttr) {
30-
init(context, attr, defStyleAttr)
30+
init()
3131
}
3232

33+
@Suppress("unused")
3334
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
3435
@SuppressLint("NewApi")
3536
constructor(context: Context, attr: AttributeSet, defStyleAttr: Int, defStyleRes: Int): super(context, attr, defStyleAttr, defStyleRes) {
36-
init(context, attr, defStyleAttr, defStyleRes)
37+
init()
3738
}
3839

39-
private fun init(context: Context, attr: AttributeSet? = null, defStyleAttr: Int? = null, defStyleRes: Int? = null) {
40+
private fun init() {
4041
bindViews()
4142
}
4243

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include ':demo', ':core', ':blockcanary', ':noop-kotlin', ':components', ':views', ':runtime', ':noop-java'
1+
include ':demo', ':core', ':blockcanary', ':noop-kotlin', ':components', ':views'/*, ':runtime'*/, ':noop-java'

0 commit comments

Comments
 (0)