1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-26 02:25:50 +01:00

Fix warnings and colors for AboutScreen

This commit is contained in:
vanous 2020-09-09 23:26:46 +02:00
parent 0ac2b22596
commit 1d51c58f15
4 changed files with 33 additions and 18 deletions

View File

@ -417,7 +417,6 @@
android:name=".activities.AboutActivity" android:name=".activities.AboutActivity"
android:label="@string/about_activity_title" android:label="@string/about_activity_title"
android:parentActivityName=".activities.ControlCenterv2" android:parentActivityName=".activities.ControlCenterv2"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" /> android:windowSoftInputMode="stateHidden" />
<activity <activity
android:name=".activities.ActivitySummaryDetail" android:name=".activities.ActivitySummaryDetail"

View File

@ -17,13 +17,18 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.activities; package nodomain.freeyourgadget.gadgetbridge.activities;
import android.graphics.LightingColorFilter;
import android.graphics.drawable.InsetDrawable;
import android.os.Bundle; import android.os.Bundle;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView; import android.widget.TextView;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
import nodomain.freeyourgadget.gadgetbridge.R; import nodomain.freeyourgadget.gadgetbridge.R;
@ -34,6 +39,14 @@ public class AboutActivity extends AbstractGBActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about); 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); TextView link1 = findViewById(R.id.links1);
link1.setMovementMethod(LinkMovementMethod.getInstance()); link1.setMovementMethod(LinkMovementMethod.getInstance());
TextView link2 = findViewById(R.id.links2); TextView link2 = findViewById(R.id.links2);

View File

@ -1,15 +1,13 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/about_background"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/gadgetbridge_img" android:background="@drawable/gadgetbridge_img"
android:paddingLeft="@dimen/about_margin" android:paddingLeft="@dimen/about_margin"
android:paddingRight="@dimen/about_margin"
tools:context="nodomain.freeyourgadget.gadgetbridge.activities.AboutActivity"> tools:context="nodomain.freeyourgadget.gadgetbridge.activities.AboutActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -19,7 +17,7 @@
android:id="@+id/about_title" android:id="@+id/about_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Gadgetbridge" android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Large" android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="@color/accent" /> android:textColor="@color/accent" />
@ -27,7 +25,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:paddingLeft="@dimen/about_margin"> android:paddingLeft="@dimen/about_margin"
android:paddingRight="@dimen/about_margin">
<TextView <TextView
android:id="@+id/about_desc" android:id="@+id/about_desc"
@ -40,7 +39,7 @@
android:id="@+id/links_title" android:id="@+id/links_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Links" android:text="@string/about_links"
android:textAppearance="@style/TextAppearance.AppCompat.Large" android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="@color/accent" /> android:textColor="@color/accent" />
@ -48,7 +47,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:paddingLeft="@dimen/about_margin"> android:paddingLeft="@dimen/about_margin"
android:paddingRight="@dimen/about_margin">
<TextView <TextView
android:id="@+id/links1" android:id="@+id/links1"
@ -81,7 +81,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:paddingLeft="@dimen/about_margin"> android:paddingLeft="@dimen/about_margin"
android:paddingRight="@dimen/about_margin">
<TextView <TextView
android:id="@+id/contrib_core_title" android:id="@+id/contrib_core_title"
@ -94,7 +95,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:paddingLeft="@dimen/about_margin"> android:paddingLeft="@dimen/about_margin"
android:paddingRight="@dimen/about_margin">
<TextView <TextView
android:id="@+id/contrib_core_members" android:id="@+id/contrib_core_members"
@ -109,7 +111,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:paddingLeft="@dimen/about_margin"> android:paddingStart="@dimen/about_margin"
android:paddingEnd="@dimen/about_margin">
<TextView <TextView
android:id="@+id/contrib_add_title" android:id="@+id/contrib_add_title"
@ -122,7 +125,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:paddingLeft="@dimen/about_margin"> android:paddingLeft="@dimen/about_margin"
android:paddingRight="@dimen/about_margin">
<TextView <TextView
android:id="@+id/contrib_add_members" android:id="@+id/contrib_add_members"
@ -142,6 +146,5 @@
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView>
</RelativeLayout> </ScrollView>

View File

@ -900,7 +900,8 @@
<string name="about_core_team_members" translatable="false">Andreas Shimokawa\nCarsten Pfeiffer\nDaniele Gobbetti</string> <string name="about_core_team_members" translatable="false">Andreas Shimokawa\nCarsten Pfeiffer\nDaniele Gobbetti</string>
<string name="about_additional_device_support">Additional device support</string> <string name="about_additional_device_support">Additional device support</string>
<string name="about_additional_contributors" translatable="false">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)</string> <string name="about_additional_contributors" translatable="false">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)</string>
<string name="about_additional_contributions">Many thanks to all unlisted contributors for contributing code, support, ideas, motivation, bug reports, money… ✊</string> <string name="about_additional_contributions">Many thanks to all unlisted contributors for contributing code, translations, support, ideas, motivation, bug reports, money… ✊</string>
<string name="about_links">Links</string>
<string name="permission_granting_mandatory">All these permissions are required and instability might occur if not granted</string> <string name="permission_granting_mandatory">All these permissions are required and instability might occur if not granted</string>
<string name="error_version_check_extreme_caution">CAUTION: Error when checking version information! You should not continue! Saw version name \"%s\"</string> <string name="error_version_check_extreme_caution">CAUTION: Error when checking version information! You should not continue! Saw version name \"%s\"</string>
<string name="require_location_provider">Location must be enabled</string> <string name="require_location_provider">Location must be enabled</string>
@ -1021,7 +1022,6 @@
<string name="backstroke">Backstroke</string> <string name="backstroke">Backstroke</string>
<string name="medley">Medley</string> <string name="medley">Medley</string>
<plurals name="widget_alarm_target_hours"> <plurals name="widget_alarm_target_hours">
<item quantity="one">%d hour</item> <item quantity="one">%d hour</item>
<item quantity="two">%d hours</item> <item quantity="two">%d hours</item>