Skip to content

Commit

Permalink
Small fixes for next release
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Lapiš committed Nov 24, 2021
1 parent bcda252 commit 6726f77
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
![API](https://img.shields.io/badge/API-26%2B-brightgreen.svg?style=flat)
[![Kotlin Version](https://img.shields.io/badge/Kotlin-1.5.31-blue.svg)](https://kotlinlang.org)
[![Kotlin Version](https://img.shields.io/badge/Kotlin-1.6.0-blue.svg)](https://kotlinlang.org)
[![Download](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Fio%2Fgithub%2Flapism%2Fsearch%2Fmaven-metadata.xml) ](https://repo1.maven.org/maven2/io/github/lapism/search/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Expand Down
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ android {
defaultConfig {
minSdk 26
targetSdk 31
versionCode 1020000
versionName "1.2.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
Expand Down Expand Up @@ -43,13 +45,13 @@ dependencies {

// Core
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.0-rc01'
implementation 'com.google.android.material:material:1.5.0-alpha05'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'com.google.android.material:material:1.5.0-beta01'
}

ext {
PUBLISH_GROUP_ID = 'io.github.lapism'
PUBLISH_VERSION = '1.1.0'
PUBLISH_VERSION = '1.2.0'
PUBLISH_ARTIFACT_ID = 'search'
PUBLISH_DESCRIPTION = 'Material You Search component for Android, SearchView'
PUBLISH_URL = 'https://github.com/lapism/search'
Expand Down
8 changes: 4 additions & 4 deletions src/main/kotlin/com/lapism/search/widget/MaterialSearchBar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ class MaterialSearchBar @JvmOverloads constructor(
val customRadius = a?.getInt(R.styleable.MaterialSearchBar_search_radius, defaultRadius)
setRadius(customRadius?.toFloat()!!)

val defaultElevation = context.resources.getDimensionPixelSize(R.dimen.search_dp_0)
val customElevation =
a?.getInt(R.styleable.MaterialSearchBar_android_elevation, defaultElevation)
elevation = customElevation?.toFloat()!!
if (a?.hasValue(R.styleable.MaterialSearchBar_android_elevation)!!) {
val customElevation = a?.getInt(R.styleable.MaterialSearchBar_android_elevation, 0)
elevation = customElevation?.toFloat()!!
}

if (a?.hasValue(R.styleable.MaterialSearchBar_android_hint)!!) {
val hint = a?.getString(R.styleable.MaterialSearchBar_android_hint)
Expand Down

0 comments on commit 6726f77

Please sign in to comment.