Added whois info button

pull/209/head
M66B 2 years ago
parent 3645e4440e
commit d1dcdbfb67

@ -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);

@ -19,10 +19,24 @@
android:drawablePadding="6dp"
android:text="@string/title_whois"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintEnd_toStartOf="@+id/ibInfo"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/ibInfo"
android:layout_width="36dp"
android:layout_height="36dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/title_info"
android:padding="6dp"
android:scaleType="fitCenter"
android:tooltipText="@string/title_info"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/twotone_info_24"
app:tint="?attr/colorAccent" />
<TextView
android:id="@+id/tvHost"
android:layout_width="0dp"

Loading…
Cancel
Save