android 如何把图片动态加载到布局文件制定位置?
黄舟
黄舟 2017-04-17 15:57:02
0
5
903

如果我要实现一个像forest APP这个界面类似的功能。就是能动态把树木放在土地的适当位置,这个功能应该怎么做?求思路。。。谢谢
我自己尝试用一个relativeLayout作为土地界面,但是不知道怎么动态的把树木(imageview)加载到合适位置。

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(5)
黄舟

I think the effect shown by the subject is not accomplished through layout. It may be manually drawn by a custom View, and considering the mask, the tree in front will cover the rear view. If it is used as a custom View, it will still be It's quite complicated. Even if it's not a custom View, it can only be drawn through other drawing engines, such as opengl, but it can never be done through layout.

巴扎黑

You'd better draw this thing manually, otherwise you have to consider the screen size and dynamic calculation.

大家讲道理

You have to go through the layout, which is a bit troublesome, unless you use each square as a View, but I always feel that the execution efficiency...

小葫芦

Is this a game? If so, it is best to do it through CoCo2d-x or the unity framework, which can achieve this effect very easily.
It is basically impossible and inappropriate to use View to achieve this effect.

迷茫

One is to implement it by customizing a ViewGroup, in which each

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template