在Android的意见RelativeLayout的界定Z顺序 [英] Defining Z order of views of RelativeLayout in Android

查看:119
本文介绍了在Android的意见RelativeLayout的界定Z顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想定义的Andr​​oid的RelativeLayout的意见Z序。

I would like to define the z order of the views of a RelativeLayout in Android.

我知道这样做的一个方法是调用 bringToFront

I know one way of doing this is calling bringToFront.

有这样做的更好的办法?这将是巨大的,如果我可以定义在布局XML的Z顺序。

Is there are better way of doing this? It would be great if I could define the z order in the layout xml.

推荐答案

最简单的方法就是要注意其中的意见将被添加到您的XML文件中的顺序。下部向下文件中意味着更高的在Z轴

The easiest way is simply to pay attention to the order in which the Views are added to your XML file. Lower down in the file means higher up in the Z-axis.

编辑: 这一点已记录这里和的此处对Android开发者网站。 (感谢@flightplanner)

This is documented here and here on the Android developer site. (Thanks @flightplanner)

这篇关于在Android的意见RelativeLayout的界定Z顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆