是真实跑的吗 在虚拟机 或者真机上跑一下;   给ListView 上个背景颜色, 看看不是 看 xml 布局文件的图形模式 那个不准确

解决方案 »

  1.   

    主layout:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity" 
        >
        <RelativeLayout 
            android:id="@+id/video_list_box" 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/list_bg"
            android:layout_alignParentRight="true"
            >
            <ListView 
              android:id="@+id/video_list_view"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              ></ListView>
       </RelativeLayout>
    </RelativeLayout>
    item布局:<?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        >
    <TextView 
        android:id="@+id/video_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#ffffff"
        />
    </RelativeLayout>实现效果就是在屏幕右侧显示一个菜单列表,长宽跟背景图list_bg一致
      

  2.   


    你把 ListView 的宽度 设置为 200dp 把 item 数值设置成 100dp 看看能不能达到你想要的效果 , 如果达不到 , 说明是 android 内部机制问题