Available Methods
- setText ( )
- setTextColor ( )
- setTextSize ( )
- setVisibility ( )
- setOnClickListener ( )
- setGravity ( )
- setTypeface ( )
- setPadding ( )
- setLayoutParams ( )
- setMovementMethod ( )
- setSingleLine ( )
- setEllipsize ( )
- setBackgroundResource ( )
- setMaxLines ( )
- setBackgroundColor ( )
- setLines ( )
- setTag ( )
- getText ( )
- setCompoundDrawablesWithIntrinsicBounds ( )
- setTextAppearance ( )
- setAllCaps ( )
- setPaintFlags ( )
- setId ( )
- setCompoundDrawables ( )
- getLayout ( )
- setBackgroundDrawable ( )
- setClickable ( )
- getLayoutParams ( )
- setCompoundDrawablePadding ( )
- append ( )
- getScrollX ( )
- getTotalPaddingTop ( )
- setBackground ( )
- getTextSize ( )
- setEnabled ( )
- getScrollY ( )
- getTotalPaddingLeft ( )
- getCompoundDrawables ( )
- getPaint ( )
- measure ( )
- getContext ( )
- getMeasuredWidth ( )
- setFocusable ( )
- setSelected ( )
- setAlpha ( )
- getHeight ( )
- setMinWidth ( )
- getCurrentTextColor ( )
- getPaddingRight ( )
- getWidth ( )
- setWidth ( )
- getPaddingLeft ( )
- getTag ( )
- setShadowLayer ( )
- addTextChangedListener ( )
- setAutoLinkMask ( )
- setLinkTextColor ( )
- setHeight ( )
- getVisibility ( )
- getLeft ( )
- invalidate ( )
- setMaxWidth ( )
- setOnLongClickListener ( )
- setOnTouchListener ( )
- OnEditorActionListener ( )
- getPaddingBottom ( )
- setLineSpacing ( )
- startAnimation ( )
- setTextDirection ( )
- requestLayout ( )
- setFocusableInTouchMode ( )
- setError ( )
- setTranslationY ( )
- layout ( )
- getParent ( )
- getTotalPaddingBottom ( )
- setContentDescription ( )
- setScaleY ( )
- setIncludeFontPadding ( )
- setHighlightColor ( )
- post ( )
- setCompoundDrawablesRelativeWithIntrinsicBounds ( )
- setMinHeight ( )
- getBackground ( )
- setTextIsSelectable ( )
- setTranslationX ( )
- getLineCount ( )
- BufferType ( )
- getPaddingTop ( )
- setLinksClickable ( )
- getId ( )
- setHorizontalFadingEdgeEnabled ( )
- scrollTo ( )
- setHintTextColor ( )
- setRotation ( )
- setImportantForAccessibility ( )
- getTextColors ( )
- setHint ( )
- setScaleX ( )
- postDelayed ( )
- getLineHeight ( )
- setTransformationMethod ( )
- getResources ( )
- removeTextChangedListener ( )
- setTransitionName ( )
- setCompoundDrawablesRelative ( )
- setOnFocusChangeListener ( )
- setPaddingRelative ( )
- setTextScaleX ( )
- getCompoundPaddingTop ( )
- getMeasuredHeight ( )
- setX ( )
- setTextAlignment ( )
- VISIBLE
- setMinimumWidth ( )
- getCompoundPaddingLeft ( )
- getGravity ( )
- getTypeface ( )
- setInputType ( )
- isTextSelectable ( )
- getMaxLines ( )
- draw ( )
- setLayerType ( )
- getTranslationY ( )
- getSelectionStart ( )
- getTransformationMethod ( )
- setHorizontallyScrolling ( )
- setOnDragListener ( )
- getCompoundDrawablesRelative ( )
- getPaddingStart ( )
- isSelected ( )
- setLongClickable ( )
- addOnLayoutChangeListener ( )
- getCompoundPaddingRight ( )
- setElevation ( )
- isInEditMode ( )
- setTextKeepState ( )
- getMovementMethod ( )
- getSelectionEnd ( )
- getInputType ( )
- setMinLines ( )
Related Classes
- java.io.File
- android.os.Bundle
- android.content.Context
- android.view.View
- android.util.Log
- android.content.Intent
- android.view.ViewGroup
- android.app.Activity
- android.view.LayoutInflater
- android.os.Build
- android.widget.Toast
- android.widget.ImageView
- android.graphics.Color
- android.net.Uri
- android.widget.Button
- android.graphics.Bitmap
- android.text.TextUtils
- android.view.MotionEvent
- android.graphics.drawable.Drawable
- android.widget.LinearLayout
- android.support.annotation.Nullable
- android.widget.EditText
- android.content.SharedPreferences
- android.support.annotation.NonNull
- android.annotation.SuppressLint
Java Code Examples for android.widget.TextView#setLongClickable()
The following examples show how to use
android.widget.TextView#setLongClickable() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MessageHolder.java From zulip-android with Apache License 2.0 | 6 votes |
public MessageHolder(final View itemView) { super(itemView); gravatar = (ImageView) itemView.findViewById(R.id.gravatar); senderName = (TextView) itemView.findViewById(R.id.senderName); timestamp = (TextView) itemView.findViewById(R.id.timestamp); leftTimestamp = (TextView) itemView.findViewById(R.id.left_timestamp); edited = (TextView) itemView.findViewById(R.id.message_edit_tag); leftEdited = (TextView) itemView.findViewById(R.id.left_message_edit_tag); contentView = (TextView) itemView.findViewById(R.id.contentView); contentView.setMovementMethod(LinkMovementMethod.getInstance()); leftBar = itemView.findViewById(R.id.leftBar); messageTile = (RelativeLayout) itemView.findViewById(R.id.messageTile); contentImage = (ImageView) itemView.findViewById(R.id.load_image); starImage = (ImageView) itemView.findViewById(R.id.star_image); leftStarImage = (ImageView) itemView.findViewById(R.id.left_star_image); contentImageContainer = itemView.findViewById(R.id.load_image_container); reactionsTable = (TableLayout) itemView.findViewById(R.id.reactions_table); contentView.setOnClickListener(this); contentView.setLongClickable(true); itemView.setOnCreateContextMenuListener(this); // Add click listener to sender view View senderView = itemView.findViewById(R.id.senderTile); if (senderView != null) senderView.setOnClickListener(this); }
Example 2
Source File: InfoPreference.java From MiPushFramework with GNU General Public License v3.0 | 5 votes |
@Override public void onBindViewHolder(PreferenceViewHolder holder) { super.onBindViewHolder(holder); TextView text = holder.itemView.findViewById(android.R.id.summary); text.setMovementMethod(new LinkMovementMethod()); text.setClickable(true); text.setLongClickable(false); holder.itemView.setClickable(false); }
Example 3
Source File: UI.java From Android-Commons with Apache License 2.0 | 5 votes |
/** * Sets the given `TextView` to be read-only or read-and-write * * @param view a `TextView` or one of its subclasses * @param readOnly whether the view should be read-only or not */ public static void setReadOnly(final TextView view, final boolean readOnly) { view.setFocusable(!readOnly); view.setFocusableInTouchMode(!readOnly); view.setClickable(!readOnly); view.setLongClickable(!readOnly); view.setCursorVisible(!readOnly); }
Example 4
Source File: HtmlUtils.java From materialup with Apache License 2.0 | 3 votes |
/** * Work around some 'features' of TextView and URLSpans. i.e. vanilla URLSpans do not react to * touch so we replace them with our own {@link io.plaidapp.ui.span * .TouchableUrlSpan} * & {@link io.plaidapp.util.LinkTouchMovementMethod} to fix this. * <p> * Setting a custom MovementMethod on a TextView also alters touch handling (see * TextView#fixFocusableAndClickableSettings) so we need to correct this. * * @param textView * @param input */ public static void setTextWithNiceLinks(TextView textView, CharSequence input) { textView.setText(input); textView.setMovementMethod(LinkTouchMovementMethod.getInstance()); textView.setFocusable(false); textView.setClickable(false); textView.setLongClickable(false); }
Example 5
Source File: HtmlUtils.java From android-proguards with Apache License 2.0 | 3 votes |
/** * Work around some 'features' of TextView and URLSpans. i.e. vanilla URLSpans do not react to * touch so we replace them with our own {@link TouchableUrlSpan} * & {@link LinkTouchMovementMethod} to fix this. * <p/> * Setting a custom MovementMethod on a TextView also alters touch handling (see * TextView#fixFocusableAndClickableSettings) so we need to correct this. */ public static void setTextWithNiceLinks(TextView textView, CharSequence input) { textView.setText(input); textView.setMovementMethod(LinkTouchMovementMethod.getInstance()); textView.setFocusable(false); textView.setClickable(false); textView.setLongClickable(false); }