Skip to content

Commit

Permalink
Fixed null pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
kojofosu committed Jul 27, 2021
1 parent 80c7540 commit 28e6bbe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ allprojects {
dependencies {
//implementation 'com.github.iammert:MultiSearchView:0.3'
implementation 'com.github.kojofosu:MultiSearchView:0.6'
implementation 'com.github.kojofosu:MultiSearchView:0.7'
}
```

Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
app:searchIconColor="@android:color/black"
app:selectedTabStyle="dot"/>
</LinearLayout>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ class MultiSearchView @JvmOverloads constructor(context: Context, attrs: Attribu
setSearchIconDrawable(imageSource)

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
setSearchIconColor(searchIconColorResID)
setSearchIconColor(searchIconColorColorString!!)
if(searchIconColorResID != null)
setSearchIconColor(searchIconColorResID)

if (searchIconColorColorString != null)
setSearchIconColor(searchIconColorColorString)

}

binding.imageViewSearch.setOnClickListener {
Expand Down

0 comments on commit 28e6bbe

Please sign in to comment.