Added whois info button

This commit is contained in:
M66B
2022-09-04 11:44:28 +02:00
parent 3645e4440e
commit d1dcdbfb67
2 changed files with 24 additions and 1 deletions

View File

@@ -454,9 +454,18 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
final View dview = LayoutInflater.from(context).inflate(R.layout.dialog_whois, null);
final TextView tvHost = dview.findViewById(R.id.tvHost);
final TextView tvWhois = dview.findViewById(R.id.tvWhois);
final ImageButton ibInfo = dview.findViewById(R.id.ibInfo);
tvWhois.setMovementMethod(LinkMovementMethod.getInstance());
ibInfo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Uri uri = Uri.parse("https://en.wikipedia.org/wiki/WHOIS");
Helper.view(v.getContext(), uri, true);
}
});
tvHost.setText(args.getString("host"));
tvWhois.setText(whois);