自定义dailog注意事项
2016-01-26 20:48
465 查看
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/dailog_custom_shape" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="48dp" android:gravity="left|center" android:paddingLeft="15dp" android:text="订单取消成功" android:textColor="@color/my_addr_username_color" android:textSize="18dp" /> <View android:layout_width="match_parent" android:layout_height="1dp" android:layout_marginLeft="15dp" android:layout_marginRight="15dp" android:background="@color/title_bar_color" /> <TextView android:layout_width="match_parent" android:layout_height="70dp" android:gravity="center_vertical" android:paddingLeft="15dp" android:paddingRight="15dp" android:text="在线支付的金额, 预计3 - 10个工作日内原路退还到原支付账户!" android:textColor="@color/my_addr_username_color" android:textSize="18dp" /> <TextView android:id="@+id/textview_known_id" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginBottom="20dp" android:layout_marginTop="20dp" android:background="@drawable/tab_bg" android:gravity="center" android:padding="10dp" android:text="知道了" android:textColor="@android:color/white" android:textSize="18dp" /> </LinearLayout>
注意:最后一个TextView的android:layout_width="wrap_content", 会使dailog宽度为最后一个控件的宽度,所以让最后一个控件的android:layout_width="match_parent"
相关文章推荐
- Organize Your Train part II-POJ3007模拟
- Organize Your Train part II-POJ3007模拟
- String painter (hdu 2476)
- AI、DI、AO、DO、PI通道代表的意思
- AfxEnableControlContainer()
- RAID简介
- RAID配置
- cvpr读书笔记[3]:traincascade与AdaBoost的opencv实现框架
- 什么情况下使用large training data会非常有效
- AIDL 的理解&源码分析
- Installation Failed Invalid argument
- Windows Server 2012 磁盘管理之 简单卷、跨区卷、带区卷、镜像卷和RAID-5卷
- windows 下解决 Time_Wait 和 CLOSE_WAIT 方法
- 转换器的一些性能指标
- adb uninstall failure
- 杭电2674 N!Again
- 如何选择raid的技术种类
- 33.You want to create an ORD_DETAIL table to store details for an order placed having the following
- Detail Texture in Screen Space
- Xcode运行范例程序遇到的问题Command /bin/sh failed with exit code 1