mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-28 03:46:00 +01:00
Show link type in link confirmation dialog
This commit is contained in:
@@ -168,6 +168,7 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
|
||||
// Get views
|
||||
final View dview = LayoutInflater.from(context).inflate(R.layout.dialog_open_link, null);
|
||||
scroll = dview.findViewById(R.id.scroll);
|
||||
final TextView tvCaption = dview.findViewById(R.id.tvCaption);
|
||||
final ImageButton ibInfo = dview.findViewById(R.id.ibInfo);
|
||||
final TextView tvTitle = dview.findViewById(R.id.tvTitle);
|
||||
final ImageButton ibDifferent = dview.findViewById(R.id.ibDifferent);
|
||||
@@ -529,6 +530,13 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
|
||||
|
||||
// Initialize
|
||||
|
||||
if (UriHelper.isHyperLink(uri))
|
||||
tvCaption.setCompoundDrawablesWithIntrinsicBounds(R.drawable.twotone_insert_link_45_24, 0, 0, 0);
|
||||
else if (UriHelper.isPhoneNumber(uri))
|
||||
tvCaption.setCompoundDrawablesWithIntrinsicBounds(R.drawable.twotone_call_24, 0, 0, 0);
|
||||
else if (UriHelper.isGeo(uri))
|
||||
tvCaption.setCompoundDrawablesWithIntrinsicBounds(R.drawable.twotone_language_24, 0, 0, 0);
|
||||
|
||||
tvTitle.setText(title);
|
||||
tvTitle.setVisibility(TextUtils.isEmpty(title) ? View.GONE : View.VISIBLE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user