<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/RelativeLayout02"
android:layout_width="fill_parent"
android:layout_height="fill_parent">    <ImageView 
android:id="@+id/btn_maininterface"
    android:src="@drawable/btn_maininterface"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
/> 
</RelativeLayout>

解决方案 »

  1.   


    @a511341250 
          麻烦再回复下 ,按照以下还是不行的, 反而用到 scaleType就可以的
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >
        
        <RelativeLayout android:id="@+id/RelativeLayout02"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
        <ImageView 
    android:id="@+id/btn_maininterface"
        android:src="@drawable/btn_maininterface"
        android:layout_width="match_parent"
        android:layout_height="match_parent" /> 
    </RelativeLayout>
    </LinearLayout>
      

  2.   


    @a511341250 
          麻烦再回复下 ,按照以下还是不行的, 反而用到 scaleType就可以的
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >
        
        <RelativeLayout android:id="@+id/RelativeLayout02"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
        <ImageView 
    android:id="@+id/btn_maininterface"
        android:src="@drawable/btn_maininterface"
        android:layout_width="match_parent"
        android:layout_height="match_parent" /> 
    </RelativeLayout>
    </LinearLayout>
    android:id="@+id/btn_maininterface"
        android:src="@drawable/btn_maininterface"
        android:layout_width="match_parent"
        android:layout_height="match_parent"

    match_parent结合你上面的
    <RelativeLayout android:id="@+id/RelativeLayout02"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
    实际在界面上就是fill_parent其实我不是很懂LZ在问什么
      

  3.   

    一个相对布局中,有一个imageview,完全和任何东西都不相关,那用相对布局干神马?
    难道某培训学校或者某本书上管布局xml叫androidmanifest设置?