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#getGravity()
The following examples show how to use
android.widget.TextView#getGravity() .
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: TextResize.java From animation-samples with Apache License 2.0 | 5 votes |
public TextResizeData(TextView textView) { this.paddingLeft = textView.getPaddingLeft(); this.paddingTop = textView.getPaddingTop(); this.paddingRight = textView.getPaddingRight(); this.paddingBottom = textView.getPaddingBottom(); this.width = textView.getWidth(); this.height = textView.getHeight(); this.gravity = textView.getGravity(); this.textColor = textView.getCurrentTextColor(); }
Example 2
Source File: TextResize.java From atlas with Apache License 2.0 | 5 votes |
public TextResizeData(TextView textView) { this.paddingLeft = textView.getPaddingLeft(); this.paddingTop = textView.getPaddingTop(); this.paddingRight = textView.getPaddingRight(); this.paddingBottom = textView.getPaddingBottom(); this.width = textView.getWidth(); this.height = textView.getHeight(); this.gravity = textView.getGravity(); this.textColor = textView.getCurrentTextColor(); }
Example 3
Source File: TextResize.java From android-instant-apps with Apache License 2.0 | 5 votes |
public TextResizeData(TextView textView) { this.paddingLeft = textView.getPaddingLeft(); this.paddingTop = textView.getPaddingTop(); this.paddingRight = textView.getPaddingRight(); this.paddingBottom = textView.getPaddingBottom(); this.width = textView.getWidth(); this.height = textView.getHeight(); this.gravity = textView.getGravity(); this.textColor = textView.getCurrentTextColor(); }
Example 4
Source File: TextSizeTransition.java From android-login with MIT License | 5 votes |
public TextResizeData(TextView textView) { this.paddingLeft = textView.getPaddingLeft(); this.paddingTop = textView.getPaddingTop(); this.paddingRight = textView.getPaddingRight(); this.paddingBottom = textView.getPaddingBottom(); this.width = textView.getWidth(); this.height = textView.getHeight(); this.gravity = textView.getGravity(); this.textColor = textView.getCurrentTextColor(); }
Example 5
Source File: ConfigRowLayout.java From carouselview with MIT License | 4 votes |
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { // super.measure(widthMeasureSpec, heightMeasureSpec); final int childCount = getChildCount(); if (childCount > 2) { throw new IllegalArgumentException("Number of childs cannot be larger than 2 for " + getClass().getSimpleName() + "."); } int topOffset = getPaddingTop(); int leftOffset = getPaddingLeft(); int rightOffset = getPaddingRight(); int bottomOffset = getPaddingBottom(); int contentWidth = getMeasuredWidth() - leftOffset - rightOffset; int contentHeight = getMeasuredHeight() - topOffset - bottomOffset; mMaxHeight = 0; for (int i = childCount - 1; i >= 0; --i) { View child = getChildAt(i); // Size childSize = measureChildSize(child, contentWidth, MeasureSpec.UNSPECIFIED); // mMaxHeight = Math.max(mMaxHeight, childSize.height); if (child.getVisibility() != View.GONE) { if (child.getClass().equals(TextView.class)) { mTextView = (TextView) child; } else { mContentView = child; } } } //== if (mContentView == null) { mContentView = mTextView; mTextView = null; } updatePendingText(); if (mTextView != null) { if (mTextView.getGravity() != Gravity.RIGHT) { mTextView.setGravity(Gravity.RIGHT); } mTextViewSize = measureChildSize(mTextView, contentWidth, MeasureSpec.UNSPECIFIED); mMaxHeight = Math.max(mMaxHeight, mTextViewSize.height); } mContentViewAvailableWidth = contentWidth - (mTextViewSize != null ? mTextViewSize.width /*+ (int) Metrics.convertDpToPixel(8, getContext())*/ : 0); if (mContentView != null) { mContentViewSize = measureChildSize(mContentView, mContentViewAvailableWidth, MeasureSpec.UNSPECIFIED); mMaxHeight = Math.max(mMaxHeight, mContentViewSize.height); } setMeasuredDimension(widthMeasureSpec, MeasureSpec.makeMeasureSpec(mMaxHeight + topOffset + bottomOffset, MeasureSpec.EXACTLY)); }