Available Methods
- Alignment ( )
- getLineForVertical ( )
- getOffsetForHorizontal ( )
- getLineEnd ( )
- getLineCount ( )
- getLineStart ( )
- getLineForOffset ( )
- getDesiredWidth ( )
- getLineTop ( )
- getPrimaryHorizontal ( )
- draw ( )
- getSpacingAdd ( )
- getSpacingMultiplier ( )
- getLineDescent ( )
- getLineBaseline ( )
- getLineWidth ( )
- getLineAscent ( )
- getHeight ( )
- getLineBottom ( )
- getTopPadding ( )
- DIR_LEFT_TO_RIGHT
- getParagraphDirection ( )
- getLineMax ( )
Related Classes
- android.content.Context
- android.view.View
- android.util.Log
- android.widget.TextView
- android.view.ViewGroup
- java.util.Locale
- android.os.Build
- android.graphics.Color
- android.graphics.Canvas
- android.graphics.Bitmap
- android.text.TextUtils
- android.graphics.Paint
- android.view.MotionEvent
- android.support.annotation.Nullable
- android.support.annotation.NonNull
- android.annotation.TargetApi
- android.graphics.Rect
- android.annotation.SuppressLint
- android.view.Gravity
- android.util.TypedValue
- android.util.DisplayMetrics
- android.graphics.RectF
- android.graphics.Typeface
- android.text.Editable
- android.graphics.PorterDuff
Java Code Examples for android.text.Layout#getTopPadding()
The following examples show how to use
android.text.Layout#getTopPadding() .
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: LayoutUtils.java From Markwon with Apache License 2.0 | 5 votes |
public static int getLineTopWithoutPadding(@NonNull Layout layout, int line) { final int top = layout.getLineTop(line); if (line == 0) { return top - layout.getTopPadding(); } return top; }
Example 2
Source File: CodeTextView.java From Markwon with Apache License 2.0 | 5 votes |
private static float getLineTop(@NonNull Layout layout, int line, float padding) { float value = layout.getLineTop(line) - padding; if (line == 0) { value -= layout.getTopPadding(); } return value; }