Richard Pospesel pushed to branch tor-browser-102.2.1-12.0-1 at The Tor Project / Applications / fenix
Commits:
-
f9aea110
by Dan Ballard at 2022-12-02T12:09:59+00:00
11 changed files:
- app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
- app/src/main/java/org/mozilla/fenix/theme/ThemeManager.kt
- + app/src/main/res/drawable/ic_yec22_bg_combined_android_3x.png
- + app/src/main/res/drawable/tor_yec_donate_rounded_corners.xml
- + app/src/main/res/font/spacegrotesk_light.ttf
- + app/src/main/res/font/spacegrotesk_regular.ttf
- + app/src/main/res/font/spacegrotesk_semibold.ttf
- + app/src/main/res/font/spacemono_bold.ttf
- app/src/main/res/layout/fragment_home.xml
- app/src/main/res/values/colors.xml
- app/src/main/res/values/styles.xml
Changes:
... | ... | @@ -10,11 +10,8 @@ import android.graphics.drawable.BitmapDrawable |
10 | 10 | import android.graphics.drawable.ColorDrawable
|
11 | 11 | import android.os.Bundle
|
12 | 12 | import android.os.StrictMode
|
13 | -import android.view.Gravity
|
|
14 | -import android.view.LayoutInflater
|
|
15 | -import android.view.View
|
|
16 | -import android.view.ViewGroup
|
|
17 | -import android.view.ViewTreeObserver
|
|
13 | +import android.util.Log
|
|
14 | +import android.view.*
|
|
18 | 15 | import android.widget.Button
|
19 | 16 | import android.widget.LinearLayout
|
20 | 17 | import android.widget.PopupWindow
|
... | ... | @@ -22,16 +19,10 @@ import androidx.annotation.VisibleForTesting |
22 | 19 | import androidx.appcompat.content.res.AppCompatResources
|
23 | 20 | import androidx.constraintlayout.widget.ConstraintLayout
|
24 | 21 | import androidx.constraintlayout.widget.ConstraintSet
|
25 | -import androidx.constraintlayout.widget.ConstraintSet.BOTTOM
|
|
26 | -import androidx.constraintlayout.widget.ConstraintSet.PARENT_ID
|
|
27 | -import androidx.constraintlayout.widget.ConstraintSet.TOP
|
|
22 | +import androidx.constraintlayout.widget.ConstraintSet.*
|
|
28 | 23 | import androidx.coordinatorlayout.widget.CoordinatorLayout
|
29 | 24 | import androidx.core.content.ContextCompat
|
30 | -import androidx.core.view.children
|
|
31 | -import androidx.core.view.doOnLayout
|
|
32 | -import androidx.core.view.isGone
|
|
33 | -import androidx.core.view.isVisible
|
|
34 | -import androidx.core.view.updateLayoutParams
|
|
25 | +import androidx.core.view.*
|
|
35 | 26 | import androidx.fragment.app.Fragment
|
36 | 27 | import androidx.fragment.app.activityViewModels
|
37 | 28 | import androidx.lifecycle.Observer
|
... | ... | @@ -66,15 +57,13 @@ import mozilla.components.service.glean.private.NoExtras |
66 | 57 | import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
67 | 58 | import mozilla.components.support.ktx.android.content.res.resolveAttribute
|
68 | 59 | import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged
|
60 | +import mozilla.components.support.locale.LocaleManager
|
|
69 | 61 | import mozilla.components.ui.tabcounter.TabCounterMenu
|
70 | -import org.mozilla.fenix.BuildConfig
|
|
71 | -import org.mozilla.fenix.Config
|
|
62 | +import org.mozilla.fenix.*
|
|
72 | 63 | import org.mozilla.fenix.GleanMetrics.Events
|
73 | 64 | import org.mozilla.fenix.GleanMetrics.HomeScreen
|
74 | 65 | import org.mozilla.fenix.GleanMetrics.StartOnHome
|
75 | 66 | import org.mozilla.fenix.GleanMetrics.Wallpapers
|
76 | -import org.mozilla.fenix.HomeActivity
|
|
77 | -import org.mozilla.fenix.R
|
|
78 | 67 | import org.mozilla.fenix.browser.BrowserAnimator.Companion.getToolbarNavOptions
|
79 | 68 | import org.mozilla.fenix.browser.browsingmode.BrowsingMode
|
80 | 69 | import org.mozilla.fenix.components.FenixSnackbar
|
... | ... | @@ -84,12 +73,7 @@ import org.mozilla.fenix.components.appstate.AppAction |
84 | 73 | import org.mozilla.fenix.components.toolbar.FenixTabCounterMenu
|
85 | 74 | import org.mozilla.fenix.components.toolbar.ToolbarPosition
|
86 | 75 | import org.mozilla.fenix.databinding.FragmentHomeBinding
|
87 | -import org.mozilla.fenix.ext.components
|
|
88 | -import org.mozilla.fenix.ext.hideToolbar
|
|
89 | -import org.mozilla.fenix.ext.nav
|
|
90 | -import org.mozilla.fenix.ext.requireComponents
|
|
91 | -import org.mozilla.fenix.ext.runIfFragmentIsAttached
|
|
92 | -import org.mozilla.fenix.ext.settings
|
|
76 | +import org.mozilla.fenix.ext.*
|
|
93 | 77 | import org.mozilla.fenix.gleanplumb.DefaultMessageController
|
94 | 78 | import org.mozilla.fenix.gleanplumb.MessagingFeature
|
95 | 79 | import org.mozilla.fenix.home.mozonline.showPrivacyPopWindow
|
... | ... | @@ -110,6 +94,7 @@ import org.mozilla.fenix.home.topsites.DefaultTopSitesView |
110 | 94 | import org.mozilla.fenix.nimbus.FxNimbus
|
111 | 95 | import org.mozilla.fenix.onboarding.FenixOnboarding
|
112 | 96 | import org.mozilla.fenix.perf.MarkersFragmentLifecycleCallbacks
|
97 | +import org.mozilla.fenix.settings.advanced.getSelectedLocale
|
|
113 | 98 | import org.mozilla.fenix.tabstray.TabsTrayAccessPoint
|
114 | 99 | import org.mozilla.fenix.tor.bootstrap.TorQuickStart
|
115 | 100 | import org.mozilla.fenix.utils.Settings.Companion.TOP_SITES_PROVIDER_MAX_THRESHOLD
|
... | ... | @@ -117,6 +102,8 @@ import org.mozilla.fenix.utils.ToolbarPopupWindow |
117 | 102 | import org.mozilla.fenix.utils.allowUndo
|
118 | 103 | import org.mozilla.fenix.wallpapers.WallpaperManager
|
119 | 104 | import java.lang.ref.WeakReference
|
105 | +import java.util.*
|
|
106 | +import kotlin.concurrent.schedule
|
|
120 | 107 | import kotlin.math.min
|
121 | 108 | |
122 | 109 | @Suppress("TooManyFunctions", "LargeClass")
|
... | ... | @@ -229,6 +216,13 @@ class HomeFragment : Fragment() { |
229 | 216 | ?.replace(" *([.,。।]) *".toRegex(), "$1\n")
|
230 | 217 | ?.trim()
|
231 | 218 | |
219 | + binding.yecPoweredbyprivacy.text = localBinding
|
|
220 | + .yecPoweredbyprivacy
|
|
221 | + .text
|
|
222 | + ?.replace(" *([.,。।]) *".toRegex(), "$1\n")
|
|
223 | + ?.trim()
|
|
224 | + |
|
225 | + |
|
232 | 226 | currentMode = CurrentMode(
|
233 | 227 | requireContext(),
|
234 | 228 | onboarding,
|
... | ... | @@ -411,6 +405,20 @@ class HomeFragment : Fragment() { |
411 | 405 | adjustHomeFragmentView(currentMode.getCurrentMode())
|
412 | 406 | showSessionControlView()
|
413 | 407 | |
408 | + binding.donateNowButton.setOnClickListener {
|
|
409 | + val country = LocaleManager.getSelectedLocale(requireContext()).country
|
|
410 | + var locale = LocaleManager.getSelectedLocale(requireContext()).language
|
|
411 | + if (country != "") {
|
|
412 | + locale = "${locale}-${country}"
|
|
413 | + }
|
|
414 | + val localeUrl = "https://www.torproject.org/pbp-${locale}-mobile"
|
|
415 | + activity.openToBrowserAndLoad(
|
|
416 | + searchTermOrURL = localeUrl,
|
|
417 | + newTab = true,
|
|
418 | + from = BrowserDirection.FromHome
|
|
419 | + )
|
|
420 | + }
|
|
421 | + |
|
414 | 422 | // DO NOT MOVE ANYTHING BELOW THIS addMarker CALL!
|
415 | 423 | requireComponents.core.engine.profiler?.addMarker(
|
416 | 424 | MarkersFragmentLifecycleCallbacks.MARKER_NAME, profilerStartTime, "HomeFragment.onCreateView",
|
... | ... | @@ -424,8 +432,34 @@ class HomeFragment : Fragment() { |
424 | 432 | |
425 | 433 | getMenuButton()?.dismissMenu()
|
426 | 434 | displayWallpaperIfEnabled()
|
435 | + |
|
436 | + //view.donationmatch.setOnClickListener {
|
|
437 | + // activity.openToBrowserAndLoad(
|
|
438 | + // searchTermOrURL = "https://blog.torproject.org/friends-of-tor-match-2020",
|
|
439 | + // newTab = true,
|
|
440 | + // from = BrowserDirection.FromHome
|
|
441 | + // )
|
|
442 | + //}
|
|
443 | + |
|
444 | + binding.donateNowButton.setOnClickListener {
|
|
445 | + val country = LocaleManager.getSelectedLocale(requireContext()).country
|
|
446 | + var locale = LocaleManager.getSelectedLocale(requireContext()).language
|
|
447 | + if (country != "") {
|
|
448 | + locale = "${locale}-${country}"
|
|
449 | + }
|
|
450 | + val localeUrl = "https://www.torproject.org/pbp-${locale}-mobile"
|
|
451 | + (activity as HomeActivity).openToBrowserAndLoad(
|
|
452 | + searchTermOrURL = localeUrl,
|
|
453 | + newTab = true,
|
|
454 | + from = BrowserDirection.FromHome
|
|
455 | + )
|
|
456 | + }
|
|
427 | 457 | }
|
428 | 458 | |
459 | + //private fun dismissTip(tip: Tip) {
|
|
460 | + // sessionControlInteractor.onCloseTip(tip)
|
|
461 | + //}
|
|
462 | + |
|
429 | 463 | /**
|
430 | 464 | * Returns a [TopSitesConfig] which specifies how many top sites to display and whether or
|
431 | 465 | * not frequently visited sites should be displayed.
|
... | ... | @@ -577,14 +611,97 @@ class HomeFragment : Fragment() { |
577 | 611 | }
|
578 | 612 | }
|
579 | 613 | }
|
614 | + val yec22launched = (activity as? HomeActivity)?.themeManager?.isYECActive ?: false
|
|
615 | + |
|
580 | 616 | // Hide the onion pattern during Onboarding, too.
|
581 | 617 | binding.onionPatternImage.apply {
|
582 | - visibility = if (onboarding.userHasBeenOnboarded()) {
|
|
618 | + visibility = if (onboarding.userHasBeenOnboarded() && !yec22launched) {
|
|
619 | + View.VISIBLE
|
|
620 | + } else {
|
|
621 | + View.GONE
|
|
622 | + }
|
|
623 | + }
|
|
624 | + |
|
625 | + // Hide tor browser header during onboarding and EOY event
|
|
626 | + binding.exploreprivately.apply {
|
|
627 | + visibility = if (onboarding.userHasBeenOnboarded() && !yec22launched) {
|
|
628 | + View.VISIBLE
|
|
629 | + } else {
|
|
630 | + View.GONE
|
|
631 | + }
|
|
632 | + }
|
|
633 | + |
|
634 | + |
|
635 | + |
|
636 | + // Hide EOY header text during onboarding and before event
|
|
637 | + binding.yecPoweredbyprivacy.apply {
|
|
638 | + visibility = if (onboarding.userHasBeenOnboarded() && yec22launched) {
|
|
639 | + View.VISIBLE
|
|
640 | + } else {
|
|
641 | + View.GONE
|
|
642 | + }
|
|
643 | + }
|
|
644 | + |
|
645 | + |
|
646 | + |
|
647 | + // Hide the EOY image during Onboarding, and before event
|
|
648 | + binding.yecActivistImage.apply {
|
|
649 | + visibility = if (onboarding.userHasBeenOnboarded() && yec22launched) {
|
|
650 | + View.VISIBLE
|
|
651 | + } else {
|
|
652 | + View.GONE
|
|
653 | + }
|
|
654 | + }
|
|
655 | + |
|
656 | + binding.yecResistanceImage.apply {
|
|
657 | + visibility = if (onboarding.userHasBeenOnboarded() && yec22launched) {
|
|
658 | + View.VISIBLE
|
|
659 | + } else {
|
|
660 | + View.GONE
|
|
661 | + }
|
|
662 | + }
|
|
663 | + binding.yecChangeImage.apply {
|
|
664 | + visibility = if (onboarding.userHasBeenOnboarded() && yec22launched) {
|
|
665 | + View.VISIBLE
|
|
666 | + } else {
|
|
667 | + View.GONE
|
|
668 | + }
|
|
669 | + }
|
|
670 | + binding.yecFreedomImage.apply {
|
|
671 | + visibility = if (onboarding.userHasBeenOnboarded() && yec22launched) {
|
|
672 | + View.VISIBLE
|
|
673 | + } else {
|
|
674 | + View.GONE
|
|
675 | + }
|
|
676 | + }
|
|
677 | + |
|
678 | + // Hide the EOY donate button during Onboarding, and before event
|
|
679 | + binding.donateNowButton.apply {
|
|
680 | + visibility = if (onboarding.userHasBeenOnboarded() && yec22launched) {
|
|
681 | + View.VISIBLE
|
|
682 | + } else {
|
|
683 | + View.GONE
|
|
684 | + }
|
|
685 | + }
|
|
686 | + |
|
687 | + // Hide EOY donation match text during onboarding and before event
|
|
688 | + binding.donationmatch.apply {
|
|
689 | + visibility = if (onboarding.userHasBeenOnboarded() && yec22launched) {
|
|
583 | 690 | View.VISIBLE
|
584 | 691 | } else {
|
585 | 692 | View.GONE
|
586 | 693 | }
|
587 | 694 | }
|
695 | + |
|
696 | + // Hide the EOY image during Onboarding, and before event
|
|
697 | + binding.yecImageLayout.apply {
|
|
698 | + visibility = if (onboarding.userHasBeenOnboarded() && yec22launched) {
|
|
699 | + View.VISIBLE
|
|
700 | + } else {
|
|
701 | + View.GONE
|
|
702 | + }
|
|
703 | + }
|
|
704 | + |
|
588 | 705 | binding.homeAppBar.apply {
|
589 | 706 | visibility = View.VISIBLE
|
590 | 707 | |
... | ... | @@ -932,7 +1049,11 @@ class HomeFragment : Fragment() { |
932 | 1049 | override fun onResume() {
|
933 | 1050 | super.onResume()
|
934 | 1051 | if (browsingModeManager.mode == BrowsingMode.Private) {
|
935 | - activity?.window?.setBackgroundDrawableResource(R.drawable.private_home_background_gradient)
|
|
1052 | + if ((activity as? HomeActivity)?.themeManager?.isYECActive ?: false) {
|
|
1053 | + activity?.window?.setBackgroundDrawableResource(R.color.tor_yec_home_background)
|
|
1054 | + } else {
|
|
1055 | + activity?.window?.setBackgroundDrawableResource(R.drawable.private_home_background_gradient)
|
|
1056 | + }
|
|
936 | 1057 | }
|
937 | 1058 | |
938 | 1059 | // fenix#40176: Ensure the Home fragment is rendered correctly when we resume.
|
... | ... | @@ -23,18 +23,33 @@ import org.mozilla.fenix.HomeActivity |
23 | 23 | import org.mozilla.fenix.R
|
24 | 24 | import org.mozilla.fenix.browser.browsingmode.BrowsingMode
|
25 | 25 | import org.mozilla.fenix.customtabs.ExternalAppBrowserActivity
|
26 | +import org.mozilla.fenix.home.HomeFragment
|
|
27 | +import java.util.*
|
|
26 | 28 | |
27 | 29 | abstract class ThemeManager {
|
30 | + // 1663979387091 // 2022 9 21 - testing
|
|
31 | + // 1665619200000 // 2022 10 13
|
|
32 | + private val yec2022LaunchDate = Date(1665619200000)
|
|
33 | + // 1672531200000 // 2023 01 01
|
|
34 | + private val yec2022EndDate = Date(1672531200000)
|
|
28 | 35 | |
29 | 36 | abstract var currentTheme: BrowsingMode
|
30 | 37 | |
38 | + val isYECActive get() = Date().after(yec2022LaunchDate) && Date().before(yec2022EndDate)
|
|
39 | + |
|
31 | 40 | /**
|
32 | 41 | * Returns the style resource corresponding to the [currentTheme].
|
33 | 42 | */
|
34 | 43 | @get:StyleRes
|
35 | 44 | val currentThemeResource get() = when (currentTheme) {
|
36 | 45 | BrowsingMode.Normal -> R.style.NormalTheme
|
37 | - BrowsingMode.Private -> R.style.PrivateTheme
|
|
46 | + BrowsingMode.Private -> {
|
|
47 | + if (isYECActive) {
|
|
48 | + R.style.PrivateEOYTheme
|
|
49 | + } else {
|
|
50 | + R.style.PrivateTheme
|
|
51 | + }
|
|
52 | + }
|
|
38 | 53 | }
|
39 | 54 | |
40 | 55 | /**
|
1 | +<?xml version="1.0" encoding="utf-8"?>
|
|
2 | +<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
3 | + - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
4 | + - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
5 | + |
|
6 | +<!-- Used for rounding the corners of a button -->
|
|
7 | +<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
8 | + android:shape="rectangle">
|
|
9 | + <solid android:color="#C0FF00" />
|
|
10 | + <corners android:radius="10dp" />
|
|
11 | +</shape> |
... | ... | @@ -102,6 +102,144 @@ |
102 | 102 | android:lineSpacingMultiplier="1.1"
|
103 | 103 | app:layout_scrollFlags="scroll" />
|
104 | 104 | |
105 | + <LinearLayout
|
|
106 | + android:layout_width="match_parent"
|
|
107 | + android:layout_height="wrap_content"
|
|
108 | + android:layout_marginTop="50dp"
|
|
109 | + android:layout_weight="1"
|
|
110 | + android:orientation="vertical">
|
|
111 | + |
|
112 | + <TextView
|
|
113 | + android:id="@+id/yec_poweredbyprivacy"
|
|
114 | + android:layout_width="match_parent"
|
|
115 | + android:layout_height="wrap_content"
|
|
116 | + android:gravity="center"
|
|
117 | + android:layout_marginStart="35dp"
|
|
118 | + android:layout_marginEnd="35dp"
|
|
119 | + android:clickable="false"
|
|
120 | + android:focusable="false"
|
|
121 | + android:fontFamily="@font/spacemono_bold"
|
|
122 | + android:importantForAccessibility="no"
|
|
123 | + android:text="@string/yec2022_powered_by_privacy"
|
|
124 | + android:lineSpacingMultiplier="0.8"
|
|
125 | + android:textColor="#C0FF00"
|
|
126 | + android:textSize="28sp"
|
|
127 | + app:layout_scrollFlags="scroll" />
|
|
128 | + |
|
129 | + <RelativeLayout
|
|
130 | + android:id="@+id/yec_image_layout"
|
|
131 | + android:layout_width="match_parent"
|
|
132 | + android:layout_height="wrap_content"
|
|
133 | + android:layout_marginTop="22dp"
|
|
134 | + android:layout_marginStart="35dp"
|
|
135 | + android:layout_marginEnd="35dp"
|
|
136 | + android:gravity="center"
|
|
137 | + android:orientation="vertical" >
|
|
138 | + |
|
139 | + <ImageView
|
|
140 | + android:id="@+id/yec_activist_image"
|
|
141 | + android:layout_width="match_parent"
|
|
142 | + android:layout_height="wrap_content"
|
|
143 | + android:scaleType="fitCenter"
|
|
144 | + android:paddingTop="10dp"
|
|
145 | + android:adjustViewBounds="true"
|
|
146 | + app:layout_scrollFlags="scroll"
|
|
147 | + app:srcCompat="@drawable/ic_yec22_bg_combined_android_3x"
|
|
148 | + tools:ignore="ContentDescription" />
|
|
149 | + |
|
150 | + <TextView
|
|
151 | + android:id="@+id/yec_resistance_image"
|
|
152 | + android:layout_width="wrap_content"
|
|
153 | + android:layout_height="wrap_content"
|
|
154 | + android:layout_centerHorizontal="true"
|
|
155 | + android:paddingStart="80dp"
|
|
156 | + android:clickable="false"
|
|
157 | + android:focusable="false"
|
|
158 | + android:fontFamily="@font/spacegrotesk_semibold"
|
|
159 | + android:importantForAccessibility="no"
|
|
160 | + android:rotation="-2.25"
|
|
161 | + android:text="@string/yec2022_resistance"
|
|
162 | + android:textColor="#FF8AFF"
|
|
163 | + android:textSize="33sp"
|
|
164 | + app:layout_scrollFlags="scroll" />
|
|
165 | + |
|
166 | + <TextView
|
|
167 | + android:id="@+id/yec_change_image"
|
|
168 | + android:layout_width="wrap_content"
|
|
169 | + android:layout_height="wrap_content"
|
|
170 | + android:layout_centerHorizontal="true"
|
|
171 | + android:paddingStart="80dp"
|
|
172 | + android:layout_alignLeft="@+id/yec_resistance_image"
|
|
173 | + android:layout_below="@+id/yec_resistance_image"
|
|
174 | + android:layout_marginTop="-10dp"
|
|
175 | + android:clickable="false"
|
|
176 | + android:focusable="false"
|
|
177 | + android:fontFamily="@font/spacegrotesk_light"
|
|
178 | + android:importantForAccessibility="no"
|
|
179 | + android:rotation="-2.25"
|
|
180 | + android:text="@string/yec2022_change"
|
|
181 | + android:textColor="#C0FF00"
|
|
182 | + android:textSize="33sp"
|
|
183 | + app:layout_scrollFlags="scroll" />
|
|
184 | + |
|
185 | + <TextView
|
|
186 | + android:id="@+id/yec_freedom_image"
|
|
187 | + android:layout_width="wrap_content"
|
|
188 | + android:layout_height="wrap_content"
|
|
189 | + android:layout_centerHorizontal="true"
|
|
190 | + android:paddingStart="80dp"
|
|
191 | + android:layout_alignLeft="@+id/yec_resistance_image"
|
|
192 | + android:layout_below="@+id/yec_change_image"
|
|
193 | + android:layout_marginTop="-10dp"
|
|
194 | + android:clickable="false"
|
|
195 | + android:focusable="false"
|
|
196 | + android:fontFamily="@font/spacegrotesk_semibold"
|
|
197 | + android:importantForAccessibility="no"
|
|
198 | + android:rotation="-2.25"
|
|
199 | + android:text="@string/yec2022_freedom"
|
|
200 | + android:textColor="#FF8AFF"
|
|
201 | + android:textSize="33sp"
|
|
202 | + app:layout_scrollFlags="scroll" />
|
|
203 | + </RelativeLayout>
|
|
204 | + |
|
205 | + <Button
|
|
206 | + android:id="@+id/donate_now_button"
|
|
207 | + style="@style/TorDonateYecButton"
|
|
208 | + android:layout_width="match_parent"
|
|
209 | + android:layout_height="wrap_content"
|
|
210 | + android:layout_marginLeft="35dp"
|
|
211 | + android:layout_marginRight="35dp"
|
|
212 | + android:layout_marginTop="22dp"
|
|
213 | + android:background="@drawable/tor_yec_donate_rounded_corners"
|
|
214 | + android:text="@string/tor_onboarding_donate_button"
|
|
215 | + android:textAllCaps="false"
|
|
216 | + android:textColor="#000000"
|
|
217 | + android:textSize="18sp"
|
|
218 | + android:textStyle="bold"
|
|
219 | + android:visibility="visible"
|
|
220 | + tools:ignore="ButtonStyleXmlDetector" />
|
|
221 | + |
|
222 | + <TextView
|
|
223 | + android:id="@+id/donationmatch"
|
|
224 | + android:layout_width="wrap_content"
|
|
225 | + android:layout_height="wrap_content"
|
|
226 | + android:paddingTop="22dp"
|
|
227 | + android:paddingStart="35dp"
|
|
228 | + android:paddingEnd="35dp"
|
|
229 | + android:clickable="false"
|
|
230 | + android:focusable="false"
|
|
231 | + android:fontFamily="@font/spacemono_bold"
|
|
232 | + android:importantForAccessibility="no"
|
|
233 | + android:lineSpacingMultiplier="1.1"
|
|
234 | + android:text="@string/yec2022_donation_matching"
|
|
235 | + android:textColor="#FAF5DF"
|
|
236 | + android:textSize="18sp"
|
|
237 | + android:gravity="center"
|
|
238 | + android:visibility="visible"
|
|
239 | + app:layout_scrollFlags="scroll" />
|
|
240 | + |
|
241 | + |
|
242 | + </LinearLayout>
|
|
105 | 243 | </com.google.android.material.appbar.AppBarLayout>
|
106 | 244 | |
107 | 245 | <androidx.recyclerview.widget.RecyclerView
|
... | ... | @@ -273,7 +273,7 @@ |
273 | 273 | <color name="sync_disconnected_background_private_theme">#5B5846</color>
|
274 | 274 | <color name="onboarding_illustration_deselected_private_theme">#99FBFBFE</color>
|
275 | 275 | <color name="prompt_login_edit_text_cursor_color_private_theme">@color/photonViolet50</color>
|
276 | - |
|
276 | + <color name="tor_yec_home_background">#0E0625</color>
|
|
277 | 277 | <!-- Normal theme colors for light mode -->
|
278 | 278 | <color name="accent_normal_theme">@color/photonInk20</color>
|
279 | 279 | <color name="accent_high_contrast_normal_theme">@color/photonInk20</color>
|
... | ... | @@ -330,6 +330,11 @@ |
330 | 330 | |
331 | 331 | <style name="PrivateTheme" parent="PrivateThemeBase" />
|
332 | 332 | |
333 | + <style name="PrivateEOYTheme" parent="PrivateThemeBase" >
|
|
334 | + <item name="android:windowBackground">@color/tor_yec_home_background</item>
|
|
335 | + <item name="homeBackground">@color/tor_yec_home_background</item>
|
|
336 | + </style>
|
|
337 | + |
|
333 | 338 | <!-- Fade animation for theme switching -->
|
334 | 339 | <style name="WindowAnimationTransition">
|
335 | 340 | <item name="android:windowEnterAnimation">@anim/fade_in</item>
|
... | ... | @@ -368,6 +373,21 @@ |
368 | 373 | <item name="android:textColor">#000000</item>
|
369 | 374 | </style>
|
370 | 375 | |
376 | + |
|
377 | + <style name="TorDonateYecButton" parent="NeutralButton">
|
|
378 | + <item name="android:background">@drawable/tor_yec_donate_rounded_corners</item>
|
|
379 | + <item name="backgroundTint">#C0FF00</item>
|
|
380 | + <item name="android:textColor">#000000</item>
|
|
381 | + <item name="android:fontFamily">@font/spacemono_bold</item>
|
|
382 | + <item name="fontFamily">@font/spacemono_bold</item>
|
|
383 | + </style>
|
|
384 | + |
|
385 | + <style name="TorDonateYecButtonText" parent="Base.TextAppearance.MaterialComponents.Badge">
|
|
386 | + |
|
387 | + <item name="android:textStyle">bold</item>
|
|
388 | + <item name="android:textColor">#000000</item>
|
|
389 | + </style>
|
|
390 | + |
|
371 | 391 | <style name="DestructiveButton" parent="NeutralButton">
|
372 | 392 | <item name="iconTint">@color/fx_mobile_text_color_warning</item>
|
373 | 393 | <item name="android:textColor">@color/fx_mobile_text_color_warning</item>
|