kopia lustrzana https://github.com/ryukoposting/Signal-Android
Update design for who can find me fragment.
rodzic
a9c4fcf894
commit
ca8add87c6
|
@ -1,6 +1,7 @@
|
||||||
package org.thoughtcrime.securesms.profiles.edit.pnp
|
package org.thoughtcrime.securesms.profiles.edit.pnp
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.fragment.app.setFragmentResult
|
import androidx.fragment.app.setFragmentResult
|
||||||
import androidx.fragment.app.viewModels
|
import androidx.fragment.app.viewModels
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
|
@ -56,17 +57,26 @@ class WhoCanSeeMyPhoneNumberFragment : DSLSettingsFragment(
|
||||||
return configure {
|
return configure {
|
||||||
radioPref(
|
radioPref(
|
||||||
title = DSLSettingsText.from(R.string.PhoneNumberPrivacy_everyone),
|
title = DSLSettingsText.from(R.string.PhoneNumberPrivacy_everyone),
|
||||||
summary = DSLSettingsText.from(R.string.WhoCanSeeMyPhoneNumberFragment__anyone_who_has),
|
|
||||||
isChecked = state == WhoCanSeeMyPhoneNumberState.EVERYONE,
|
isChecked = state == WhoCanSeeMyPhoneNumberState.EVERYONE,
|
||||||
onClick = { viewModel.onEveryoneCanSeeMyPhoneNumberSelected() }
|
onClick = { viewModel.onEveryoneCanSeeMyPhoneNumberSelected() }
|
||||||
)
|
)
|
||||||
|
|
||||||
radioPref(
|
radioPref(
|
||||||
title = DSLSettingsText.from(R.string.PhoneNumberPrivacy_nobody),
|
title = DSLSettingsText.from(R.string.PhoneNumberPrivacy_nobody),
|
||||||
summary = DSLSettingsText.from(R.string.WhoCanSeeMyPhoneNumberFragment__nobody_on_signal),
|
|
||||||
isChecked = state == WhoCanSeeMyPhoneNumberState.NOBODY,
|
isChecked = state == WhoCanSeeMyPhoneNumberState.NOBODY,
|
||||||
onClick = { viewModel.onNobodyCanSeeMyPhoneNumberSelected() }
|
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")
|
@SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
static final Map<String, Object> FORCED_VALUES = new HashMap<String, Object>() {{
|
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_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/dsl_settings_gutter"
|
android:layout_marginEnd="@dimen/dsl_settings_gutter"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:text="@string/save"
|
android:text="@string/RegistrationActivity_next"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Ładowanie…
Reference in New Issue