Skip to content

Commit 1a12af0

Browse files
committed
fix: lint issues
1 parent a05dae7 commit 1a12af0

File tree

49 files changed

+153
-151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+153
-151
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ android {
1919
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2020
}
2121

22-
2322
buildTypes {
2423
buildTypes {
2524
getByName(BuildTypes.RELEASE) {
@@ -51,8 +50,7 @@ dependencies {
5150
implementation(Libs.navigation_fragment_ktx)
5251
implementation(Libs.navigation_ui_ktx)
5352

54-
debugImplementation ("com.squareup.leakcanary:leakcanary-android:2.6")
55-
53+
debugImplementation("com.squareup.leakcanary:leakcanary-android:2.6")
5654

5755
implementation(Libs.hilt_android)
5856
kapt(Libs.hilt_android_compiler)
@@ -62,4 +60,4 @@ dependencies {
6260
testImplementation(Libs.junit_junit)
6361
androidTestImplementation(Libs.androidx_test_ext_junit)
6462
androidTestImplementation(Libs.espresso_core)
65-
}
63+
}

app/src/androidTest/java/com/kryptkode/swahpee/ExampleInstrumentedTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ class ExampleInstrumentedTest {
1919
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
2020
assertEquals("com.kryptkode.swahpee", appContext.packageName)
2121
}
22-
}
22+
}

app/src/test/java/com/kryptkode/swahpee/ExampleUnitTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ class ExampleUnitTest {
1313
fun addition_isCorrect() {
1414
assertEquals(4, 2 + 2)
1515
}
16-
}
16+
}

common/androidShared/build.gradle.kts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ plugins {
55
dependencies {
66

77
implementation(Libs.kotlinx_coroutines_android)
8-
implementation (Libs.kotlinx_coroutines_core)
8+
implementation(Libs.kotlinx_coroutines_core)
99

10-
implementation (Libs.timber)
11-
implementation (Libs.core_ktx)
12-
implementation (Libs.appcompat)
10+
implementation(Libs.timber)
11+
implementation(Libs.core_ktx)
12+
implementation(Libs.appcompat)
1313

14-
implementation (Libs.material)
15-
implementation (Libs.constraintlayout)
14+
implementation(Libs.material)
15+
implementation(Libs.constraintlayout)
1616

17-
implementation (Libs.fragment_ktx)
17+
implementation(Libs.fragment_ktx)
1818

19-
implementation (Libs.lifecycle_common_java8)
20-
21-
}
19+
implementation(Libs.lifecycle_common_java8)
20+
}

common/androidShared/src/main/java/com/kryptkode/commonandroid/AttrUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ object AttrUtils {
1212
styledAttr.recycle()
1313
return colorInt
1414
}
15-
}
15+
}

common/androidShared/src/main/java/com/kryptkode/commonandroid/ToastHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ class ToastHelper constructor(private val context: Context) {
77
fun showMessage(message: String) {
88
Toast.makeText(context, message, Toast.LENGTH_SHORT).show()
99
}
10-
}
10+
}

common/androidShared/src/main/java/com/kryptkode/commonandroid/customviews/EmptyRecyclerView.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class EmptyRecyclerView : RecyclerView {
2828
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {}
2929

3030
constructor(
31-
context: Context, attrs: AttributeSet,
31+
context: Context,
32+
attrs: AttributeSet,
3233
defStyle: Int
3334
) : super(context, attrs, defStyle) {
3435
}
@@ -53,6 +54,4 @@ class EmptyRecyclerView : RecyclerView {
5354
this.emptyView = emptyView
5455
checkIfEmpty()
5556
}
56-
57-
58-
}
57+
}

common/androidShared/src/main/java/com/kryptkode/commonandroid/customviews/ReadMoreTextView.kt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -190,24 +190,25 @@ class ReadMoreTextView @JvmOverloads constructor(context: Context, attrs: Attrib
190190
}
191191
}
192192

193-
194193
private fun onGlobalLayoutLineEndIndex() {
195194
if (trimMode == TRIM_MODE_LINES) {
196-
viewTreeObserver.addOnGlobalLayoutListener(object :
197-
ViewTreeObserver.OnGlobalLayoutListener {
198-
@SuppressLint("ObsoleteSdkInt")
199-
@Suppress("DEPRECATION")
200-
override fun onGlobalLayout() {
201-
val obs = viewTreeObserver
202-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
203-
obs.removeOnGlobalLayoutListener(this)
204-
} else {
205-
obs.removeGlobalOnLayoutListener(this)
195+
viewTreeObserver.addOnGlobalLayoutListener(
196+
object :
197+
ViewTreeObserver.OnGlobalLayoutListener {
198+
@SuppressLint("ObsoleteSdkInt")
199+
@Suppress("DEPRECATION")
200+
override fun onGlobalLayout() {
201+
val obs = viewTreeObserver
202+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
203+
obs.removeOnGlobalLayoutListener(this)
204+
} else {
205+
obs.removeGlobalOnLayoutListener(this)
206+
}
207+
refreshLineEndIndex()
208+
setText()
206209
}
207-
refreshLineEndIndex()
208-
setText()
209210
}
210-
})
211+
)
211212
}
212213
}
213214

@@ -223,7 +224,6 @@ class ReadMoreTextView @JvmOverloads constructor(context: Context, attrs: Attrib
223224
} catch (e: Exception) {
224225
e.printStackTrace()
225226
}
226-
227227
}
228228

229229
interface ReadMoreListener {

common/androidShared/src/main/java/com/kryptkode/commonandroid/extension/Activity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ fun Activity.hideKeyBoardOnTouchOfNonEditableViews() {
1414
val root = findViewById<ViewGroup>(android.R.id.content)
1515
for (view in root.children) {
1616
if (view !is TextInputLayout) {
17-
view.setOnTouchListener { _, _ ->
17+
view.setOnTouchListener { _, _ ->
1818
view.hideKeyboard()
1919
false
2020
}
2121
}
2222
}
23-
}
23+
}

common/androidShared/src/main/java/com/kryptkode/commonandroid/extension/Context.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ fun Context.openAppSettings() {
1111
val uri = Uri.fromParts("package", packageName, null)
1212
intent.data = uri
1313
startActivity(intent)
14-
}
14+
}

0 commit comments

Comments
 (0)