这是一个list中item的布局,问题是搞不清layout_marginLeft这个属性
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
android:id="@+id/tv_itemName"/>
</RelativeLayout>
这个布局的效果正常,不正常的是把layout_marginLeft换为layout_marginRight的话,item尽然是居左对齐了(也就是没效果了),愿意是想这个item居右10dip对齐
请高人指点一下
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
android:id="@+id/tv_itemName"/>
</RelativeLayout>
这个布局的效果正常,不正常的是把layout_marginLeft换为layout_marginRight的话,item尽然是居左对齐了(也就是没效果了),愿意是想这个item居右10dip对齐
请高人指点一下
解决方案 »
- 最经典的Android学习资料持续更新中
- Android的Tab选项卡中Activity跳转的问题
- Android中,通过串口监测传感器信息~求教……
- webview中的页面点击输入框页面会自动放大
- APP与网站同步更新的问题
- 请教大神,android后台服务器开发要用到什么语言?
- 求高手介绍安卓开发书记
- 关于Failed to find Build Tools revision 28.0.2
- Android 如何把自己写的xml配置文件生效?
- webview加载页面时只显示一个大括号
- 在android里,为什么每个process里又要有个Dalvik VM intance? (急)
- 如何能显示多个自定义的view类
如果要对其的话用alien相关属性
layout_marginRight为10
应该这样搞