Removing ImageView border
I have a vertically oriented LinearLayout
that has a child LinearLayout
that includes a TextView
, an EditText
, and a Button
, and a child ImageView
.
So something like:
<LinearLayout>
<LinearLayout>
<TextView>
<EditText>
<Button>
<ImageView>
And the problem I am experiencing is that the seperation between the LinearLayout and the ImageView (displaying a .png as a background with android:background="@drawable/sun") is displaying a visible crease in between them. I have the LinearLayout using the same background color as the .png so that it looks like they flow together, but the crease ruins that aspect.
Edit: Here's a screenshot!
Do you see the thin line under the submit button?
Here is the 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开发者_如何学C"
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>
How can I fix this?
(side note, my sun and cloud have rough edges, any quick fixes with gimp?)
As a reference for someone who does not have the patience to go through the comments, the real problem was that the exported image had a thin line which the OP had corrected. In any case, the following are the list of reasons why this could happen:
- The exported image has a thin line - This can usually be solved by drawing a small rectangle over the line. If not, then slice a 1px version of the image and put it on top of this line to cover it up. It generally works fine.
- When exporting if you set the line color - To solve this remove the line color. Either set it to the same color as the image or remove it altogether.
精彩评论