如果我要实现一个像forest APP这个界面类似的功能。就是能动态把树木放在土地的适当位置,这个功能应该怎么做?求思路。。。谢谢
我自己尝试用一个relativeLayout作为土地界面,但是不知道怎么动态的把树木(imageview)加载到合适位置。
黄舟2017-04-17 15:59:02
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.
巴扎黑2017-04-17 15:59:02
You'd better draw this thing manually, otherwise you have to consider the screen size and dynamic calculation.
大家讲道理2017-04-17 15:59:02
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...
高洛峰2017-04-17 15:59:02
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.