如何通过使用一些整数值设置Z指数 [英] How to set z index by using some integer values

查看:132
本文介绍了如何通过使用一些整数值设置Z指数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Android的工作了过去几个月。对我来说,问题是现在与Z指数值。我有一个TextView,EditText上和ImageView的布局。
 假设我有一个XML文件是这样的..

I have been working in android for past few months. The problem for me is now related to Z index value. I am having a layout with a textview,edittext and imageview. Suppose i have a xml file something like this..

 <Layout1>
    <edittext><zindex>3</zindex></edittext>
    <textview><zindex>2</zindex></textview>
    <imageview><zindex>1</zindex></imageview>
 </Layout1>

所以我的问题是,正在读通过DOM解析器这个xml文件,我想为所有这些由XML定义的值的Z索引值。现在是没有办法,我可以用它来做到这一点的任何功能或属性。
    我已经了解了使用XML编码,但是这将使它很难codeD。我想动态显示让我怎么调整布局与zIndex的值....帮助PLZ

So my question is that am reading this xml file by DOM parser and i want to set the z index value for all these by the values defined in the xml. Now is there any function or property that i can use to do it. I have learnt about coding it with xml, but that will make it hardcoded. I want a dynamic display so how do i adjust layout with the zindex values.... HELP PLZ

推荐答案

没有Z-指数Android的布局。你需要,如果你需要放置在彼此顶部元素以相反的顺序使用的FrameLayout或RelativeLayout的。

there is no Z-index in android layouts. You'll need to use FrameLayout or RelativeLayout if you need to place elements on top of each other in reverse order.

看<一个href=\"http://stackoverflow.com/questions/4182486/placing-overlappingz-index-a-view-above-another-view-in-android\">Placing/Overlapping(z-index)以上的Andr​​oid 另一个图的图

这篇关于如何通过使用一些整数值设置Z指数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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