Example usage for android.widget ImageView setLeft

List of usage examples for android.widget ImageView setLeft

Introduction

In this page you can find the example usage for android.widget ImageView 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.cachirulop.moneybox.fragment.MoneyboxFragment.java

/**
 * Drop again a movement in the moneybox making an animation.
 * //ww w . j  a va2  s .c  o  m
 * @param m
 *            Movement to be dropped.
 */
public void dropAgainMovement(Movement m) {
    ImageView v;
    CurrencyValueDef c;

    // TODO: This doesn't work!!!!!!

    c = CurrencyManager.getCurrencyDef(Math.abs(m.getAmount()));

    v = new ImageView(getActivity());
    v.setLeft(findLayout().getWidth() / 2);
    v.setTop(0);
    v.setImageDrawable(c.getDrawable());
    v.setTag(c);

    dropMoney(v, m);
}