use of com.keylesspalace.tusky.util.CustomURLSpan in project Tusky by tuskyapp.
the class StatusDetailedViewHolder method setApplication.
private void setApplication(@Nullable Status.Application app) {
if (app != null) {
timestampInfo.append(" • ");
if (app.getWebsite() != null) {
URLSpan span = new CustomURLSpan(app.getWebsite());
SpannableStringBuilder text = new SpannableStringBuilder(app.getName());
text.setSpan(span, 0, app.getName().length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
timestampInfo.append(text);
timestampInfo.setMovementMethod(LinkMovementMethod.getInstance());
} else {
timestampInfo.append(app.getName());
}
}
}
Aggregations