开发者

how to control the transparency of a view in a RelativeLayout in android?

I have a RelativeLayout that holds a set of views and i would like that one of the views will appear in front of all the other views? how can i do that ?

Thanks

EDIT :

OK, i will be more specific. here is the code开发者_StackOverflow社区 of my relativelayout, this is where i put all of my view.

<RelativeLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="match_parent" 
  android:background="#cfff"
  android:id="@+id/myMap">

i'm adding view to this relativelayout this way :

creating different views...... relativelayout.addView(view);

now, some of the view intersect with each other and when this happens i want to control which view will be on top of the other one. so how can i do that ? Thanks.


The view will be ordered on the Z-axis in the order that they are added. So the first view will be the further in your layout. The next view added will be on top of the first view and so on.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜