[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Implement Android-native Connection Assist UI



Title: GitLab

Dan Ballard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android

Commits:

  • 1b8ed990
    by clairehurst at 2024-04-17T16:37:37+00:00
    fixup! Implement Android-native Connection Assist UI
    

2 changed files:

Changes:

  • fenix/app/src/main/java/org/mozilla/fenix/tor/TorConnectionAssistFragment.kt
    ... ... @@ -102,7 +102,6 @@ class TorConnectionAssistFragment : Fragment() {
    102 102
             binding.torConnectImage.visibility = View.GONE
    
    103 103
             binding.titleLargeTextView.visibility = View.GONE
    
    104 104
             binding.titleDescription.visibility = View.GONE
    
    105
    -        binding.quickStartDescription.visibility = View.GONE
    
    106 105
             binding.quickstartSwitch.visibility = View.GONE
    
    107 106
             binding.torBootstrapButton1.visibility = View.GONE
    
    108 107
             binding.torBootstrapButton2.visibility = View.GONE
    
    ... ... @@ -128,7 +127,6 @@ class TorConnectionAssistFragment : Fragment() {
    128 127
             binding.titleDescription.visibility = View.VISIBLE
    
    129 128
             binding.titleDescription.text =
    
    130 129
                 getString(R.string.preferences_tor_network_settings_explanation)
    
    131
    -        binding.quickStartDescription.visibility = View.VISIBLE
    
    132 130
             binding.quickstartSwitch.visibility = View.VISIBLE
    
    133 131
             binding.quickstartSwitch.isChecked = viewModel.quickstartToggle().value == true
    
    134 132
     
    
    ... ... @@ -172,7 +170,6 @@ class TorConnectionAssistFragment : Fragment() {
    172 170
             binding.quickstartSwitch.visibility = View.VISIBLE
    
    173 171
             binding.quickstartSwitch.isChecked = viewModel.quickstartToggle().value == true
    
    174 172
             binding.quickstartSwitch.jumpDrawablesToCurrentState()
    
    175
    -        binding.quickStartDescription.visibility = View.VISIBLE
    
    176 173
             binding.torBootstrapButton1.visibility = View.INVISIBLE
    
    177 174
             binding.torBootstrapButton2.visibility = View.VISIBLE
    
    178 175
             binding.torBootstrapButton2.text = getString(R.string.btn_cancel)
    
    ... ... @@ -221,7 +218,6 @@ class TorConnectionAssistFragment : Fragment() {
    221 218
             )
    
    222 219
             handleDescriptionWithClickable(internetErrorDescription, learnMore)
    
    223 220
     
    
    224
    -        binding.quickStartDescription.visibility = View.GONE
    
    225 221
             binding.quickstartSwitch.visibility = View.GONE
    
    226 222
     
    
    227 223
             binding.torBootstrapButton1.visibility = View.VISIBLE
    
    ... ... @@ -249,7 +245,6 @@ class TorConnectionAssistFragment : Fragment() {
    249 245
                 getString(R.string.connection_assist_trying_again_waiting_title)
    
    250 246
     
    
    251 247
             binding.quickstartSwitch.visibility = View.GONE
    
    252
    -        binding.quickStartDescription.visibility = View.GONE
    
    253 248
             binding.torBootstrapButton1.visibility = View.INVISIBLE
    
    254 249
             binding.torBootstrapButton2.visibility = View.VISIBLE
    
    255 250
             binding.torBootstrapButton2.text = getString(R.string.btn_cancel)
    
    ... ... @@ -282,7 +277,6 @@ class TorConnectionAssistFragment : Fragment() {
    282 277
             )
    
    283 278
             handleDescriptionWithClickable(tryABridge, learnMore)
    
    284 279
     
    
    285
    -        binding.quickStartDescription.visibility = View.GONE
    
    286 280
             binding.quickstartSwitch.visibility = View.GONE
    
    287 281
             binding.unblockTheInternetInCountryDescription.visibility = View.VISIBLE
    
    288 282
             binding.countryDropDown.visibility = View.VISIBLE
    

  • fenix/app/src/main/res/layout/fragment_tor_connection_assist.xml
    ... ... @@ -70,85 +70,52 @@
    70 70
             android:visibility="visible"
    
    71 71
             app:layout_constraintBottom_toBottomOf="parent"
    
    72 72
             app:layout_constraintStart_toStartOf="parent"
    
    73
    -        app:layout_constraintTop_toBottomOf="@+id/tor_bootstrap_progress_bar"
    
    74
    -        app:layout_constraintVertical_bias="0.075"
    
    73
    +        app:layout_constraintTop_toBottomOf="@+id/back_button"
    
    74
    +        app:layout_constraintVertical_bias="0.05"
    
    75 75
             app:srcCompat="@drawable/connect" />
    
    76 76
     
    
    77 77
         <TextView
    
    78 78
             android:id="@+id/title_large_text_view"
    
    79 79
             android:layout_width="match_parent"
    
    80 80
             android:layout_height="wrap_content"
    
    81
    -        android:layout_marginStart="24dp"
    
    82
    -        android:layout_marginEnd="24dp"
    
    81
    +        android:layout_marginTop="24dp"
    
    82
    +        android:paddingHorizontal="24dp"
    
    83 83
             android:text="@string/connection_assist_tor_connect_title"
    
    84 84
             android:textColor="#FBFBFE"
    
    85 85
             android:textSize="22sp"
    
    86
    -        app:layout_constraintBottom_toBottomOf="parent"
    
    87
    -        app:layout_constraintEnd_toEndOf="parent"
    
    88
    -        app:layout_constraintStart_toStartOf="parent"
    
    89
    -        app:layout_constraintTop_toBottomOf="@id/tor_connect_image"
    
    90
    -        app:layout_constraintVertical_bias="0.03" />
    
    86
    +        app:layout_constraintTop_toBottomOf="@id/tor_connect_image" />
    
    91 87
     
    
    92 88
         <TextView
    
    93 89
             android:id="@+id/title_description"
    
    94 90
             android:layout_width="match_parent"
    
    95 91
             android:layout_height="wrap_content"
    
    96
    -        android:layout_marginStart="24dp"
    
    97
    -        android:layout_marginEnd="24dp"
    
    98 92
             android:lineSpacingExtra="6dp"
    
    93
    +        android:paddingHorizontal="24dp"
    
    94
    +        android:paddingVertical="16dp"
    
    99 95
             android:text="@string/preferences_tor_network_settings_explanation"
    
    100 96
             android:textColor="#FBFBFE"
    
    101 97
             android:textSize="14sp"
    
    102
    -        app:layout_constraintBottom_toBottomOf="parent"
    
    103
    -        app:layout_constraintEnd_toEndOf="parent"
    
    104
    -        app:layout_constraintHorizontal_bias="0.0"
    
    105
    -        app:layout_constraintStart_toStartOf="parent"
    
    106
    -        app:layout_constraintTop_toBottomOf="@id/title_large_text_view"
    
    107
    -        app:layout_constraintVertical_bias="0.03" />
    
    108
    -
    
    109
    -
    
    110
    -    <TextView
    
    111
    -        android:id="@+id/quick_start_description"
    
    112
    -        android:layout_width="230dp"
    
    113
    -        android:layout_height="wrap_content"
    
    114
    -        android:layout_marginStart="24dp"
    
    115
    -        android:text="@string/connection_assist_always_connect_automatically_toggle_description"
    
    116
    -        android:textColor="#FBFBFE"
    
    117
    -        android:textSize="14sp"
    
    118
    -        app:layout_constraintBottom_toBottomOf="parent"
    
    119
    -        app:layout_constraintStart_toStartOf="parent"
    
    120
    -        app:layout_constraintTop_toBottomOf="@+id/title_description"
    
    121
    -        app:layout_constraintVertical_bias=".03" />
    
    98
    +        app:layout_constraintTop_toBottomOf="@id/title_large_text_view" />
    
    122 99
     
    
    123 100
         <androidx.appcompat.widget.SwitchCompat
    
    124 101
             android:id="@+id/quickstart_switch"
    
    125
    -        android:layout_width="wrap_content"
    
    102
    +        android:layout_width="match_parent"
    
    126 103
             android:layout_height="wrap_content"
    
    127
    -        android:layout_marginStart="100dp"
    
    128
    -        android:layout_marginEnd="24dp"
    
    129
    -        android:layout_marginBottom="24dp"
    
    130
    -        android:gravity="center"
    
    131
    -        app:layout_constraintBottom_toBottomOf="parent"
    
    132
    -        app:layout_constraintEnd_toEndOf="parent"
    
    133
    -        app:layout_constraintHorizontal_bias="0"
    
    134
    -        app:layout_constraintStart_toEndOf="@+id/quick_start_description"
    
    135
    -        app:layout_constraintTop_toBottomOf="@id/title_description"
    
    136
    -        app:layout_constraintVertical_bias=".023"
    
    137
    -        app:layout_goneMarginEnd="6dp"
    
    138
    -        app:layout_goneMarginTop="9dp" />
    
    104
    +        android:paddingHorizontal="24dp"
    
    105
    +        android:paddingVertical="8dp"
    
    106
    +        android:text="@string/connection_assist_always_connect_automatically_toggle_description"
    
    107
    +        android:textColor="#FBFBFE"
    
    108
    +        app:layout_constraintTop_toBottomOf="@id/title_description" />
    
    139 109
     
    
    140 110
         <TextView
    
    141 111
             android:id="@+id/unblock_the_internet_in_country_description"
    
    142 112
             android:layout_width="match_parent"
    
    143 113
             android:layout_height="wrap_content"
    
    144
    -        android:layout_marginStart="24dp"
    
    114
    +        android:paddingHorizontal="24dp"
    
    145 115
             android:layout_marginTop="24dp"
    
    146
    -        android:layout_marginEnd="24dp"
    
    147 116
             android:text="@string/connection_assist_unblock_the_internet_in_country_or_region"
    
    148 117
             android:textColor="#FBFBFE"
    
    149
    -        android:visibility="invisible"
    
    150
    -        app:layout_constraintEnd_toEndOf="parent"
    
    151
    -        app:layout_constraintStart_toStartOf="parent"
    
    118
    +        android:visibility="gone"
    
    152 119
             app:layout_constraintTop_toBottomOf="@id/title_description" />
    
    153 120
     
    
    154 121
         <androidx.appcompat.widget.AppCompatSpinner
    
    ... ... @@ -161,7 +128,7 @@
    161 128
             android:layout_marginEnd="24dp"
    
    162 129
             android:textColor="#FBFBFE"
    
    163 130
             android:tooltipText="@string/connection_assist_share_my_location_country_or_region"
    
    164
    -        android:visibility="invisible"
    
    131
    +        android:visibility="gone"
    
    165 132
             app:layout_constraintEnd_toEndOf="parent"
    
    166 133
             app:layout_constraintStart_toStartOf="parent"
    
    167 134
             app:layout_constraintTop_toBottomOf="@id/unblock_the_internet_in_country_description" />
    
    ... ... @@ -170,13 +137,14 @@
    170 137
             android:id="@+id/wordmarkLogo"
    
    171 138
             android:layout_width="160dp"
    
    172 139
             android:layout_height="160dp"
    
    140
    +        android:contentDescription=""
    
    173 141
             android:src="">"@mipmap/ic_launcher_round"
    
    174 142
     
    
    143
    +        android:visibility="gone"
    
    175 144
             app:layout_constraintBottom_toBottomOf="parent"
    
    176 145
             app:layout_constraintEnd_toEndOf="parent"
    
    177 146
             app:layout_constraintStart_toStartOf="parent"
    
    178
    -        app:layout_constraintTop_toTopOf="parent"
    
    179
    -        android:contentDescription="" />
    
    147
    +        app:layout_constraintTop_toTopOf="parent" />
    
    180 148
     
    
    181 149
         <Button
    
    182 150
             android:id="@+id/tor_bootstrap_button_1"
    
    ... ... @@ -195,9 +163,7 @@
    195 163
             android:textStyle="bold"
    
    196 164
             app:layout_constraintBottom_toTopOf="@id/tor_bootstrap_button_2"
    
    197 165
             app:layout_constraintEnd_toEndOf="parent"
    
    198
    -        app:layout_constraintStart_toStartOf="parent"
    
    199
    -        app:layout_constraintTop_toBottomOf="@+id/quickstart_switch"
    
    200
    -        app:layout_constraintVertical_bias="1" />
    
    166
    +        app:layout_constraintStart_toStartOf="parent" />
    
    201 167
     
    
    202 168
         <Button
    
    203 169
             android:id="@+id/tor_bootstrap_button_2"
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits