Android 图片下方的列表视图
我想要一个列表视图,在该列表视图的下面我想要一个图像。当我使用下面的代码时,列表视图和图像视图仅在纵向模式下显示,而不是横向模式下显示,任何人都可以给我提供在横向模式下显示该列表视图和图像视图的建议 我的xml代码是Android 图片下方的列表视图,android,android-layout,Android,Android Layout,我想要一个列表视图,在该列表视图的下面我想要一个图像。当我使用下面的代码时,列表视图和图像视图仅在纵向模式下显示,而不是横向模式下显示,任何人都可以给我提供在横向模式下显示该列表视图和图像视图的建议 我的xml代码是 <?xml version="1.0" encoding="UTF-8"?> <FrameLayout android:id="@+id/FrameLayout01" android:
<?xml version="1.0" encoding="UTF-8"?>
<FrameLayout
android:id="@+id/FrameLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.google.android.maps.MapView
android:id="@+id/mapView"
android:layout_width="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="@string/apikey"
android:layout_height="wrap_content"
/>
<RelativeLayout android:orientation="vertical"
android:layout_width="fill_parent"
android:id="@+id/linerlayouttransparent"
android:layout_height="fill_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:gravity="top"
android:paddingBottom="100sp"
>
<com.fitzengineering.teslaworldnet.presentationlayer.TransparentPanel
android:id="@+id/transparent_panel"
android:layout_width="fill_parent"
android:paddingTop="5sp"
android:paddingLeft="5sp"
android:paddingRight="5sp" android:layout_height="wrap_content" android:paddingBottom="5sp">
<LinearLayout android:id="@+id/LinearLayout01" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" xmlns:android="http://schemas.android.com/apk/res/android">
<ListView android:id="@+id/ListView01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">
</ListView>
<TextView android:id="@+id/TextView01"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:height="5sp">
</TextView>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true" android:focusable="true"
android:src="@drawable/back_normal_icon"
android:layout_gravity="center_horizontal"
android:id="@+id/backImageView"></ImageView>
</LinearLayout>
</com.fitzengineering.teslaworldnet.presentationlayer.TransparentPanel>
</LinearLayout>
</RelativeLayout>
</FrameLayout>
p请显示您所面临问题的屏幕截图。因为从XMl布局中我可以看到,在线性布局中,您添加了高度为fill_父级的列表,然后添加了文本视图,然后添加了图像视图。因此,这可能会导致问题,但除非我看到屏幕上显示的数据,否则我无法告诉您进行更改的确切位置。在您的res文件夹下,您可能有一个类似“drawable”的文件夹用于图像资产。您可以为纵向和横向模式不同的资源图像添加名为“drawable port”和“drawable land”的文件夹…只需在各自的文件夹中为它们指定相同的文件名,并在布局代码中引用该文件名即可。如果仅仅拥有两个版本的图像是不够的,那么同样的技术可以用于布局文件夹,在纵向和横向中创建完全不同的布局。事实上,我是android新手,那么,你能告诉我如何将屏幕截图添加到此网站吗?你需要将图像上载到服务器上的某个位置,然后在发布问题时,你必须提供该位置的链接。您可以在RichTextBox工具栏中选择在问题中添加图像。它将为您的图像请求Http URL。请这样做,或者只是给我你的代码链接,这样我就可以在这里检查,并会回答你做错了什么。