/** * Sets the autolink mask of the text. See {@link * android.text.util.Linkify#ALL Linkify.ALL} and peers for * possible values. * * @attr ref android.R.styleable#TextView_autoLink */ public final void setAutoLinkMask (int mask){ mInputView.setAutoLinkMask(mask); }
/** * Reverts to the original text, or undoes revert. */ private final void revertNote() { if (mCursor != null) { String tmp = mText.getText().toString(); mText.setAutoLinkMask(0); if (!tmp.equals(mOriginalContent)) { // revert to original content mText.setTextKeepState(mOriginalContent); mUndoRevert = tmp; } else if (mUndoRevert != null) { // revert to original content mText.setTextKeepState(mUndoRevert); mUndoRevert = null; } int autolink = PreferenceActivity.getAutoLinkFromPreference(this); mText.setAutoLinkMask(autolink); } // mCursor.requery(); // setResult(RESULT_CANCELED); // finish(); }
private void applyTheme() { mText.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextSize); mText.setTypeface(mCurrentTypeface); mText.setTextColor(mTextColor); if (mTextUpperCaseFont) { // Turn off autolinkmask, because it is not compatible with // transformationmethod. mText.setAutoLinkMask(0); mText.setTransformationMethod( UpperCaseTransformationMethod .getInstance() ); } else { mText.setTransformationMethod(null); // Set auto-link on or off, based on the current setting. int autoLink = PreferenceActivity.getAutoLinkFromPreference(this); mText.setAutoLinkMask(autoLink); } mText.invalidate(); }
private void initUiForThingContent() { if (mShouldAutoLink) { mEtContent.setAutoLinkMask(Linkify.ALL); } else { mEtContent.setAutoLinkMask(0);
EditTextHolder(View itemView) { super(itemView); flSeparator = f(R.id.fl_check_list_separator); ivState = f(R.id.iv_check_list_state); et = f(R.id.et_check_list); ivDelete = f(R.id.iv_check_list_delete); ivExpandShrink = f(R.id.iv_check_list_expand_shrink); if (mType == EDITTEXT_EDITABLE) { if (!DeviceUtil.isMiuiButNotV5()) { DisplayUtil.setSelectionHandlersColor(et, ContextCompat.getColor( mContext, R.color.app_accent)); } setupIvListeners(); setupEtListeners(); if (!DeviceUtil.isFlyme()) { LineSpacingHelper.setTextCursorDrawable( et, appAccent, cursorWidth, normalLineCursorHeightVary, lastLineCursorHeightVary); } } else { et.setKeyListener(null); } if (mShouldAutoLink) { et.setAutoLinkMask(Linkify.ALL); } else { et.setAutoLinkMask(0); } }
mText.setAutoLinkMask(autoLink);