一个布局的奇怪表现 布局android 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffffff" android:orientation="horizontal" android:paddingLeft="50px" > <LinearLayout android:id="@+id/outer" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" > <TextView android:layout_width="1dp" android:layout_height="fill_parent" android:background="#ff0000" /> <TextView android:layout_width="1dp" android:layout_height="fill_parent" android:layout_marginLeft="5dp" android:background="#00ff00" /> <TextView android:layout_width="1dp" android:layout_height="fill_parent" android:layout_marginLeft="5dp" android:background="#0000ff" /> </LinearLayout> </LinearLayout> android:layout_marginLeft="-1px",这时候应该是临界点,会三条都出来的android:layout_marginLeft="-2px",应该出两条android:layout_marginLeft="-3px",应该出一条 那marginLeft=0算什么0应该才是临界 间距太少了,你能不能改view,<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffffff" android:orientation="horizontal" android:paddingLeft="50px" > <LinearLayout android:id="@+id/outer" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="-2px" > <View android:layout_width="1px" android:layout_height="match_parent" android:background="#ff0000" android:layout_marginLeft="1dp"/> <View android:layout_width="1px" android:layout_height="match_parent" android:background="#00ff00" android:layout_marginLeft="0dp" /> <View android:layout_width="1px" android:layout_height="match_parent" android:background="#0000ff" android:layout_marginLeft="0dp"/> </LinearLayout> </LinearLayout> 我试了一下,在开发工具里看你的布局,的确是存在这个诡异的现象。但是真机跑起来后android:layout_marginLeft="-1px"也是只出现两条的,必须android:layout_marginLeft="0px",才出三条。应该是ADT让用户更容易看清楚吧 楼主的意思是觉得android:layout_marginLeft="-1px"这样仍然能出现三条很奇怪,按理说应该被盖住1个像素 https://code.google.com/p/android/issues/detail?id=60735 楼主的意思是觉得android:layout_marginLeft="-1px"这样仍然能出现三条很奇怪,按理说应该被盖住1个像素(⊙o⊙)哦,这样啊,,, 在oncreate()方法中handler的post先执行再显示界面?why 如何 让 Spinner 获得焦点?请大神们指导!!!!谢谢。。。 虚拟化 关于linearLayout 的setId()方法,, AnimateDrawable动画中,如何捕捉图片的点击事件 Android 开发做游戏和做软件哪个更好? 新手,啥也不懂,求高手帮忙!谢谢! 如何做一个类似物流图标信息的列表 求助大神,安卓虚拟机数据库找不到文件 Android文件读写问题 郁闷!JSON 传日期出现“英文”月份,数字变成“科学计数法” ubuntu ecplise 真机链接不上
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
android:orientation="horizontal"
android:paddingLeft="50px" > <LinearLayout
android:id="@+id/outer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" > <TextView
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="#ff0000" /> <TextView
android:layout_width="1dp"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:background="#00ff00" /> <TextView
android:layout_width="1dp"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:background="#0000ff" />
</LinearLayout>
</LinearLayout>
android:layout_marginLeft="-2px",应该出两条
android:layout_marginLeft="-3px",应该出一条
0应该才是临界
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
android:orientation="horizontal"
android:paddingLeft="50px" >
<LinearLayout android:id="@+id/outer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="-2px" >
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#ff0000"
android:layout_marginLeft="1dp"/>
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#00ff00"
android:layout_marginLeft="0dp" />
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#0000ff"
android:layout_marginLeft="0dp"/>
</LinearLayout>
</LinearLayout>