删除ImageView边框

时间:2010-11-16 07:07:47

标签: android imageview android-linearlayout

我有一个垂直导向的LinearLayout,其中包含LinearLayoutTextViewEditText以及儿童Button的子ImageView {1}}。

类似于:

<LinearLayout>
   <LinearLayout>
        <TextView>
        <EditText>
        <Button>
   <ImageView>

我遇到的问题是LinearLayout和ImageView之间的分离(用android:background =“@ drawable / sun”显示.png作为背景)在它们之间显示出明显的折痕。我使用与.png相同的背景颜色的LinearLayout,使它看起来像是一起流动,但折痕会破坏那个方面。

编辑:这是截图!

alt text

您是否在提交按钮下看到细线?

这是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?)

1 个答案:

答案 0 :(得分:2)

作为对没有耐心通过评论的人的参考,真正的问题是导出的图像有一条细线,OP已经纠正过了。在任何情况下,以下是可能发生这种情况的原因列表:

  • 导出的图像有一条细线 - 通常可以通过在线上绘制一个小矩形来解决。如果没有,则切片1px版本的图像并将其放在此行的顶部以覆盖它。它通常很好。
  • 导出时如果设置线条颜色 - 要解决此问题,请删除线条颜色。将其设置为与图像相同的颜色或完全删除它。