[fenix] FNX-14498 ⁃ For https://github.com/mozilla-mobile/fenix/issues/9487: improve fxa onboarding manual sign in card (https://github.com/mozilla-mobile/fenix/pull/13317)
* Replace strings, add learn more, hook up button * Constrain learn more and icon to the text * View holder tests * Lint * Update homescreen ui testpull/600/head
parent
77bd9544dd
commit
87e1b377a9
@ -0,0 +1,22 @@
|
||||
/* 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.onboarding
|
||||
|
||||
import android.content.Context
|
||||
import org.mozilla.fenix.BrowserDirection
|
||||
import org.mozilla.fenix.HomeActivity
|
||||
import org.mozilla.fenix.settings.SupportUtils
|
||||
|
||||
class OnboardingController(
|
||||
private val context: Context
|
||||
) {
|
||||
fun handleLearnMoreClicked() {
|
||||
(context as HomeActivity).openToBrowserAndLoad(
|
||||
searchTermOrURL = SupportUtils.getFirefoxAccountSumoUrl(),
|
||||
newTab = true,
|
||||
from = BrowserDirection.FromHome
|
||||
)
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
/* 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.onboarding
|
||||
|
||||
class OnboardingInteractor(private val onboardingController: OnboardingController) {
|
||||
|
||||
/**
|
||||
* Called when the user clicks the learn more link
|
||||
* @param url the url the suggestion was providing
|
||||
*/
|
||||
fun onLearnMoreClicked() = onboardingController.handleLearnMoreClicked()
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<?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/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M17.6655,14.2092C16.1843,12.4998 14.1333,14.8 11.9997,14.8C9.8675,14.8 7.8151,12.4998 6.3339,14.2092C5.9139,14.6936 5.8803,15.3992 6.2401,15.9284C7.4959,17.7764 9.5959,19 11.9997,19C14.4035,19 16.5035,17.7764 17.7593,15.9284C18.1205,15.3992 18.0855,14.6936 17.6655,14.2092M16.25,9.25C16.25,6.9026 14.3474,5 12,5C9.6526,5 7.75,6.9026 7.75,9.25C7.75,11.5974 9.6526,13.5 12,13.5C14.3474,13.5 16.25,11.5974 16.25,9.25Z" />
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,22C6.4772,22 2,17.5228 2,12C2,6.4772 6.4772,2 12,2C17.5228,2 22,6.4772 22,12C21.9939,17.5203 17.5203,21.9939 12,22L12,22ZM12,4C7.5817,4 4,7.5817 4,12C4,16.4183 7.5817,20 12,20C16.4183,20 20,16.4183 20,12C19.995,7.5838 16.4162,4.005 12,4Z" />
|
||||
</vector>
|
Loading…
Reference in New Issue