linearlayout水平靠右显示方法
来源:互联网 发布:飞行燃料 支持淘宝 编辑:程序博客网 时间:2024/05/22 06:07
参考资料:http://www.cnblogs.com/olvo/archive/2012/05/21/2511632.html
http://wenku.baidu.com/view/b1a339ebaeaad1f346933f70.html
在安卓中,只有垂直的linearlayout属性里面的内部组件靠左靠右才有效,同理,水平的linearlayout属性里面的内部组件靠上靠下才有效,否则无效由此考虑如何让水平linearlayout中同一行内组件靠左靠右显示呢,
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#acc"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|center_vertical" android:layout_marginLeft="3.0dip" android:background="@drawable/move_on1"/> </LinearLayout> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right|center_vertical" android:layout_marginRight="3.0dip" android:background="@drawable/stopa" /> </LinearLayout> </LinearLayout>
0 0
- linearlayout水平靠右显示方法
- linearlayout水平靠右显示方法
- linearlayout靠右显示
- LinearLayout布局靠右
- Winform状态栏控件中Label靠右显示的方法
- EditText光标靠右显示
- linerlayout 水平方向将控件靠左和靠右
- Android怎样在LinearLayout中设置组件靠右
- LinearLayout 实现内容显示在水平两侧
- 提升编程水平的靠谱方法
- Extjs学习 bbar、tbar靠右,居中显示
- EXT.NET GridPanel 靠右显示,字体颜色,千分位
- 让水平LinearLayout中的两个子元素分别居左和居右
- css布局小技巧之:让一个小图片水平靠右对齐,垂直居中
- 部分css实现垂直居中和靠右的方法
- 怎么样把一个靠左一个靠右的文字用简洁方法写成一列
- LinearLayout组件右对齐
- Linearlayout如何右对齐
- iOS开发系列--音频播放、录音、视频播放、拍照、视频录制
- 在linux中使用phpize安装php扩展模块
- 操作符重载之解引用与箭头操作符
- 【Android】Annotation(注解)完全解析
- Android面试和Java面试总结
- linearlayout水平靠右显示方法
- BlueDroid代码分析之回调函数的注册与调用
- 深入浅出MySQL事务处理和锁机制
- error LNK2005: __get_invalid_parameter_handler 已经在 LIBCMTD.lib(invarg.obj) 中定义
- 在公司有了地位,你再说话
- springmvc想在filter中调用service层
- 转小说
- Java 集合
- MS Visual Studio VC++: Calling Conventions - __cdecl, __stdcall, __fastcall, __thiscall, __clrcall,