Example usage for android.widget TextView getPaddingStart

List of usage examples for android.widget TextView getPaddingStart

Introduction

In this page you can find the example usage for android.widget TextView getPaddingStart.

Prototype

public int getPaddingStart() 

Source Link

Document

Returns the start padding of this view depending on its resolved layout direction.

Usage

From source file:com.agenthun.readingroutine.utils.TextSharedElementCallback.java

@Override
public void onSharedElementStart(List<String> sharedElementNames, List<View> sharedElements,
        List<View> sharedElementSnapshots) {
    TextView targetView = getTextView(sharedElements);
    if (targetView == null) {
        Log.w(TAG, "onSharedElementStart: No shared TextView, skipping.");
        return;/* w  w w. ja  v  a2s .co m*/
    }
    mTargetViewTextSize = targetView.getTextSize();
    mTargetViewPaddingStart = targetView.getPaddingStart();
    // Setup the TextView's start values.
    targetView.setTextSize(TypedValue.COMPLEX_UNIT_PX, mInitialTextSize);
    ViewUtils.setPaddingStart(targetView, mInitialPaddingStart);
}