diff --git a/README.md b/README.md index 126fea46..e4caf9ad 100755 --- a/README.md +++ b/README.md @@ -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..c08dc376 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" } 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()!!) }