[tbb-commits] [Git][tpo/applications/fenix][tor-browser-82.0.0b4-10.0-1] 2 commits: Bug 40073: Use correct branding on About page

Matthew Finkel gitlab at torproject.org
Fri Oct 16 22:28:31 UTC 2020



Matthew Finkel pushed to branch tor-browser-82.0.0b4-10.0-1 at The Tor Project / Applications / fenix


Commits:
cfb56207 by Matthew Finkel at 2020-10-16T19:13:59+00:00
Bug 40073: Use correct branding on About page

- - - - -
77e2f0c7 by Matthew Finkel at 2020-10-16T22:28:11+00:00
Merge branch 'bug_40073_02' into tor-browser-82.0.0b4-10.0-1

- - - - -


5 changed files:

- app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuAboutRobot.kt
- app/src/main/java/org/mozilla/fenix/settings/about/AboutFragment.kt
- app/src/main/res/layout/fragment_about.xml
- app/src/main/res/values/styles.xml
- app/src/main/res/values/torbrowser_strings.xml


Changes:

=====================================
app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuAboutRobot.kt
=====================================
@@ -107,8 +107,8 @@ private fun assertVersionNumber() {
 }
 
 private fun assertProductCompany() {
-    onView(withId(R.id.about_content))
-        .check(matches(withText(containsString("Firefox Preview is produced by Mozilla."))))
+    onView(withId(R.id.tor_about_content))
+        .check(matches(withText(containsString("Firefox Preview is produced by the Tor Project."))))
 }
 
 private fun assertCurrentTimestamp() {


=====================================
app/src/main/java/org/mozilla/fenix/settings/about/AboutFragment.kt
=====================================
@@ -17,7 +17,6 @@ import androidx.recyclerview.widget.DividerItemDecoration
 import kotlinx.android.synthetic.main.fragment_about.*
 import org.mozilla.fenix.BrowserDirection
 import org.mozilla.fenix.BuildConfig
-import org.mozilla.fenix.Config
 import org.mozilla.fenix.HomeActivity
 import org.mozilla.fenix.R
 import org.mozilla.fenix.components.metrics.Event
@@ -50,8 +49,7 @@ class AboutFragment : Fragment(), AboutPageListener {
     ): View? {
         val rootView = inflater.inflate(R.layout.fragment_about, container, false)
         appName = getString(R.string.app_name)
-        headerAppName =
-            if (Config.channel.isRelease) getString(R.string.daylight_app_name) else appName
+        headerAppName = appName
         activity?.title = getString(R.string.preferences_about, appName)
 
         return rootView
@@ -117,7 +115,7 @@ class AboutFragment : Fragment(), AboutPageListener {
             ""
         }
 
-        val content = getString(R.string.about_content, headerAppName)
+        val content = getString(R.string.tor_about_content, headerAppName)
         val buildDate = BuildConfig.BUILD_DATE
 
         about_text.text = aboutText


=====================================
app/src/main/res/layout/fragment_about.xml
=====================================
@@ -19,18 +19,32 @@
 
         <ImageView
             android:id="@+id/wordmark"
-            android:layout_width="0dp"
-            android:layout_height="@dimen/about_header_fenix_logo_height"
-            android:layout_marginStart="@dimen/about_header_icon_margin_start_end"
+            android:layout_width="75dp"
+            android:layout_height="75dp"
             android:layout_marginTop="@dimen/about_header_icon_margin_top"
-            android:layout_marginEnd="@dimen/about_header_icon_margin_start_end"
+            android:layout_marginEnd="130dp"
             android:contentDescription="@string/app_name"
             android:importantForAccessibility="no"
-            app:srcCompat="?fenixLogo"
-            app:layout_constraintEnd_toEndOf="parent"
+            app:srcCompat="@mipmap/ic_launcher"
             app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <TextView
+            android:id="@+id/app_name"
+            style="@style/Header24TextStyle"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/about_header_icon_margin_top"
+            android:gravity="center_vertical"
+            android:width="130dp"
+            android:height="70dp"
+            android:lines="2"
+            android:text="@string/app_name"
+            android:textSize="20sp"
+            android:lineSpacingMultiplier="1.2"
             app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintWidth_percent="0.75" />
+            app:layout_constraintStart_toEndOf="@id/wordmark" />
 
         <TextView
             android:id="@+id/about_content"
@@ -45,7 +59,7 @@
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintTop_toBottomOf="@id/wordmark"
             app:layout_constraintWidth_percent="0.8"
-            tools:text="@string/about_content" />
+            tools:text="@string/tor_about_content" />
 
         <TextView
             android:id="@+id/about_text"


=====================================
app/src/main/res/values/styles.xml
=====================================
@@ -392,6 +392,12 @@
         <item name="fontFamily">@font/metropolis_semibold</item>
     </style>
 
+    <style name="Header24TextStyle" parent="TextAppearance.MaterialComponents.Body1">
+        <item name="android:textColor">?primaryText</item>
+        <item name="android:textSize">24sp</item>
+        <item name="fontFamily">@font/metropolis_semibold</item>
+    </style>
+
     <style name="Header16TextStyle" parent="TextAppearance.MaterialComponents.Body1">
         <item name="android:textColor">?primaryText</item>
         <item name="android:textSize">16sp</item>


=====================================
app/src/main/res/values/torbrowser_strings.xml
=====================================
@@ -2,6 +2,9 @@
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 <resources>
+    <!-- About content. The first parameter is the name of the application. (For example: Fenix) -->
+    <string name="tor_about_content">%1$s is produced by the Tor Project, a U.S.-based 501(c)(3) nonprofit.</string>
+
     <!-- Preference for enabling non-Private Browsing Mode-->
     <string name="preferences_disable_normal_mode">Allow Only Private Browsing Mode</string>
     <!-- Preference link to donate to The Tor Project-->



View it on GitLab: https://gitlab.torproject.org/tpo/applications/fenix/-/compare/e8d4affafa17c9c0004eca757839c62c92484a4d...77e2f0c7b28c541a0985b8cd3fdfb155c554e7c8

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/fenix/-/compare/e8d4affafa17c9c0004eca757839c62c92484a4d...77e2f0c7b28c541a0985b8cd3fdfb155c554e7c8
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20201016/349cf738/attachment-0001.htm>


More information about the tbb-commits mailing list