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#getCompoundPaddingTop()
The following examples show how to use
android.widget.TextView#getCompoundPaddingTop() .
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: ExpandableTextView.java From social-app-android with Apache License 2.0 | 4 votes |
private static int getRealTextViewHeight(@NonNull TextView textView) { int textHeight = textView.getLayout().getLineTop(textView.getLineCount()); int padding = textView.getCompoundPaddingTop() + textView.getCompoundPaddingBottom(); return textHeight + padding; }
Example 2
Source File: ChatSelectTouchListener.java From revolution-irc with GNU General Public License v3.0 | 4 votes |
private boolean handleSelection(float x, float y, float rawX, float rawY) { View view = mRecyclerView.findChildViewUnder(x, y); if (view == null) return mSelectionLongPressMode; long id = mRecyclerView.getChildItemId(view); int index = mRecyclerView.getChildAdapterPosition(view); TextView textView = findTextViewIn(view); if (textView == null) return mSelectionLongPressMode; textView.getLocationOnScreen(mTmpLocation); float viewX = rawX - mTmpLocation[0]; float viewY = rawY - mTmpLocation[1]; float tViewY = Math.min(Math.max(viewY, 0), textView.getHeight() - textView.getCompoundPaddingBottom()) - textView.getCompoundPaddingTop(); float tViewX = Math.min(Math.max(viewX, 0), textView.getWidth() - textView.getCompoundPaddingRight()) - textView.getCompoundPaddingLeft(); mLastTouchTextId = id; int line = textView.getLayout().getLineForVertical((int) tViewY); mLastTouchTextOffset = textView.getLayout().getOffsetForHorizontal(line, tViewX); mLastTouchInText = viewX >= textView.getCompoundPaddingLeft() && viewX <= textView.getWidth() - textView.getCompoundPaddingEnd() && viewY >= textView.getCompoundPaddingTop() && viewY <= textView.getHeight() - textView.getCompoundPaddingBottom() && tViewX <= textView.getLayout().getLineWidth(line); if (mSelectionLongPressMode) { long sel = TextSelectionHelper.getWordAt(textView.getText(), mLastTouchTextOffset, mLastTouchTextOffset + 1); int selStart = TextSelectionHelper.unpackTextRangeStart(sel); int selEnd = TextSelectionHelper.unpackTextRangeEnd(sel); int selLongPressIndex = getItemPosition(mSelectionLongPressId); if (index > selLongPressIndex || (index == selLongPressIndex && selEnd >= mSelectionLongPressStart)) { setSelection(mSelectionLongPressId, mSelectionLongPressStart, mLastTouchTextId, selEnd); } else { setSelection(mLastTouchTextId, selStart, mSelectionLongPressId, mSelectionLongPressEnd); } return true; } return false; }
Example 3
Source File: ExpandableTextView.java From social-app-android with Apache License 2.0 | 4 votes |
private static int getRealTextViewHeight(@NonNull TextView textView) { int textHeight = textView.getLayout().getLineTop(textView.getLineCount()); int padding = textView.getCompoundPaddingTop() + textView.getCompoundPaddingBottom(); return textHeight + padding; }
Example 4
Source File: ExpandableTextView.java From ExpandableTextView with Apache License 2.0 | 4 votes |
private static int getRealTextViewHeight(@NonNull TextView textView) { int textHeight = textView.getLayout().getLineTop(textView.getLineCount()); int padding = textView.getCompoundPaddingTop() + textView.getCompoundPaddingBottom(); return textHeight + padding; }
Example 5
Source File: ExpandableTextView.java From ExpandableTextView with Apache License 2.0 | 4 votes |
private static int getRealTextViewHeight(@NonNull TextView textView) { int textHeight = textView.getLayout().getLineTop(textView.getLineCount()); int padding = textView.getCompoundPaddingTop() + textView.getCompoundPaddingBottom(); return textHeight + padding; }