1
0
Fork 0

For #12107: Follow ux mock on Settings --> Account screen

master
Hakkı Kaan Çalışkan 2020-06-30 21:10:14 +03:00 committed by Mugurell
parent 07e01c5b86
commit f424656575
3 changed files with 18 additions and 16 deletions

View File

@ -34,6 +34,7 @@ import mozilla.components.service.fxa.manager.SyncEnginesStorage
import mozilla.components.service.fxa.sync.SyncReason
import mozilla.components.service.fxa.sync.SyncStatusObserver
import mozilla.components.service.fxa.sync.getLastSynced
import mozilla.components.support.ktx.android.content.getColorFromAttr
import mozilla.components.support.ktx.android.util.dpToPx
import org.mozilla.fenix.FeatureFlags
import org.mozilla.fenix.R
@ -138,6 +139,10 @@ class AccountSettingsFragment : PreferenceFragmentCompat() {
preferenceSyncNow.apply {
onPreferenceClickListener = getClickListenerForSyncNow()
icon = icon.mutate().apply {
setTint(context.getColorFromAttr(R.attr.primaryText))
}
// Current sync state
if (requireComponents.backgroundServices.accountManager.isSyncActive()) {
title = getString(R.string.sync_syncing_in_progress)

View File

@ -2,7 +2,6 @@
- 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/. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/account_preference_background"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -1,54 +1,52 @@
<?xml version="1.0" encoding="utf-8"?><!-- This Source Code Form is subject to the terms of the Mozilla Public
<?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/. -->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.preference.Preference
app:iconSpaceReserved="false"
<Preference
android:key="@string/pref_key_sync_now"
android:title="@string/preferences_sync_now" />
android:title="@string/preferences_sync_now"
app:icon="@drawable/mozac_ic_sync" />
<androidx.preference.EditTextPreference
app:iconSpaceReserved="false"
<EditTextPreference
android:key="@string/pref_key_sync_device_name"
android:title="@string/preferences_sync_device_name" />
<androidx.preference.Preference
app:iconSpaceReserved="false"
<Preference
android:key="@string/pref_key_sign_out"
android:title="@string/preferences_sign_out" />
<androidx.preference.PreferenceCategory
<PreferenceCategory
android:key="@string/preferences_sync_category"
android:title="@string/preferences_sync_category"
android:layout="@layout/preference_cat_style">
<androidx.preference.CheckBoxPreference
<CheckBoxPreference
android:defaultValue="true"
android:key="@string/pref_key_sync_bookmarks"
android:layout="@layout/checkbox_left_preference"
android:title="@string/preferences_sync_bookmarks" />
<androidx.preference.CheckBoxPreference
<CheckBoxPreference
android:defaultValue="true"
android:key="@string/pref_key_sync_history"
android:layout="@layout/checkbox_left_preference"
android:title="@string/preferences_sync_history" />
<androidx.preference.CheckBoxPreference
<CheckBoxPreference
android:defaultValue="true"
android:key="@string/pref_key_sync_logins"
android:layout="@layout/checkbox_left_preference"
android:title="@string/preferences_sync_logins" />
<androidx.preference.CheckBoxPreference
<CheckBoxPreference
android:defaultValue="false"
app:isPreferenceVisible="false"
android:key="@string/pref_key_sync_tabs"
android:layout="@layout/checkbox_left_preference"
android:title="@string/preferences_sync_tabs_2"/>
</androidx.preference.PreferenceCategory>
</PreferenceCategory>
</PreferenceScreen>