我有一个垂直方向的LinearLayout
,有一个孩子LinearLayout
包括TextView
,一个EditText
和Button
,和一个孩子ImageView
。删除ImageView的边界
因此,像:
<LinearLayout>
<LinearLayout>
<TextView>
<EditText>
<Button>
<ImageView>
而且我遇到的问题是,的LinearLayout和ImageView的之间的分离 - (显示巴纽作为与Android背景:背景=“@绘制/太阳” )在它们之间显示可见的折痕。我有LinearLayout使用与.png相同的背景颜色,使它看起来像它们一起流动,但折痕会破坏该方面。
编辑:这是截图!
你看到提交按钮下的细线?
这里是XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/lightblue"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/welcome"
android:textSize="17sp"
android:textColor="@color/black"
/>
<EditText
android:id="@+id/entry"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_text"
android:textSize="25sp"
android:inputType="text"
/>
<Button
android:id="@+id/submitButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="25sp"
android:text="Submit"
/>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="0px"
>
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/sunclouds"
android:layout_marginBottom="20dip"/>
<TextView
android:id="@+id/marq"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dip"
android:layout_gravity="center_horizontal|bottom"
android:textColor="@color/black"
android:text="@string/provider"
android:marqueeRepeatLimit="marquee_forever"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:singleLine="true"
android:scrollHorizontally="true"
/>
</FrameLayout>
</LinearLayout>
我怎样才能解决这个问题?
(侧面说明,我的太阳和云有粗糙的边缘,任何快速修补GIMP?)
@PetrakovichJ:屏幕截图肯定有帮助。顺便说一下,您是否正确创建了PNG图像?有时候会发生这种情况,如果在将其导出为PNG文件时未删除图像的边框。 – Legend 2010-11-16 07:41:18
@Legend:该图像最初是一个jpg,我用gimp把它保存为png。我认为这不是你所指的问题,因为边界线只在图像的顶部。 – joepetrakovich 2010-11-16 08:11:34
@PetrakovichJ:我明白了..在这种情况下,如果ImageView是在LinearLayout的后台设置为png文件之后发生的,那么可能会发生这种情况。我会检查边框对于原始PNG背景图像是否可见。您是否有机会为内部LinearLayout设置背景?另外,你可以把你正在使用的确切的XML?随意放置只有相关的部分,因为这将有助于调试。至于瘸子的东西,我使用了不同的软件包,但如果有抗锯齿的选项,这可能会有所帮助。但是,它又取决于原始的JPG质量。 – Legend 2010-11-16 08:22:26