我想实现这样的效果,请教下应该如何做:
其中原图 是:我想到的是在layout放一个textview,在textview的背景设置为 主要图片,这样可以写文字.问题是: 我暂时没有想好怎么把 "X"这个图标放到左上角去,请教下大家有什么好版本,谢谢了!

解决方案 »

  1.   

    用Drawable XML的 layer-list 详见
    http://gundumw100.iteye.com/blog/896923
      

  2.   

    FrameLayout不可以么 里面套上相对布局
      

  3.   

    是的,谢谢了,其实就是用一个relativeLayout来布局,可是有个小细节,想问下: 就是有时候我用鼠标放置 “X” 这个图片时,放不到我想要地方,总是会出现一点的偏差,这点我怎么纠正,(比如说我想放到左上角,它总是要么向上偏一点,要么向下偏一点)这个我怎么做,谢谢了!
      

  4.   

    谢谢各位了,我用relativelayout和framelayout两个都做了实验,发现 两个都可以.用relativelayout是 手动放置上去的.用framelayout则可以 在xml中用文字描述.xml如下:
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >    <ImageView
            android:id="@+id/imageView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/main_channel_config"
            android:layout_marginLeft="10dp"
            android:layout_marginTop="10dp" />    <ImageView
            android:id="@+id/imageView2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/main_delete" 
            android:layout_gravity="left|top"/>
     
    </FrameLayout>呵呵,谢谢了,结贴!