RelativeLayout 下的控件叠加
来源:互联网 发布:淘宝旺铺店招 编辑:程序博客网 时间:2024/05/22 14:58
1. 相对布局下的空间叠加
效果图如下:
2.背景色+横线布局如下
<?xml version="1.0" encoding="utf-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <!-- layout background --> <item> <shape android:shape="rectangle"> <solid android:color="@color/cutlineColor"/> </shape> </item> <!-- layout foreground --> <item android:top="1px"> <shape android:shape="rectangle"> <solid android:color="@color/Color_jobNumber" /> </shape> </item></layer-list>
2. 相对布局下,实现布局叠加
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <include layout="@layout/include_head_title" /> <LinearLayout android:id="@+id/load_lin_sum" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignEnd="@+id/et_scan_input" android:layout_alignParentBottom="true" android:layout_alignRight="@+id/et_scan_input" android:layout_gravity="center_vertical" android:background="@drawable/layout_bg_style_one" android:gravity="center" android:paddingBottom="@dimen/y10" android:paddingTop="@dimen/y10" android:visibility="gone"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/already_encapsulation" android:textColor="@color/primary" android:textSize="@dimen/FontSize_24" /> <TextView android:id="@+id/load_sum_tv" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/x22" android:layout_marginRight="@dimen/x22" android:text="0" android:textColor="@color/Color_E" android:textSize="@dimen/FontSize_38" android:textStyle="bold" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/piece" android:textColor="@color/primary" android:textSize="@dimen/FontSize_24" /> <TextView android:id="@+id/tv_pack_num" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/x22" android:layout_marginRight="@dimen/x22" android:text="0" android:textColor="@color/Color_E" android:textSize="@dimen/FontSize_38" android:textStyle="bold" android:visibility="gone" /> <TextView android:id="@+id/tv_pack_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/bundle" android:textColor="@color/primary" android:textSize="@dimen/FontSize_24" android:visibility="gone" /> </LinearLayout> <ImageView android:id="@+id/btn_pull_up" android:layout_width="@dimen/x40" android:layout_height="@dimen/x40" android:layout_alignParentBottom="true" android:layout_marginBottom="@dimen/y15" android:layout_marginLeft="@dimen/x26" android:src="@drawable/btn_pull_up" android:visibility="gone" /></RelativeLayout>
线性布局的背景是白色的,ImageView必须在布局的下面,这样子会先绘制线性布局,后绘制ImageView。实现叠加效果。
阅读全文
0 0
- RelativeLayout 下的控件叠加
- Android下实现控件的叠加显示
- RelativeLayout 如果控件之间不进行相对定位默认是叠加在一起的
- RelativeLayout实现叠加View的动画效果
- android RelativeLayout控件或view实现叠加效果
- ArcGis下的叠加分析
- RelativeLayout布局下实现控件平分空间
- 控件布局——RelativeLayout(下)
- relativeLayout中两个控件层次放置,但是能够透过上一层控件点击到下一层控件的问题
- RelativeLayout 控件的属性的释义
- RelativeLayout的子控件的布局属性
- RelativeLayout的子控件的布局属性
- android RelativeLayout属性和使用, 实现上面view叠加在下面view之上的效果
- android RelativeLayout属性和使用, 实现上面view叠加在下面view之上的效果
- android RelativeLayout属性和使用, 实现上面view叠加在下面view之上的效果2
- RelativeLayout属性和使用, 实现上面view叠加在下面view之上的效果
- 定义继承RelativeLayout的组合控件
- RelativeLayout子控件的一些属性
- VueJS第二天2--关于自定义过滤器 自定义指令。。。
- 6岁编程,17岁开发5款APP,中国高中生出席苹果盛会让库克惊讶
- 概述C/S和B/S
- 计算机软件编程英语词汇集锦
- 微信小程序服务类目及资质要求
- RelativeLayout 下的控件叠加
- 面试题27:二叉搜索树与双向链表
- 友情链接
- python __slots__
- Keras限制GPU显存使用
- 主题四 指针和数组(上)----23.C语言中的字符串
- C# WinForm控件美化扩展系列之实现点击收缩的SplitContainer控件
- Java中的单例模式
- Android APP 加固思路