diff --git a/README.md b/README.md index 126fea46..0f3f2db7 100755 --- a/README.md +++ b/README.md @@ -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' } ``` @@ -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 { diff --git a/build.gradle b/build.gradle index 3d4912e2..4942fdac 100755 --- a/build.gradle +++ b/build.gradle @@ -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" } @@ -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' diff --git a/src/main/kotlin/com/lapism/search/internal/FocusEditText.kt b/src/main/kotlin/com/lapism/search/internal/FocusEditText.kt index 0a957d11..9bc059d3 100755 --- a/src/main/kotlin/com/lapism/search/internal/FocusEditText.kt +++ b/src/main/kotlin/com/lapism/search/internal/FocusEditText.kt @@ -28,7 +28,7 @@ class FocusEditText @JvmOverloads constructor( override fun clearFocus() { super.clearFocus() - text?.clear() + text?.clear() // TODO FIX } // ********************************************************************************************* diff --git a/src/main/kotlin/com/lapism/search/widget/MaterialSearchBar.kt b/src/main/kotlin/com/lapism/search/widget/MaterialSearchBar.kt index e5f658a7..99a617c9 100755 --- a/src/main/kotlin/com/lapism/search/widget/MaterialSearchBar.kt +++ b/src/main/kotlin/com/lapism/search/widget/MaterialSearchBar.kt @@ -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()!!) }