Update design for who can find me fragment.
This commit is contained in:
parent
a9c4fcf894
commit
ca8add87c6
3 changed files with 14 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
package org.thoughtcrime.securesms.profiles.edit.pnp
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.fragment.app.setFragmentResult
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.navigation.fragment.findNavController
|
||||
|
@ -56,17 +57,26 @@ class WhoCanSeeMyPhoneNumberFragment : DSLSettingsFragment(
|
|||
return configure {
|
||||
radioPref(
|
||||
title = DSLSettingsText.from(R.string.PhoneNumberPrivacy_everyone),
|
||||
summary = DSLSettingsText.from(R.string.WhoCanSeeMyPhoneNumberFragment__anyone_who_has),
|
||||
isChecked = state == WhoCanSeeMyPhoneNumberState.EVERYONE,
|
||||
onClick = { viewModel.onEveryoneCanSeeMyPhoneNumberSelected() }
|
||||
)
|
||||
|
||||
radioPref(
|
||||
title = DSLSettingsText.from(R.string.PhoneNumberPrivacy_nobody),
|
||||
summary = DSLSettingsText.from(R.string.WhoCanSeeMyPhoneNumberFragment__nobody_on_signal),
|
||||
isChecked = state == WhoCanSeeMyPhoneNumberState.NOBODY,
|
||||
onClick = { viewModel.onNobodyCanSeeMyPhoneNumberSelected() }
|
||||
)
|
||||
|
||||
textPref(
|
||||
title = DSLSettingsText.from(
|
||||
when (state) {
|
||||
WhoCanSeeMyPhoneNumberState.EVERYONE -> R.string.WhoCanSeeMyPhoneNumberFragment__anyone_who_has
|
||||
WhoCanSeeMyPhoneNumberState.NOBODY -> R.string.WhoCanSeeMyPhoneNumberFragment__nobody_on_signal
|
||||
},
|
||||
DSLSettingsText.TextAppearanceModifier(R.style.Signal_Text_BodyMedium),
|
||||
DSLSettingsText.ColorModifier(ContextCompat.getColor(requireContext(), R.color.signal_colorOnSurfaceVariant))
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,6 +179,7 @@ public final class FeatureFlags {
|
|||
@SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
|
||||
@VisibleForTesting
|
||||
static final Map<String, Object> FORCED_VALUES = new HashMap<String, Object>() {{
|
||||
put(PHONE_NUMBER_PRIVACY, true);
|
||||
}};
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dsl_settings_gutter"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/save"
|
||||
android:text="@string/RegistrationActivity_next"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Add table
Reference in a new issue