From 71171d7c1596f70d859ccca82c91d96fc851a929 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 10 Feb 2023 19:12:02 +0100 Subject: [PATCH] do not color the action bar --- .../calculator/activities/MainActivity.kt | 4 + .../main/res/layout-land/activity_main.xml | 420 +++++++++--------- app/src/main/res/layout/activity_main.xml | 14 +- 3 files changed, 229 insertions(+), 209 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calculator/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calculator/activities/MainActivity.kt index 230efd7f..08850623 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calculator/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calculator/activities/MainActivity.kt @@ -33,12 +33,16 @@ class MainActivity : SimpleActivity(), Calculator { private lateinit var calc: CalculatorImpl override fun onCreate(savedInstanceState: Bundle?) { + isMaterialActivity = true super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) appLaunched(BuildConfig.APPLICATION_ID) setupOptionsMenu() refreshMenuItems() + updateMaterialActivityViews(main_coordinator, null, useTransparentNavigation = false, useTopSearchMenu = false) + setupMaterialScrollListener(main_nested_scrollview, main_toolbar) + calc = CalculatorImpl(this, applicationContext) btn_plus.setOnClickOperation(PLUS) diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml index cc772edd..7f2412d0 100644 --- a/app/src/main/res/layout-land/activity_main.xml +++ b/app/src/main/res/layout-land/activity_main.xml @@ -16,239 +16,247 @@ app:menu="@menu/menu" app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" /> - - - - - + android:fillViewport="true" + android:scrollbars="none"> + android:hapticFeedbackEnabled="true" + android:layoutDirection="ltr" + android:orientation="vertical"> + android:layout_weight="2.1" + android:fontFamily="sans-serif-light" + android:gravity="end|bottom" + android:maxLines="1" + android:paddingLeft="@dimen/activity_margin" + android:paddingRight="@dimen/activity_margin" + android:textSize="@dimen/formula_text_size" /> + android:layout_weight="1.8" + android:fontFamily="sans-serif-light" + android:gravity="center_vertical|end" + android:maxLines="1" + android:paddingLeft="@dimen/activity_margin" + android:paddingRight="@dimen/activity_margin" + android:textSize="@dimen/display_text_size" + tools:text="0" /> - + android:layout_weight="2" + android:orientation="horizontal"> - + + + + + + + + + + + + + + + android:layout_weight="2" + android:orientation="horizontal"> - + + + + + + + + + + + + + android:layout_weight="2" + android:orientation="horizontal"> - + + + + + + + + + + + + + android:layout_weight="2" + android:orientation="horizontal"> + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 8342d576..f769e7c3 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -16,10 +16,18 @@ app:menu="@menu/menu" app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" /> - + android:layout_marginTop="?attr/actionBarSize" + android:fillViewport="true" + android:scrollbars="none"> + + +