From 363fe638af71417d3b2b581a2811d6d2a6390c84 Mon Sep 17 00:00:00 2001 From: Philoul Date: Fri, 25 Dec 2020 17:05:41 +0100 Subject: [PATCH] Second verion (only increase a little bit Compact height) --- .../main/java/info/nightscout/androidaps/MainActivity.kt | 6 +----- core/src/main/res/values/dimens.xml | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt index 71ead679db..951638d9ae 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt @@ -225,11 +225,7 @@ class MainActivity : NoSplashAppCompatActivity() { if (sp.getBoolean(R.string.key_short_tabtitles, false)) { tabs_normal.visibility = View.GONE tabs_compact.visibility = View.VISIBLE - val typedValue = TypedValue() - if (theme.resolveAttribute(R.attr.actionBarSize, typedValue, true)) { - toolbar.layoutParams = LinearLayout.LayoutParams(Toolbar.LayoutParams.MATCH_PARENT, - TypedValue.complexToDimensionPixelSize(typedValue.data, resources.displayMetrics)) - } + toolbar.layoutParams = LinearLayout.LayoutParams(Toolbar.LayoutParams.MATCH_PARENT, resources.getDimension(R.dimen.compact_height).toInt()) TabLayoutMediator(tabs_compact, main_pager) { tab, position -> tab.text = (main_pager.adapter as TabPageAdapter).getPluginAt(position).nameShort }.attach() diff --git a/core/src/main/res/values/dimens.xml b/core/src/main/res/values/dimens.xml index b650a33ce6..0afd239ee6 100644 --- a/core/src/main/res/values/dimens.xml +++ b/core/src/main/res/values/dimens.xml @@ -2,7 +2,7 @@ 16dp 16dp - 30dp + 42dp 16dp 8dp