ソースを参照

Update fonts

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 4 年 前
コミット
8d65838d74

BIN
screenshots/gplay/debug/com.nextcloud.client.CommunityActivityIT_open.png


+ 55 - 0
src/androidTest/java/com/nextcloud/client/CommunityActivityIT.java

@@ -0,0 +1,55 @@
+/*
+ *
+ * Nextcloud Android client application
+ *
+ * @author Tobias Kaminsky
+ * Copyright (C) 2019 Tobias Kaminsky
+ * Copyright (C) 2019 Nextcloud GmbH
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+package com.nextcloud.client;
+
+import android.Manifest;
+import android.app.Activity;
+
+import com.owncloud.android.AbstractIT;
+import com.owncloud.android.ui.activity.CommunityActivity;
+import com.owncloud.android.utils.ScreenshotTest;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import androidx.test.espresso.intent.rule.IntentsTestRule;
+import androidx.test.rule.GrantPermissionRule;
+
+
+public class CommunityActivityIT extends AbstractIT {
+    @Rule public IntentsTestRule<CommunityActivity> activityRule = new IntentsTestRule<>(CommunityActivity.class,
+                                                                                         true,
+                                                                                         false);
+
+    @Rule
+    public final GrantPermissionRule permissionRule = GrantPermissionRule.grant(
+        Manifest.permission.WRITE_EXTERNAL_STORAGE);
+
+    @Test
+    @ScreenshotTest
+    public void open() {
+        Activity sut = activityRule.launchActivity(null);
+
+        screenshot(sut);
+    }
+}

+ 1 - 1
src/main/res/layout/account_action.xml

@@ -22,7 +22,7 @@
 
 <com.google.android.material.button.MaterialButton xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    style="@style/Widget.MaterialComponents.Button.TextButton.Icon"
+    style="@style/Nextcloud.Material.TextButton"
     android:layout_width="match_parent"
     android:layout_height="@dimen/account_action_layout_height"
     android:layout_margin="@dimen/standard_quarter_margin"

+ 1 - 1
src/main/res/layout/toolbar_standard.xml

@@ -45,7 +45,7 @@
 
             <com.google.android.material.button.MaterialButton
                 android:id="@+id/sort_button"
-                style="@style/Widget.MaterialComponents.Button.TextButton"
+                style="@style/Nextcloud.Material.TextButton"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginStart="7dp"

+ 34 - 20
src/main/res/values/styles.xml

@@ -136,15 +136,19 @@
 	</style>
 
 	<style name="Button" parent="Widget.MaterialComponents.Button.UnelevatedButton">
-		<item name="colorButtonNormal">@color/secondary_button_background_color</item>
-		<item name="android:textColor">@color/secondary_button_text_color</item>
+        <item name="colorButtonNormal">@color/secondary_button_background_color</item>
+        <item name="android:textColor">@color/secondary_button_text_color</item>
         <item name="android:textAllCaps">false</item>
-	</style>
+        <item name="android:typeface">sans</item>
+        <item name="android:textStyle">bold</item>
+    </style>
 
     <style name="OutlinedButton" parent="Widget.MaterialComponents.Button.OutlinedButton">
         <item name="colorAccent">@color/transparent</item>
         <item name="android:textColor">@color/primary_dark</item>
         <item name="android:textAllCaps">false</item>
+        <item name="android:typeface">sans</item>
+        <item name="android:textStyle">bold</item>
     </style>
 
     <style name="OutlineLoginButton" parent="Widget.MaterialComponents.Button.OutlinedButton">
@@ -154,31 +158,41 @@
         <item name="strokeColor">@color/login_btn_stroke</item>
     </style>
 
-	<style name="Button.Primary" parent="Button">
-		<item name="colorButtonNormal">@color/primary_button_background_color</item>
-		<item name="android:textColor">@color/primary_button_text_color</item>
-	</style>
+    <style name="Button.Primary" parent="Button">
+        <item name="colorButtonNormal">@color/primary_button_background_color</item>
+        <item name="android:textColor">@color/primary_button_text_color</item>
+        <item name="android:typeface">sans</item>
+        <item name="android:textStyle">bold</item>
+    </style>
 
-	<style name="Button.Login" parent="Button">
-		<item name="colorButtonNormal">@color/login_btn_tint</item>
+    <style name="Button.Login" parent="Button">
+        <item name="colorButtonNormal">@color/login_btn_tint</item>
         <item name="colorAccent">@color/login_btn_tint</item>
-		<item name="android:textColor">@color/primary_dark</item>
-	</style>
+        <item name="android:textColor">@color/primary_dark</item>
+        <item name="android:typeface">sans</item>
+        <item name="android:textStyle">bold</item>
+    </style>
 
-	<style name="Button.Borderless" parent="Widget.MaterialComponents.Button.TextButton">
-		<item name="android:textColor">@drawable/borderless_btn</item>
+    <style name="Button.Borderless" parent="Widget.MaterialComponents.Button.TextButton">
+        <item name="android:textColor">@drawable/borderless_btn</item>
         <item name="android:textAllCaps">false</item>
-	</style>
+        <item name="android:typeface">sans</item>
+        <item name="android:textStyle">bold</item>
+    </style>
 
-	<style name="Button.Borderless.Destructive" parent="Widget.MaterialComponents.Button.TextButton">
-		<item name="android:textColor">@color/highlight_textColor_Warning</item>
+    <style name="Button.Borderless.Destructive" parent="Widget.MaterialComponents.Button.TextButton">
+        <item name="android:textColor">@color/highlight_textColor_Warning</item>
         <item name="android:textAllCaps">false</item>
-	</style>
+        <item name="android:typeface">sans</item>
+        <item name="android:textStyle">bold</item>
+    </style>
 
-	<style name="Button.Borderless.Login" parent="Widget.MaterialComponents.Button.TextButton">
-		<item name="android:textColor">@color/fg_inverse</item>
+    <style name="Button.Borderless.Login" parent="Widget.MaterialComponents.Button.TextButton">
+        <item name="android:textColor">@color/fg_inverse</item>
         <item name="android:textAllCaps">false</item>
-	</style>
+        <item name="android:typeface">sans</item>
+        <item name="android:textStyle">bold</item>
+    </style>
 
 	<!-- separat translucent action bar style -->
 	<style name="Theme.ownCloud.OverlayBase" parent="Theme.ownCloud">