From b536b151f1012e730782f615dceed6be7e3a9652 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 24 Jun 2017 15:06:03 -0700 Subject: Properly align searchView clicks --- .../src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'sample') diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt index c21a7e1..7c4de5a 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt @@ -7,11 +7,8 @@ import ca.allanwang.kau.email.sendEmail import ca.allanwang.kau.kpref.CoreAttributeContract import ca.allanwang.kau.kpref.KPrefActivity import ca.allanwang.kau.kpref.KPrefAdapterBuilder -import ca.allanwang.kau.searchview.SearchView -import ca.allanwang.kau.utils.materialDialog -import ca.allanwang.kau.utils.navigationBarColor -import ca.allanwang.kau.utils.startActivity -import ca.allanwang.kau.utils.toast +import ca.allanwang.kau.searchview.bindSearchView +import ca.allanwang.kau.utils.* import ca.allanwang.kau.views.RippleCanvas import com.mikepenz.google_material_typeface_library.GoogleMaterial @@ -123,7 +120,9 @@ class MainActivity : KPrefActivity() { override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.menu_main, menu) - SearchView.bind(container, menu, R.id.action_search) + //workaround for menuY since this view draws under the status bar + val statusBarHeight = dimen(R.dimen.kau_status_bar_height).toInt().dpToPx + container.bindSearchView(menu, R.id.action_search) return true } -- cgit v1.2.3