Add some description to the proxy settings screen.
This commit is contained in:
parent
26d8df5ea9
commit
94b631ccfe
3 changed files with 18 additions and 0 deletions
|
@ -23,9 +23,11 @@ import org.thoughtcrime.securesms.R;
|
|||
import org.thoughtcrime.securesms.contactshare.SimpleTextWatcher;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.net.PipeConnectivityListener;
|
||||
import org.thoughtcrime.securesms.util.CommunicationActions;
|
||||
import org.thoughtcrime.securesms.util.SignalProxyUtil;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
import org.thoughtcrime.securesms.util.ViewUtil;
|
||||
import org.thoughtcrime.securesms.util.views.LearnMoreTextView;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
import org.whispersystems.signalservice.internal.configuration.SignalProxy;
|
||||
|
||||
|
@ -73,6 +75,10 @@ public class EditProxyFragment extends Fragment {
|
|||
shareButton.setOnClickListener(v -> onShareClicked());
|
||||
proxySwitch.setOnCheckedChangeListener((buttonView, isChecked) -> viewModel.onToggleProxy(isChecked));
|
||||
|
||||
LearnMoreTextView description = view.findViewById(R.id.edit_proxy_switch_title_description);
|
||||
description.setLearnMoreVisible(true);
|
||||
description.setOnLinkClickListener(v -> CommunicationActions.openBrowserLink(requireContext(), "https://support.signal.org/hc/articles/360056052052"));
|
||||
|
||||
requireActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,17 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/edit_proxy_switch"/>
|
||||
|
||||
<org.thoughtcrime.securesms.util.views.LearnMoreTextView
|
||||
android:id="@+id/edit_proxy_switch_title_description"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/preferences_only_use_a_proxy_if"
|
||||
style="@style/Signal.Text.Preview"
|
||||
android:textColor="@color/signal_text_secondary"
|
||||
app:layout_constraintTop_toBottomOf="@id/edit_proxy_switch_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/edit_proxy_switch"/>
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/edit_proxy_switch"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -2316,6 +2316,7 @@
|
|||
<string name="preferences_off">Off</string>
|
||||
<string name="preferences_on">On</string>
|
||||
<string name="preferences_proxy_address">Proxy address</string>
|
||||
<string name="preferences_only_use_a_proxy_if">Only use a proxy if you\'re not able to connect to Signal on cellular or Wi-Fi.</string>
|
||||
<string name="preferences_share">Share</string>
|
||||
<string name="preferences_save">Save</string>
|
||||
<string name="preferences_connecting_to_proxy">Connecting to proxy…</string>
|
||||
|
|
Loading…
Add table
Reference in a new issue