Merge 3b249e9160d821b7c13cf5883f45c7e160e4474f into 35b70c5e9e8d791ae268bac677a3b760b1b4e8bf

This commit is contained in:
Alex Popov 2026-02-20 18:07:19 -08:00 committed by GitHub
commit 3a4b583219
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View File

@ -5,6 +5,9 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.InputType;
import android.text.method.LinkMovementMethod;
import androidx.core.text.HtmlCompat;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@ -84,8 +87,13 @@ public class PeertubeInstanceListFragment extends Fragment {
@Nullable final Bundle savedInstanceState) {
super.onViewCreated(rootView, savedInstanceState);
binding.instanceHelpTV.setText(getString(R.string.peertube_instance_url_help,
getString(R.string.peertube_instance_list_url)));
final String instanceListUrl = getString(R.string.peertube_instance_list_url);
final String helpText = getString(R.string.peertube_instance_url_help,
"<a href=\"" + instanceListUrl + "\">" + instanceListUrl + "</a>");
binding.instanceHelpTV.setText(HtmlCompat.fromHtml(helpText,
HtmlCompat.FROM_HTML_MODE_LEGACY));
binding.instanceHelpTV.setMovementMethod(LinkMovementMethod.getInstance());
binding.addInstanceButton.setOnClickListener(v -> showAddItemDialog(requireContext()));
binding.instances.setLayoutManager(new LinearLayoutManager(requireContext()));

View File

@ -11,7 +11,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:autoLink="web"
android:text="@string/peertube_instance_url_help" />
<androidx.recyclerview.widget.RecyclerView