Skip to content

Commit a6c93b1

Browse files
authored
Merge pull request #428 from lapism/dev
Dev
2 parents 0b47cfa + 7502d2b commit a6c93b1

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Add the dependency to your gradle file:
2929
}
3030
3131
dependencies {
32-
implementation 'io.github.lapism:search:1.2.0'
32+
implementation 'io.github.lapism:search:1.2.1'
3333
}
3434
```
3535

@@ -65,20 +65,13 @@ Add the dependency to your gradle file:
6565
binding.materialSearchView.clearFocus()
6666
}
6767
setHint(getString(R.string.search))
68-
setBackgroundColor(
69-
ContextCompat.getColor(
70-
this@MainActivity,
71-
R.color.color_surface
72-
)
73-
)
7468
setOnQueryTextListener(object : MaterialSearchView.OnQueryTextListener {
75-
override fun onQueryTextChange(newText: CharSequence): Boolean {
69+
override fun onQueryTextChange(newText: CharSequence) {
7670
adapter.filter(newText)
77-
return true
7871
}
7972

80-
override fun onQueryTextSubmit(query: CharSequence): Boolean {
81-
return true
73+
override fun onQueryTextSubmit(query: CharSequence) {
74+
8275
}
8376
})
8477
setOnFocusChangeListener(object : MaterialSearchView.OnFocusChangeListener {

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ android {
1010
defaultConfig {
1111
minSdk 26
1212
targetSdk 31
13-
versionCode 1020000
14-
versionName "1.2.0"
13+
versionCode 1020100
14+
versionName "1.2.1"
1515
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1616
consumerProguardFiles "consumer-rules.pro"
1717
}
@@ -49,7 +49,7 @@ dependencies {
4949

5050
ext {
5151
PUBLISH_GROUP_ID = 'io.github.lapism'
52-
PUBLISH_VERSION = '1.2.0'
52+
PUBLISH_VERSION = '1.2.1'
5353
PUBLISH_ARTIFACT_ID = 'search'
5454
PUBLISH_DESCRIPTION = 'Material You Search component for Android, SearchView'
5555
PUBLISH_URL = 'https://github.com/lapism/search'

src/main/kotlin/com/lapism/search/internal/FocusEditText.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class FocusEditText @JvmOverloads constructor(
2828

2929
override fun clearFocus() {
3030
super.clearFocus()
31-
text?.clear()
31+
text?.clear() // TODO FIX
3232
}
3333

3434
// *********************************************************************************************

src/main/kotlin/com/lapism/search/widget/MaterialSearchBar.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ class MaterialSearchBar @JvmOverloads constructor(
7070
}
7171

7272
if (a?.hasValue(R.styleable.MaterialSearchBar_search_radius)!!) {
73-
val customRadius = a?.getInt(R.styleable.MaterialSearchBar_search_radius, 0)
73+
val customRadius =
74+
a?.getDimensionPixelSize(R.styleable.MaterialSearchBar_search_radius, 0)
7475
setRadius(customRadius?.toFloat()!!)
7576
}
7677

0 commit comments

Comments
 (0)