listview的item用relativelayout+viewpager组成,viewpager的item里面用imageview,为什么显示不了图片?
<?xmlversion="1.0"encoding="utf-8"?><LinearLayoutxmlns:android="http://schemas.androi...
<?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" >
<!-- <ListView
android:id="@+id/lv_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none">
</ListView> -->
<com.pytx.view.MyListView
android:id="@+id/lv_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none">
</com.pytx.view.MyListView>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/item_listview_main" >
<android.support.v4.view.ViewPager
android:id="@+id/vp_listview_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
> aaa
</android.support.v4.view.ViewPager>
<?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" >
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/iv"/>
</LinearLayout> 展开
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<!-- <ListView
android:id="@+id/lv_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none">
</ListView> -->
<com.pytx.view.MyListView
android:id="@+id/lv_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none">
</com.pytx.view.MyListView>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/item_listview_main" >
<android.support.v4.view.ViewPager
android:id="@+id/vp_listview_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
> aaa
</android.support.v4.view.ViewPager>
<?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" >
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/iv"/>
</LinearLayout> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询