Verified Commit cce9dea4 authored by clairehurst's avatar clairehurst 🌱 Committed by ma1
Browse files

fixup! [android] Implement Android-native Connection Assist UI

Fix color styling presented in one of the rebases between 140 and 150.
parent d8e0e34f
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -136,6 +136,10 @@ class TorConnectionAssistFragment : Fragment(), UserInteractionHandler, SystemIn
    }

    private fun setSettingsButton(screen: ConnectAssistUiState) {
        binding.settingsButtonImage.imageTintList = AppCompatResources.getColorStateList(
            requireContext(),
            R.color.settings_button_white,
        )
        binding.settingsButton.visibility = if (screen.settingsButtonVisible) View.VISIBLE else View.GONE
        binding.settingsButton.setOnClickListener {
            openSettings()
@@ -143,6 +147,10 @@ class TorConnectionAssistFragment : Fragment(), UserInteractionHandler, SystemIn
    }

    private fun setBackButton(screen: ConnectAssistUiState) {
        binding.backButtonImage.imageTintList = AppCompatResources.getColorStateList(
            requireContext(),
            R.color.settings_button_white,
        )
        binding.backButton.visibility = if (screen.backButtonVisible) View.VISIBLE else View.INVISIBLE
        binding.backButton.setOnClickListener {
            onBackPressed()
@@ -323,6 +331,10 @@ class TorConnectionAssistFragment : Fragment(), UserInteractionHandler, SystemIn
    }

    private fun setButton2(screen: ConnectAssistUiState) {
        binding.torBootstrapButton2.backgroundTintList = AppCompatResources.getColorStateList(
            requireContext(),
            R.color.configure_connection_button_white,
        )
        binding.torBootstrapButton2.visibility =
            if (screen.torBootstrapButton2Visible) View.VISIBLE else View.GONE
        if (screen.torBootstrapButton2ShouldRestartApp) {
+2 −2
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
        app:layout_constraintTop_toTopOf="parent">

        <ImageView
            android:id="@+id/settings_button_image"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:contentDescription="@string/settings"
@@ -50,6 +51,7 @@
        app:layout_constraintTop_toTopOf="parent">

        <ImageView
            android:id="@+id/back_button_image"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:contentDescription="@string/settings"
@@ -154,7 +156,6 @@
        android:layout_marginEnd="24dp"
        android:layout_marginBottom="8dp"
        android:background="@drawable/rounded_corners"
        android:backgroundTint="@color/connect_button_purple"
        android:minWidth="360dp"
        android:text="@string/tor_bootstrap_connect"
        android:textAlignment="center"
@@ -174,7 +175,6 @@
        android:layout_marginEnd="24dp"
        android:layout_marginBottom="8dp"
        android:background="@drawable/rounded_corners"
        android:backgroundTint="@color/configure_connection_button_white"
        android:minWidth="360dp"
        android:text="@string/connection_assist_configure_connection_button"
        android:textAlignment="center"
+1 −0
Original line number Diff line number Diff line
@@ -331,4 +331,5 @@
    <color name="configure_connection_button_white">#E1E0E7</color>
    <color name="warning_yellow">#FFA436</color>
    <color name="progress_background_tint">#55148C</color>
    <color name="settings_button_white">#FBFBFE</color>
</resources>