ram ram -4 years ago 102
Android Question

Programmatically move an view in android

I do n't want to use margin, padding to move a object. Is there any method , that can move my object.

I'm looking for some thing line Left, Right, Top, Bottom kind of thing so I can pass values
to move the view in my layout.

Answer Source

You can use an animation - http://developer.android.com/reference/android/view/animation/TranslateAnimation.html, just set the animation time to 0. Remember to use .setFillAfter(true);

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download