<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:orientation="vertical" android:layout_width="match_parent"android:layout_height="match_parent"><TextView android:layout_height="wrap_content"android:layout_gravity="center" android:layout_width="wrap_content"android:text="添加模板"></TextView><Spinner android:layout_height="wrap_content" android:id="@+id/sp_template_style"android:layout_margin="5dip" android:cacheColorHint="@color/blank"android:layout_width="match_parent"></Spinner><EditText android:id="@+id/et_template_add"android:layout_width="match_parent" android:layout_height="fill_parent"android:layout_marginLeft="5dip" android:layout_marginRight="5dip"android:layout_marginTop="5dip" android:layout_marginBottom="30dip" /></LinearLayout>

xml中使用android:layout_marginBottom="30dip"这个标签,需要注意的是,别忘了添加:

android:layout_height="fill_parent" ,可以理解为只有当容器里面的内容进入margin的作用域的时候,margin标

签才会起作用。

效果图:


android中关于margin的一些注意点

更多相关文章

  1. Android官方设计常用icon以及color颜色RGB值和对应颜色效果图
  2. Android界面布局——视图/容器易混淆点总结
  3. [android]android的容器、控件
  4. Android之系统自带的文字外观设置及实际显示效果图
  5. Android android:gravity属性介绍及效果图
  6. 经典的IoC/DI容器--StructureMap
  7. C++_STL常用容器总结:对组pair中关联容器与顺序容器

随机推荐

  1. Android的raw下视频文件的读写-日记
  2. 关于安卓屏幕切换的过程
  3. Android获取外置sdcard路径
  4. win平台改代码到android 平台需要注意
  5. Android为什么会有65536的方法数量限制
  6. Android--面试题整理(五)
  7. 周末小结(五)
  8. Android的下载,编译, 运行
  9. Android中BroadcastReceiver广播使用及注
  10. (4.2.10.2)【android开源工具】Android Vol