use of android.text.method.LinkMovementMethod in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class NotificationFooterPreference method onBindViewHolder.
@Override
public void onBindViewHolder(PreferenceViewHolder holder) {
super.onBindViewHolder(holder);
TextView title = holder.itemView.findViewById(android.R.id.title);
title.setMovementMethod(new LinkMovementMethod());
title.setClickable(false);
title.setLongClickable(false);
}
use of android.text.method.LinkMovementMethod in project Stringlate by LonamiWebs.
the class ActivityUtils method showDialogWithHtmlTextView.
public void showDialogWithHtmlTextView(@StringRes int resTitleId, String text, boolean isHtml, DialogInterface.OnDismissListener dismissedListener) {
AppCompatTextView textView = new AppCompatTextView(_context);
int padding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 16, _context.getResources().getDisplayMetrics());
textView.setMovementMethod(new LinkMovementMethod());
textView.setPadding(padding, 0, padding, 0);
textView.setText(isHtml ? new SpannableString(Html.fromHtml(text)) : text);
AlertDialog.Builder dialog = new AlertDialog.Builder(_context).setPositiveButton(android.R.string.ok, null).setOnDismissListener(dismissedListener).setTitle(resTitleId).setView(textView);
dialog.show();
}
use of android.text.method.LinkMovementMethod in project FBReaderJ by geometer.
the class BookInfoActivity method setupAnnotation.
private void setupAnnotation(Book book, PluginCollection pluginCollection) {
final TextView titleView = (TextView) findViewById(R.id.book_info_annotation_title);
final TextView bodyView = (TextView) findViewById(R.id.book_info_annotation_body);
final String annotation = BookUtil.getAnnotation(book, pluginCollection);
if (annotation == null) {
titleView.setVisibility(View.GONE);
bodyView.setVisibility(View.GONE);
} else {
titleView.setText(myResource.getResource("annotation").getValue());
bodyView.setText(HtmlUtil.getHtmlText(NetworkLibrary.Instance(Paths.systemInfo(this)), annotation));
bodyView.setMovementMethod(new LinkMovementMethod());
bodyView.setTextColor(ColorStateList.valueOf(bodyView.getTextColors().getDefaultColor()));
}
}
use of android.text.method.LinkMovementMethod in project cardslib by gabrielemariotti.
the class GuidelinesActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (isFinishing()) {
return;
}
setContentView(R.layout.carddemo_activity_guidelines);
TextView tx = (TextView) findViewById(R.id.guidelines_text);
tx.setText(Html.fromHtml(getString(R.string.guidelines_text)));
tx.setMovementMethod(new LinkMovementMethod());
overridePendingTransition(0, 0);
}
use of android.text.method.LinkMovementMethod in project memetastic by gsantner.
the class ActivityUtils method showDialogWithHtmlTextView.
public void showDialogWithHtmlTextView(@StringRes int resTitleId, String text, boolean isHtml, DialogInterface.OnDismissListener dismissedListener) {
AppCompatTextView textView = new AppCompatTextView(_context);
int padding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 16, _context.getResources().getDisplayMetrics());
textView.setMovementMethod(new LinkMovementMethod());
textView.setPadding(padding, 0, padding, 0);
textView.setText(isHtml ? new SpannableString(Html.fromHtml(text)) : text);
AlertDialog.Builder dialog = new AlertDialog.Builder(_context).setPositiveButton(android.R.string.ok, null).setOnDismissListener(dismissedListener).setTitle(resTitleId).setView(textView);
dialog.show();
}
Aggregations