Android:在Expandablelist视图中显示图像

Android:在Expandablelist视图中显示图像,android,android-layout,android-arrayadapter,expandablelistview,Android,Android Layout,Android Arrayadapter,Expandablelistview,我试图在可展开列表视图中显示高分辨率图像。虽然我能够显示图像,但它并没有覆盖整个屏幕的宽度。我尝试了很多match_parent和wrap_内容的组合,但仍然没有成功。我正在使用毕加索库从url加载图像,并将其显示在可扩展列表视图中 活动\u main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android

我试图在可展开列表视图中显示高分辨率图像。虽然我能够显示图像,但它并没有覆盖整个屏幕的宽度。我尝试了很多match_parent和wrap_内容的组合,但仍然没有成功。我正在使用毕加索库从url加载图像,并将其显示在可扩展列表视图中

活动\u main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="deev.com.company.albumsdetails.MainActivity">
<TabHost 
android:id="@+id/tabsForDetailsandAlbums"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/albumsTab"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/metallicSilver"
android:orientation="vertical">
<ExpandableListView
android:id="@+id/albumsList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:indicatorLeft="android:attr/expandableListPreferredItemIndicatorLeft"
android:divider="@color/blackBottom"
android:dividerHeight="2dp">
</ExpandableListView>
</LinearLayout>
<LinearLayout
android:id="@+id/postsTab"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/metallicSilver"
android:orientation="vertical">

<ListView
android:id="@+id/tab2List"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@color/blackBottom"
android:dividerHeight="2px"
/>
</LinearLayout>

</FrameLayout>


</LinearLayout>
</TabHost>

</LinearLayout>
<?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"
android:paddingLeft="8dp">

<TextView
android:id="@+id/albumHeader"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="20dp"
android:paddingLeft="?android:attr/expandableListPreferredItemIndicatorLeft"
/>

</LinearLayout>
<?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="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/albumContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="5dp"/>

<ImageView
android:id="@+id/albumContent2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:paddingTop="5dp" />

</LinearLayout>

相册头.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="deev.com.company.albumsdetails.MainActivity">
<TabHost 
android:id="@+id/tabsForDetailsandAlbums"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/albumsTab"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/metallicSilver"
android:orientation="vertical">
<ExpandableListView
android:id="@+id/albumsList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:indicatorLeft="android:attr/expandableListPreferredItemIndicatorLeft"
android:divider="@color/blackBottom"
android:dividerHeight="2dp">
</ExpandableListView>
</LinearLayout>
<LinearLayout
android:id="@+id/postsTab"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/metallicSilver"
android:orientation="vertical">

<ListView
android:id="@+id/tab2List"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@color/blackBottom"
android:dividerHeight="2px"
/>
</LinearLayout>

</FrameLayout>


</LinearLayout>
</TabHost>

</LinearLayout>
<?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"
android:paddingLeft="8dp">

<TextView
android:id="@+id/albumHeader"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="20dp"
android:paddingLeft="?android:attr/expandableListPreferredItemIndicatorLeft"
/>

</LinearLayout>
<?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="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/albumContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="5dp"/>

<ImageView
android:id="@+id/albumContent2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:paddingTop="5dp" />

</LinearLayout>

相册列表.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="deev.com.company.albumsdetails.MainActivity">
<TabHost 
android:id="@+id/tabsForDetailsandAlbums"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/albumsTab"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/metallicSilver"
android:orientation="vertical">
<ExpandableListView
android:id="@+id/albumsList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:indicatorLeft="android:attr/expandableListPreferredItemIndicatorLeft"
android:divider="@color/blackBottom"
android:dividerHeight="2dp">
</ExpandableListView>
</LinearLayout>
<LinearLayout
android:id="@+id/postsTab"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/metallicSilver"
android:orientation="vertical">

<ListView
android:id="@+id/tab2List"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@color/blackBottom"
android:dividerHeight="2px"
/>
</LinearLayout>

</FrameLayout>


</LinearLayout>
</TabHost>

</LinearLayout>
<?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"
android:paddingLeft="8dp">

<TextView
android:id="@+id/albumHeader"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="20dp"
android:paddingLeft="?android:attr/expandableListPreferredItemIndicatorLeft"
/>

</LinearLayout>
<?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="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/albumContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="5dp"/>

<ImageView
android:id="@+id/albumContent2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:paddingTop="5dp" />

</LinearLayout>