Matthew Finkel pushed to branch tor-browser-91.2.0-10.5-2 at The Tor Project / Applications / fenix
Commits: bd49ef24 by Matthew Finkel at 2021-10-20T18:46:13+00:00 Revert "Bug 40193: Add banner for VPN survey to Android homepage"
This reverts commit 0dffacd86eee81fe774e4c88dfc90d129440312e.
- - - - - 5228c8ee by Matthew Finkel at 2021-10-21T04:09:02+00:00 Bug 40194 - Add 2021 YEC home screen
- - - - -
20 changed files:
- LICENSE - app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt - app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlAdapter.kt - app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt - app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlInteractor.kt - app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlView.kt - − app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/TorInfoBannerViewHolder.kt - app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt - app/src/main/java/org/mozilla/fenix/theme/ThemeManager.kt - + app/src/main/res/drawable/ic_yec_activist_android.png - − app/src/main/res/drawable/info_banner_padded_background.xml - + app/src/main/res/drawable/tor_yec_donate_rounded_corners.xml - − app/src/main/res/drawable/vpn_survey_icon.png - + app/src/main/res/font/corben_bold.ttf - + app/src/main/res/font/corben_regular.ttf - app/src/main/res/layout/fragment_home.xml - − app/src/main/res/layout/tor_info_banner.xml - app/src/main/res/values/colors.xml - app/src/main/res/values/styles.xml - app/src/main/res/values/torbrowser_strings.xml
Changes:
===================================== LICENSE ===================================== @@ -371,3 +371,102 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. + +=============================================================================== + +"Corben" font. + +Copyright (c) 2010, 2011 by vernon adams (vern@newtypography.co.uk), +with Reserved Font Name Corben. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE.
===================================== app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt ===================================== @@ -50,6 +50,7 @@ import com.google.android.material.snackbar.Snackbar import kotlinx.android.synthetic.main.fragment_home.* import kotlinx.android.synthetic.main.fragment_home.view.bottomBarShadow import kotlinx.android.synthetic.main.fragment_home.view.bottom_bar +import kotlinx.android.synthetic.main.fragment_home.view.donate_now_button import kotlinx.android.synthetic.main.fragment_home.view.exploreprivately import kotlinx.android.synthetic.main.fragment_home.view.homeAppBar import kotlinx.android.synthetic.main.fragment_home.view.menuButton @@ -59,6 +60,7 @@ import kotlinx.android.synthetic.main.fragment_home.view.tab_button import kotlinx.android.synthetic.main.fragment_home.view.toolbar import kotlinx.android.synthetic.main.fragment_home.view.toolbarLayout import kotlinx.android.synthetic.main.fragment_home.view.toolbar_wrapper +import kotlinx.android.synthetic.main.fragment_home.view.yec_activist_image import kotlinx.android.synthetic.main.no_collections_message.view.add_tabs_to_collections_button import kotlinx.coroutines.Dispatchers.IO import kotlinx.coroutines.Dispatchers.Main @@ -88,6 +90,7 @@ import mozilla.components.support.base.feature.ViewBoundFeatureWrapper import mozilla.components.support.ktx.android.content.res.resolveAttribute import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged import mozilla.components.ui.tabcounter.TabCounterMenu +import mozilla.components.support.locale.LocaleManager import org.mozilla.fenix.BrowserDirection import org.mozilla.fenix.BuildConfig import org.mozilla.fenix.Config @@ -127,6 +130,7 @@ import org.mozilla.fenix.home.sessioncontrol.viewholders.CollectionViewHolder import org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.DefaultTopSitesView import org.mozilla.fenix.onboarding.FenixOnboarding import org.mozilla.fenix.settings.SupportUtils +import org.mozilla.fenix.settings.advanced.getSelectedLocale import org.mozilla.fenix.settings.deletebrowsingdata.deleteAndQuit import org.mozilla.fenix.tor.bootstrap.TorQuickStart import org.mozilla.fenix.theme.ThemeManager @@ -333,6 +337,20 @@ class HomeFragment : Fragment() { activity.themeManager.applyStatusBarTheme(activity) adjustHomeFragmentView(currentMode.getCurrentMode(), view) showSessionControlView(view) + + view?.donate_now_button?.setOnClickListener { + val country = LocaleManager.getSelectedLocale(requireContext()).country + var locale = LocaleManager.getSelectedLocale(requireContext()).language + if (country != "") { + locale = "${locale}-${country}" + } + val localeUrl = "https://www.torproject.org/donate/donate-phr-bp1-mobile-$%7Blocale%7D" + activity.openToBrowserAndLoad( + searchTermOrURL = localeUrl, + newTab = true, + from = BrowserDirection.FromHome + ) + } view }
@@ -340,6 +358,28 @@ class HomeFragment : Fragment() { super.onConfigurationChanged(newConfig)
getMenuButton()?.dismissMenu() + + //view.donationmatch.setOnClickListener { + // activity.openToBrowserAndLoad( + // searchTermOrURL = "https://blog.torproject.org/friends-of-tor-match-2020", + // newTab = true, + // from = BrowserDirection.FromHome + // ) + //} + + view?.donate_now_button?.setOnClickListener { + val country = LocaleManager.getSelectedLocale(requireContext()).country + var locale = LocaleManager.getSelectedLocale(requireContext()).language + if (country != "") { + locale = "${locale}-${country}" + } + val localeUrl = "https://www.torproject.org/donate/donate-phr-bp1-mobile-$%7Blocale%7D" + (activity as HomeActivity).openToBrowserAndLoad( + searchTermOrURL = localeUrl, + newTab = true, + from = BrowserDirection.FromHome + ) + } }
private fun dismissTip(tip: Tip) { @@ -474,6 +514,14 @@ class HomeFragment : Fragment() { toolbarLayoutHeight - SESSION_CONTROL_VIEW_PADDING ) } + view.donate_now_button?.apply { + (layoutParams as ViewGroup.MarginLayoutParams).setMargins( + 0, + 0, + 0, + toolbarLayoutHeight - SESSION_CONTROL_VIEW_PADDING + ) + } } } else { view.sessionControlRecyclerView?.apply { @@ -484,16 +532,41 @@ class HomeFragment : Fragment() { height - SESSION_CONTROL_VIEW_PADDING ) } + view.donate_now_button?.apply { + (layoutParams as ViewGroup.MarginLayoutParams).setMargins( + 0, + 0, + 0, + height - SESSION_CONTROL_VIEW_PADDING + ) + } } } - // Hide the onion pattern during Onboarding, too. - view?.onion_pattern_image?.apply { + + // Hide the EOY image during Onboarding, too. + view?.yec_activist_image?.apply { + visibility = if (onboarding.userHasBeenOnboarded()) { + View.VISIBLE + } else { + View.GONE + } + } + // Hide the EOY donate button during Onboarding, too. + view?.donate_now_button?.apply { visibility = if (onboarding.userHasBeenOnboarded()) { View.VISIBLE } else { View.GONE } } + // Hide the onion pattern during Onboarding, too. + //view?.onion_pattern_image?.apply { + // visibility = if (onboarding.userHasBeenOnboarded()) { + // View.VISIBLE + // } else { + // View.GONE + // } + //} view?.homeAppBar?.apply { visibility = View.VISIBLE
===================================== app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlAdapter.kt ===================================== @@ -25,7 +25,6 @@ import org.mozilla.fenix.home.sessioncontrol.viewholders.CollectionViewHolder import org.mozilla.fenix.home.sessioncontrol.viewholders.NoCollectionsMessageViewHolder import org.mozilla.fenix.home.sessioncontrol.viewholders.PrivateBrowsingDescriptionViewHolder import org.mozilla.fenix.home.sessioncontrol.viewholders.TorBootstrapPagerViewHolder -import org.mozilla.fenix.home.sessioncontrol.viewholders.TorInfoBannerViewHolder import org.mozilla.fenix.home.sessioncontrol.viewholders.TabInCollectionViewHolder import org.mozilla.fenix.home.sessioncontrol.viewholders.TopSitePagerViewHolder import org.mozilla.fenix.home.sessioncontrol.viewholders.onboarding.ExperimentDefaultBrowserCardViewHolder @@ -91,7 +90,6 @@ sealed class AdapterItem(@LayoutRes val viewType: Int) { }
object PrivateBrowsingDescription : AdapterItem(PrivateBrowsingDescriptionViewHolder.LAYOUT_ID) - object TorInfoBanner : AdapterItem(TorInfoBannerViewHolder.LAYOUT_ID) object NoCollectionsMessage : AdapterItem(NoCollectionsMessageViewHolder.LAYOUT_ID)
object TorBootstrap : AdapterItem(TorBootstrapPagerViewHolder.LAYOUT_ID) @@ -231,10 +229,6 @@ class SessionControlAdapter( view, interactor ) - TorInfoBannerViewHolder.LAYOUT_ID -> TorInfoBannerViewHolder( - view, - interactor - ) TorBootstrapPagerViewHolder.LAYOUT_ID -> TorBootstrapPagerViewHolder( view, components,
===================================== app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt ===================================== @@ -94,11 +94,6 @@ interface SessionControlController { */ fun handlePrivateBrowsingLearnMoreClicked()
- /** - * @see [TabSessionInteractor.onTorInfoBannerLaunchClicked] - */ - fun handleTorInfoBannerLaunchClicked() - /** * @see [TopSiteInteractor.onRenameTopSiteClicked] */ @@ -652,12 +647,4 @@ class DefaultSessionControlController( override fun handleTorNetworkSettingsClicked() { openTorNetworkSettings() } - - override fun handleTorInfoBannerLaunchClicked() { - activity.openToBrowserAndLoad( - searchTermOrURL = SupportUtils.TOR_INFO_BANNER_URL, - newTab = true, - from = BrowserDirection.FromHome - ) - } }
===================================== app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlInteractor.kt ===================================== @@ -23,12 +23,6 @@ interface TabSessionInteractor { * "Common myths about private browsing" link in private mode. */ fun onPrivateBrowsingLearnMoreClicked() - - /** - * Shows the Info Banner web page in a new tab. Called when a user clicks on the - * "Learn More" button. - */ - fun onTorInfoBannerLaunchClicked() }
/** @@ -418,8 +412,4 @@ class SessionControlInteractor( override fun onTorBootstrapNetworkSettingsClicked() { controller.handleTorNetworkSettingsClicked() } - - override fun onTorInfoBannerLaunchClicked() { - controller.handleTorInfoBannerLaunchClicked() - } }
===================================== app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlView.kt ===================================== @@ -92,7 +92,7 @@ private fun showCollections( } }
-private fun privateModeAdapterItems() = listOf(AdapterItem.TorInfoBanner) +private fun privateModeAdapterItems() = listOf(AdapterItem.PrivateBrowsingDescription)
private fun bootstrapAdapterItems() = listOf(AdapterItem.TorBootstrap)
===================================== app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/TorInfoBannerViewHolder.kt deleted ===================================== @@ -1,33 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -package org.mozilla.fenix.home.sessioncontrol.viewholders - -import android.graphics.Typeface -import android.text.SpannableString -import android.text.Spanned -import android.text.style.StyleSpan -import android.view.View -import androidx.recyclerview.widget.RecyclerView -import kotlinx.android.synthetic.main.tor_info_banner.view.* -import org.mozilla.fenix.R -import org.mozilla.fenix.home.sessioncontrol.TabSessionInteractor - -class TorInfoBannerViewHolder( - view: View, - private val interactor: TabSessionInteractor -) : RecyclerView.ViewHolder(view) { - - init { - with(view.info_banner_launch_button) { - setOnClickListener { - interactor.onTorInfoBannerLaunchClicked() - } - } - } - - companion object { - const val LAYOUT_ID = R.layout.tor_info_banner - } -}
===================================== app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt ===================================== @@ -40,7 +40,6 @@ object SupportUtils { const val DONATE_URL = "https://donate.torproject.org/" const val TB_MANUAL_URL = "https://tb-manual.torproject.org/mobile-tor" const val TOR_RELEASES = "https://www.torproject.org/releases/" - const val TOR_INFO_BANNER_URL = "http://eh5esdnd6fkbkapfc6nuyvkjgbtnzq2is72lmpwbdbxepd2z7zbgzsqd.onion/index...."
enum class SumoTopic(internal val topicStr: String) { FENIX_MOVING("sync-delist"),
===================================== app/src/main/java/org/mozilla/fenix/theme/ThemeManager.kt ===================================== @@ -32,7 +32,7 @@ abstract class ThemeManager { @get:StyleRes val currentThemeResource get() = when (currentTheme) { BrowsingMode.Normal -> R.style.NormalTheme - BrowsingMode.Private -> R.style.PrivateTheme + BrowsingMode.Private -> R.style.PrivateEOYTheme }
/**
===================================== app/src/main/res/drawable/ic_yec_activist_android.png ===================================== Binary files /dev/null and b/app/src/main/res/drawable/ic_yec_activist_android.png differ
===================================== app/src/main/res/drawable/info_banner_padded_background.xml deleted ===================================== @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?><!-- This Source Code Form is subject to the terms of the Mozilla Public - - 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/. --> -<ripple xmlns:android="http://schemas.android.com/apk/res/android" - android:color="@color/info_banner_padded_background_color"> - <item - android:bottom="6dp" - android:top="6dp"> - <shape android:shape="rectangle"> - <corners android:radius="4dp" /> - </shape> - </item> -</ripple>
===================================== app/src/main/res/drawable/tor_yec_donate_rounded_corners.xml ===================================== @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - 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/. --> + +<!-- Used for rounding the corners of a button --> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="#EFB149" /> + <corners android:radius="10dp" /> +</shape>
===================================== app/src/main/res/drawable/vpn_survey_icon.png deleted ===================================== Binary files a/app/src/main/res/drawable/vpn_survey_icon.png and /dev/null differ
===================================== app/src/main/res/font/corben_bold.ttf ===================================== Binary files /dev/null and b/app/src/main/res/font/corben_bold.ttf differ
===================================== app/src/main/res/font/corben_regular.ttf ===================================== Binary files /dev/null and b/app/src/main/res/font/corben_regular.ttf differ
===================================== app/src/main/res/layout/fragment_home.xml ===================================== @@ -81,21 +81,79 @@
<TextView android:id="@+id/exploreprivately" - android:layout_width="wrap_content" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center|center_vertical" - android:gravity="center_horizontal" + android:layout_gravity="center_horizontal|center_vertical" android:clickable="false" - android:ellipsize="end" android:focusable="false" + android:fontFamily="@font/corben_bold" + android:gravity="center" android:importantForAccessibility="no" - android:text="@string/tor_explore_privately" - android:fontFamily="Roboto-Medium" - android:textColor="#DEFFFFFF" - android:textSize="40sp" - android:lineSpacingMultiplier="1.1" - app:layout_scrollFlags="scroll" - android:visibility="gone" /> + android:paddingStart="35dp" + android:paddingTop="20dp" + android:paddingEnd="35dp" + android:text="@string/tor_privacy_human_right" + android:textColor="#FAF5DF" + android:textSize="30sp" + app:layout_scrollFlags="scroll" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <ImageView + android:id="@+id/yec_activist_image" + android:layout_width="wrap_content" + android:layout_height="200dp" + android:layout_weight="1" + android:paddingStart="35dp" + android:paddingEnd="35dp" + app:layout_scrollFlags="scroll" + app:srcCompat="@drawable/ic_yec_activist_android" + tools:ignore="ContentDescription" /> + + <Button + android:id="@+id/donate_now_button" + style="@style/TorDonateYecButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginStart="35dp" + android:layout_marginEnd="35dp" + android:background="@drawable/tor_yec_donate_rounded_corners" + android:fontFamily="Roboto-Medium" + android:gravity="center" + android:text="@string/tor_onboarding_donate_button" + android:textAllCaps="false" + android:textColor="#000000" + android:textSize="18sp" + android:textStyle="bold" + android:visibility="visible" + tools:ignore="ButtonStyleXmlDetector" /> + + <TextView + android:id="@+id/donationmatch" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:clickable="false" + android:focusable="false" + android:fontFamily="@font/corben_regular" + android:gravity="center" + android:importantForAccessibility="no" + android:lineSpacingMultiplier="1.1" + android:paddingStart="35dp" + android:paddingTop="10dp" + android:paddingEnd="35dp" + android:paddingBottom="20dp" + android:text="@string/tor_donationmatch_202110" + android:textColor="#FAF5DF" + android:textSize="18sp" + android:visibility="visible" + app:layout_scrollFlags="scroll" /> + </LinearLayout>
</com.google.android.material.appbar.AppBarLayout>
@@ -121,11 +179,12 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" - app:srcCompat="@drawable/ic_onion_pattern" - tools:ignore="ContentDescription" + android:visibility="gone" app:layout_constraintBottom_toTopOf="@id/toolbarLayout" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintStart_toStartOf="parent" + app:srcCompat="@drawable/ic_onion_pattern" + tools:ignore="ContentDescription" />
<androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/toolbarLayout"
===================================== app/src/main/res/layout/tor_info_banner.xml deleted ===================================== @@ -1,79 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- This Source Code Form is subject to the terms of the Mozilla Public - - 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/. --> -<androidx.constraintlayout.widget.ConstraintLayout - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - android:id="@+id/info_banner_wrapper" - style="@style/OnboardingCardLightWithPadding" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:clipChildren="false" - android:clipToPadding="false"> - - <LinearLayout - android:id="@+id/info_banner_header_wrapper" - android:layout_width="match_parent" - android:layout_height="wrap_content" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - android:importantForAccessibility="no"> - - <ImageView - android:id="@+id/tor_info_banner_icon" - android:layout_width="wrap_content" - android:layout_height="32dp" - android:layout_marginEnd="10dp" - android:adjustViewBounds="true" - android:clickable="false" - android:focusable="false" - android:importantForAccessibility="no" - app:srcCompat="@drawable/vpn_survey_icon"/> - - <TextView - android:id="@+id/info_banner_header" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:ellipsize="none" - android:lineSpacingExtra="6dp" - android:paddingHorizontal="4dp" - android:paddingTop="4dp" - android:scrollHorizontally="false" - android:textAlignment="viewStart" - android:textColor="?primaryText" - android:textSize="20sp" - android:text="Do you use a VPN?" /> - </LinearLayout> - - <TextView - android:id="@+id/info_banner_description" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:ellipsize="none" - android:lineSpacingExtra="6dp" - android:paddingHorizontal="4dp" - android:paddingTop="4dp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/info_banner_header_wrapper" - android:scrollHorizontally="false" - android:textAlignment="viewStart" - android:textColor="?primaryText" - android:textSize="16sp" - android:text="We’d like to learn more about how and why our users use VPNs. Complete this short ten-minute survey to tell us about your experience:" /> - - <Button - style="@style/PositiveButton" - android:id="@+id/info_banner_launch_button" - android:text="Learn More" - android:layout_marginTop="16dp" - android:textSize="18dp" - android:textColor="@android:color/black" - android:background="@drawable/info_banner_padded_background" - android:fontFamily="Roboto-Medium" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/info_banner_description" /> - -</androidx.constraintlayout.widget.ConstraintLayout>
===================================== app/src/main/res/values/colors.xml ===================================== @@ -191,6 +191,8 @@ <color name="mozac_widget_favicon_background_private_theme">@color/photonInk50</color> <color name="mozac_widget_favicon_border_private_theme">@color/photonInk50</color>
+ <color name="tor_yec_home_background">#2A1B51</color> + <!-- Tab Tray --> <color name="tab_tray_item_text_private_theme">@color/photonLightGrey05</color> <color name="tab_tray_item_url_private_theme">@color/photonLightGrey60</color> @@ -424,7 +426,4 @@
<!-- Toolbar menu icon colors --> <color name="toolbar_menu_transparent">@android:color/transparent</color> - - <!-- Tor --> - <color name="info_banner_padded_background_color">#A76FFA</color> </resources>
===================================== app/src/main/res/values/styles.xml ===================================== @@ -284,6 +284,10 @@
<style name="PrivateTheme" parent="PrivateThemeBase" />
+ <style name="PrivateEOYTheme" parent="PrivateThemeBase" > + <item name="homeBackground">@color/tor_yec_home_background</item> + </style> + <!-- Fade animation for theme switching --> <style name="WindowAnimationTransition"> <item name="android:windowEnterAnimation">@anim/fade_in</item> @@ -322,6 +326,12 @@ <item name="android:textColor">#000000</item> </style>
+ <style name="TorDonateYecButton" parent="NeutralButton"> + <item name="android:background">@drawable/tor_yec_donate_rounded_corners</item> + <item name="backgroundTint">#EFB149</item> + <item name="android:textColor">#000000</item> + </style> + <style name="DestructiveButton" parent="NeutralButton"> <item name="iconTint">@color/destructive_button_text_color</item> <item name="android:textColor">@color/destructive_button_text_color</item>
===================================== app/src/main/res/values/torbrowser_strings.xml ===================================== @@ -72,4 +72,7 @@
<!-- Spoof locale to English --> <string name="tor_spoof_english">Request English versions of web pages for enhanced privacy</string> + + <string name="tor_privacy_human_right">Privacy is a human right</string> + <string name="tor_donationmatch_202110">Your donation will be matched by Friends of Tor, up to $150,000.</string> </resources>
View it on GitLab: https://gitlab.torproject.org/tpo/applications/fenix/-/compare/0dffacd86eee8...
tbb-commits@lists.torproject.org