Example usage for android.view View setLeft

List of usage examples for android.view View setLeft

Introduction

In this page you can find the example usage for android.view View setLeft.

Prototype

public final void setLeft(int left) 

Source Link

Document

Sets the left position of this view relative to its parent.

Usage

From source file:com.lovely3x.eavlibrary.EasyAdapterView.java

/**
 * ???leftright/*from   w  ww  . ja  va 2 s  .  c om*/
 *
 * @param offset ??????
 */
public void offsetChildrenLeftAndRight(int offset) {
    if (DEBUG)
        Log.i(TAG, "OffsetChildrenLeftAndRight => " + offset);
    final int count = getChildCount();

    for (int i = 0; i < count; i++) {
        final View v = getChildAt(i);
        v.setLeft(v.getLeft() + offset);
        v.setRight(v.getRight() + offset);
    }
    invalidate();
}