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