首页 > 移动平台 > 详细

安卓 将按钮放置透明布局文件下

时间:2015-05-19 10:21:33      阅读:273      评论:0      收藏:0      [点我收藏+]

在xml中,标签从上到下的排列顺序,决定了在手机屏幕上的,位于上下层的顺序

 

如:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"

      <!--灰色透明的LinearLayout-->

      <LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="#55CDCDC1">    

      </LinearLayout>

      <Button
              android:layout_width="50dp"
              android:layout_height="50dp" />

  </RelativeLayout>

如果这样写,按钮就在灰色透明的LinearLayout上面,

 

如果交换button和LinearLayout的位置,按钮就在灰色透明的LinearLayout下面

安卓 将按钮放置透明布局文件下

原文:http://www.cnblogs.com/wu-yun-jiang/p/4513737.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!