Skip to content

Commit

Permalink
Merge pull request #428 from lapism/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
lapism authored Jan 2, 2022
2 parents 0b47cfa + 7502d2b commit a6c93b1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Add the dependency to your gradle file:
}
dependencies {
implementation 'io.github.lapism:search:1.2.0'
implementation 'io.github.lapism:search:1.2.1'
}
```

Expand Down Expand Up @@ -65,20 +65,13 @@ Add the dependency to your gradle file:
binding.materialSearchView.clearFocus()
}
setHint(getString(R.string.search))
setBackgroundColor(
ContextCompat.getColor(
this@MainActivity,
R.color.color_surface
)
)
setOnQueryTextListener(object : MaterialSearchView.OnQueryTextListener {
override fun onQueryTextChange(newText: CharSequence): Boolean {
override fun onQueryTextChange(newText: CharSequence) {
adapter.filter(newText)
return true
}

override fun onQueryTextSubmit(query: CharSequence): Boolean {
return true
override fun onQueryTextSubmit(query: CharSequence) {

}
})
setOnFocusChangeListener(object : MaterialSearchView.OnFocusChangeListener {
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
defaultConfig {
minSdk 26
targetSdk 31
versionCode 1020000
versionName "1.2.0"
versionCode 1020100
versionName "1.2.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
Expand Down Expand Up @@ -49,7 +49,7 @@ dependencies {

ext {
PUBLISH_GROUP_ID = 'io.github.lapism'
PUBLISH_VERSION = '1.2.0'
PUBLISH_VERSION = '1.2.1'
PUBLISH_ARTIFACT_ID = 'search'
PUBLISH_DESCRIPTION = 'Material You Search component for Android, SearchView'
PUBLISH_URL = 'https://github.com/lapism/search'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class FocusEditText @JvmOverloads constructor(

override fun clearFocus() {
super.clearFocus()
text?.clear()
text?.clear() // TODO FIX
}

// *********************************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class MaterialSearchBar @JvmOverloads constructor(
}

if (a?.hasValue(R.styleable.MaterialSearchBar_search_radius)!!) {
val customRadius = a?.getInt(R.styleable.MaterialSearchBar_search_radius, 0)
val customRadius =
a?.getDimensionPixelSize(R.styleable.MaterialSearchBar_search_radius, 0)
setRadius(customRadius?.toFloat()!!)
}

Expand Down

0 comments on commit a6c93b1

Please sign in to comment.