在 Android 中控制 Z 轴的最佳方法是什么?
这里:布局层?Z轴?,它指出最好的方法是使用 FrameLayout。我,我设法使用了具有以下结构的RelativeLayout:
RelativeLayout
-- LinearLayout
-- -- View v1 (bottom)
-- -- View v2 (bottom)
-- LinearLayout
-- -- View v3 (top)
但这并不能完全回答我的问题。当我希望我的 View v1 始终位于顶部,但 View v3 始终位于 View v2 的顶部时会发生什么。
像这样:
RelativeLayout
-- LinearLayout
-- -- View v1 z=1
-- -- View v2 z=3
-- LinearLayout
-- -- View v3 z=2
(其中 1 在 2 在 3 之上)
这在 Flex 中很容易完成……可以在 Android 开发中完成吗?