如何在两个ImageViews之间消除空间? [英] How to remove space in between two ImageViews?
本文介绍了如何在两个ImageViews之间消除空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的code以下,我如何删除返回按钮,屏幕的标志之间的空间?我的屏幕看起来像这样
和我想要像这样
请帮我
<的LinearLayout 机器人:layout_width =FILL_PARENT
机器人:layout_height =WRAP_CONTENT
机器人:背景=@绘制/边框 机器人:方向=横向> < ImageView的
机器人:ID =@ + ID / imageView1
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:背景=@空
机器人:填充=15dp
机器人:paddingLeft =3DP
机器人:SRC =@绘制/后退/> < RelativeLayout的
机器人:layout_width =0dp
机器人:layout_height =WRAP_CONTENT 机器人:layout_weight =1> < ImageView的
机器人:ID =@ + ID / test_button_image
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignParentTop =真
机器人:背景=@空
机器人:paddingBottom会=3DP 机器人:paddingTop =10dp
机器人:SRC =@绘制/ imagelogo>
< / ImageView的> <的TextView
机器人:ID =@ + ID / test_button_text2
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignTop =@ + ID / test_button_image
机器人:layout_toRightOf =@ + ID / test_button_image
机器人:paddingLeft =10dp
机器人:paddingTop =10dp
机器人:文字=圣地亚哥联合
机器人:文字颜色=#000000
机器人:TEXTSIZE =15sp>
< / TextView的> <的TextView
机器人:ID =@ + ID / test_button_text1
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignLeft =@ + ID / test_button_text2
机器人:layout_below =@ + ID / test_button_text2
机器人:paddingBottom会=10dp
机器人:paddingLeft =10dp
机器人:文字=学区
机器人:文字颜色=#000000>
< / TextView的>
< / RelativeLayout的> < ImageView的
机器人:ID =@ + ID / imageView2
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:paddingTop =15dp
机器人:paddingRight =10dp
机器人:SRC =@绘制/选项/>
< / LinearLayout中>
解决方案
1)内容设置的LinearLayout&安培;将重的童车值。
2)围绕着ImageViews的此致textViews边缘。 (最好的方法 - >保存到文件的尺寸)
块引用>This is my code below, how do i remove space between 'back' button and logo of screen? my screen looks like this
and i want to make like this
Please help me
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/border" android:orientation="horizontal" > <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@null" android:padding="15dp" android:paddingLeft="3dp" android:src="@drawable/back" /> <RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" > <ImageView android:id="@+id/test_button_image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:background="@null" android:paddingBottom="3dp" android:paddingTop="10dp" android:src="@drawable/imagelogo" > </ImageView> <TextView android:id="@+id/test_button_text2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/test_button_image" android:layout_toRightOf="@+id/test_button_image" android:paddingLeft="10dp" android:paddingTop="10dp" android:text="San Diego Unified" android:textColor="#000000" android:textSize="15sp" > </TextView> <TextView android:id="@+id/test_button_text1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/test_button_text2" android:layout_below="@+id/test_button_text2" android:paddingBottom="10dp" android:paddingLeft="10dp" android:text="School District" android:textColor="#000000" > </TextView> </RelativeLayout> <ImageView android:id="@+id/imageView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="15dp" android:paddingRight="10dp" android:src="@drawable/options" /> </LinearLayout>
解决方案1) Set Content to LinearLayout & set the weight value of childs.
2) Set the margins around Yours textViews of ImageViews. (Best way - > save it to dimensions file)
这篇关于如何在两个ImageViews之间消除空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文