From 1d51c58f154bccdadfef507c50386f71d4b77e39 Mon Sep 17 00:00:00 2001 From: vanous Date: Wed, 9 Sep 2020 23:26:46 +0200 Subject: [PATCH] Fix warnings and colors for AboutScreen --- app/src/main/AndroidManifest.xml | 1 - .../activities/AboutActivity.java | 13 ++++++++ app/src/main/res/layout/activity_about.xml | 33 ++++++++++--------- app/src/main/res/values/strings.xml | 4 +-- 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1a8f8726c..5e61bf86c 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -417,7 +417,6 @@ android:name=".activities.AboutActivity" android:label="@string/about_activity_title" android:parentActivityName=".activities.ControlCenterv2" - android:screenOrientation="portrait" android:windowSoftInputMode="stateHidden" /> . */ package nodomain.freeyourgadget.gadgetbridge.activities; +import android.graphics.LightingColorFilter; +import android.graphics.drawable.InsetDrawable; import android.os.Bundle; import android.text.method.LinkMovementMethod; +import android.widget.RelativeLayout; +import android.widget.ScrollView; import android.widget.TextView; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import nodomain.freeyourgadget.gadgetbridge.GBApplication; import nodomain.freeyourgadget.gadgetbridge.R; @@ -34,6 +39,14 @@ public class AboutActivity extends AbstractGBActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_about); + ScrollView aboutBackground = findViewById(R.id.about_background); + + if (!GBApplication.isDarkThemeEnabled()) { + aboutBackground.getBackground().setColorFilter(new LightingColorFilter(0x0, 0x00EEEEEE)); + } else { + aboutBackground.getBackground().setColorFilter(new LightingColorFilter(0x0, 0x00404040)); + } + TextView link1 = findViewById(R.id.links1); link1.setMovementMethod(LinkMovementMethod.getInstance()); TextView link2 = findViewById(R.id.links2); diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index 0b9883be6..f234c0796 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -1,15 +1,13 @@ - - - @@ -27,7 +25,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:paddingLeft="@dimen/about_margin"> + android:paddingLeft="@dimen/about_margin" + android:paddingRight="@dimen/about_margin"> @@ -48,7 +47,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:paddingLeft="@dimen/about_margin"> + android:paddingLeft="@dimen/about_margin" + android:paddingRight="@dimen/about_margin"> + android:paddingLeft="@dimen/about_margin" + android:paddingRight="@dimen/about_margin"> + android:paddingLeft="@dimen/about_margin" + android:paddingRight="@dimen/about_margin"> + android:paddingStart="@dimen/about_margin" + android:paddingEnd="@dimen/about_margin"> + android:paddingLeft="@dimen/about_margin" + android:paddingRight="@dimen/about_margin"> - - + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 36fe383c6..c6782d0f0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -900,7 +900,8 @@ Andreas Shimokawa\nCarsten Pfeiffer\nDaniele Gobbetti Additional device support João Paulo Barraca (HPlus)\nVitaly Svyastyn (NO.1 F1)\nSami Alaoui (Teclast H30)\n“ladbsoft” (XWatch)\nSebastian Kranz (ZeTime)\nVadim Kaushan (ID115)\n“maxirnilian” (Lenovo Watch 9)\n“ksiwczynski”, “mkusnierz”, “mamutcho” (Lenovo Watch X Plus)\nAndreas Böhler (Casio GB-6900B)\nJean-François Greffier (Mi Scale 2)\nJohannes Schmitt (BFH-16)\nLukas Schwichtenberg (Makibes HR3)\nDaniel Dakhno (Fossil Q Hybrid, Fossil Hybrid HR)\nGordon Williams (Bangle.js)\nPavel Elagin (JYou Y5)\nTaavi Eomäe (iTag) - Many thanks to all unlisted contributors for contributing code, support, ideas, motivation, bug reports, money… ✊ + Many thanks to all unlisted contributors for contributing code, translations, support, ideas, motivation, bug reports, money… ✊ + Links All these permissions are required and instability might occur if not granted CAUTION: Error when checking version information! You should not continue! Saw version name \"%s\" Location must be enabled @@ -1021,7 +1022,6 @@ Backstroke Medley - %d hour %d hours