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#setLayerType()
The following examples show how to use
android.widget.TextView#setLayerType() .
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: PhotoEditorSDK.java From photo-editor-android with MIT License | 6 votes |
public void addEmoji(String emojiName, Typeface emojiFont) { LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View emojiRootView = inflater.inflate(R.layout.photo_editor_sdk_text_item_list, null); TextView emojiTextView = (TextView) emojiRootView.findViewById(R.id.photo_editor_sdk_text_tv); emojiTextView.setTypeface(emojiFont); emojiTextView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); emojiTextView.setText(convertEmoji(emojiName)); MultiTouchListener multiTouchListener = new MultiTouchListener(deleteView, parentView, this.imageView, onPhotoEditorSDKListener); multiTouchListener.setOnMultiTouchListener(this); emojiRootView.setOnTouchListener(multiTouchListener); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); params.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE); parentView.addView(emojiRootView, params); addedViews.add(emojiRootView); if (onPhotoEditorSDKListener != null) onPhotoEditorSDKListener.onAddViewListener(ViewType.EMOJI, addedViews.size()); }
Example 2
Source File: GifActivity.java From RichText with MIT License | 5 votes |
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); textView = (TextView) findViewById(R.id.text); textView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); RichText.from(GIF_TEST).autoFix(false).showBorder(true).autoPlay(true).into(textView); }
Example 3
Source File: PhotoEditor.java From PhotoEditor with MIT License | 4 votes |
/** * Get root view by its type i.e image,text and emoji * * @param viewType image,text or emoji * @return rootview */ private View getLayout(final ViewType viewType) { View rootView = null; switch (viewType) { case TEXT: rootView = mLayoutInflater.inflate(R.layout.view_photo_editor_text, null); TextView txtText = rootView.findViewById(R.id.tvPhotoEditorText); if (txtText != null && mDefaultTextTypeface != null) { txtText.setGravity(Gravity.CENTER); if (mDefaultEmojiTypeface != null) { txtText.setTypeface(mDefaultTextTypeface); } } break; case IMAGE: rootView = mLayoutInflater.inflate(R.layout.view_photo_editor_image, null); break; case EMOJI: rootView = mLayoutInflater.inflate(R.layout.view_photo_editor_text, null); TextView txtTextEmoji = rootView.findViewById(R.id.tvPhotoEditorText); if (txtTextEmoji != null) { if (mDefaultEmojiTypeface != null) { txtTextEmoji.setTypeface(mDefaultEmojiTypeface); } txtTextEmoji.setGravity(Gravity.CENTER); txtTextEmoji.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } break; } if (rootView != null) { //We are setting tag as ViewType to identify what type of the view it is //when we remove the view from stack i.e onRemoveViewListener(ViewType viewType, int numberOfAddedViews); rootView.setTag(viewType); final ImageView imgClose = rootView.findViewById(R.id.imgPhotoEditorClose); final View finalRootView = rootView; if (imgClose != null) { imgClose.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { viewUndo(finalRootView, viewType); } }); } } return rootView; }