Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #428

Merged
merged 2 commits into from
Jan 2, 2022
Merged

Dev #428

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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