简体   繁体   中英

How to move a View in my LinearLayout?

I have a linear layout and small view (50px - 50px), all I want to do is to move this view in to the parent (linear layout in my case). It doesn't have to be linear layout but if possible I want my wrapper to be linear layout. 在此处输入图片说明

What is the right way to move a drawable in the parent ? my small green view is an image (R.drawable.myimage) and I want to be able to easily move this image in the parent, the movement should me smooth

The easiest solution is the built-in TranslateAnimation .

If you're moving in straight lines, it works fine.

You may need to be more specific about your needs: when will it animate? What types of paths will it follow?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM