diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt index 951638d9ae..71ead679db 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt @@ -225,7 +225,11 @@ class MainActivity : NoSplashAppCompatActivity() { if (sp.getBoolean(R.string.key_short_tabtitles, false)) { tabs_normal.visibility = View.GONE tabs_compact.visibility = View.VISIBLE - toolbar.layoutParams = LinearLayout.LayoutParams(Toolbar.LayoutParams.MATCH_PARENT, resources.getDimension(R.dimen.compact_height).toInt()) + 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)) + } TabLayoutMediator(tabs_compact, main_pager) { tab, position -> tab.text = (main_pager.adapter as TabPageAdapter).getPluginAt(position).nameShort }.attach() diff --git a/app/src/main/res/layout/overview_loop_pumpstatus_layout.xml b/app/src/main/res/layout/overview_loop_pumpstatus_layout.xml index 98c0d0bd62..d52d6007b9 100644 --- a/app/src/main/res/layout/overview_loop_pumpstatus_layout.xml +++ b/app/src/main/res/layout/overview_loop_pumpstatus_layout.xml @@ -19,8 +19,8 @@ android:layout_marginEnd="5dp" android:layout_weight="1" android:gravity="center_vertical|center_horizontal" - android:paddingTop="3dp" - android:paddingBottom="3dp" + android:paddingTop="6dp" + android:paddingBottom="6dp" android:text="Profile" android:textAppearance="?android:attr/textAppearanceSmall" /> @@ -31,8 +31,8 @@ android:layout_gravity="end" android:layout_weight="1" android:gravity="center_vertical|center_horizontal" - android:paddingTop="3dp" - android:paddingBottom="3dp" + android:paddingTop="6dp" + android:paddingBottom="6dp" android:text="TempTarget" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/mdtp_white" /> @@ -53,8 +53,8 @@ android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:gravity="center_vertical|center_horizontal" - android:paddingTop="3dp" - android:paddingBottom="3dp" + android:paddingTop="6dp" + android:paddingBottom="6dp" android:text="@string/initializing" android:textAppearance="?android:attr/textAppearanceSmall" />