diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-24 15:06:03 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-24 15:06:03 -0700 |
commit | b536b151f1012e730782f615dceed6be7e3a9652 (patch) | |
tree | 68d6aae8658e4bc6e09c795b6ddf8e25dbb67b4b /sample | |
parent | eaa36f22be194f7a8a950fb3056d32c63703ba49 (diff) | |
download | kau-b536b151f1012e730782f615dceed6be7e3a9652.tar.gz kau-b536b151f1012e730782f615dceed6be7e3a9652.tar.bz2 kau-b536b151f1012e730782f615dceed6be7e3a9652.zip |
Properly align searchView clicks
Diffstat (limited to 'sample')
-rw-r--r-- | sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt | 11 |
1 files changed, 5 insertions, 6 deletions
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 } |