tags:

views:

192

answers:

2

Hi I want a list view and below of that list view i want one image.when i use the below code the list view and image view are appeared only in Portrait mode but not landscape mode,Can any one gie me the suggestions for displaying that list view and image view in Landscape also.My xml code is

<?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"&gt;
    <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"&gt;
<ListView android:id="@+id/ListView01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"&gt;
</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>

Thanks in adnance

A: 

Pplease show me the screen shot for the problem you are facing. because from your XMl layout i can see that in the linear layout you have added the listwith height as fill_parent and then you have added text view and then ImageView. So might be this can cause a problem but until and unless i see the screen with the data, which you are displaying, i cant give you the exact point where to make change.

Rahul Patel
Actually i am new for android,So can you tell me how can i add screen shot to this site?
sairam
you need to upload your images to some where on the server and then you have to provide the link for that while you are posting your questions. You will have a option in the RichTextBox tool bar to add the image in your question. It will ask for the Http URL for your image. Please do that, or either just give me the link of your code so i can check it over here and will answer you what you did wrong.
Rahul Patel
A: 

under your res folder, you probably have a folder like "drawable" for your image assets. You can add folders called "drawable-port" and "drawable-land" for resource images that are different in portrait and landscape mode...just give them the same filename in their respective folders and reference that filename in the layout code. This same technique can be used on your layout folders to create entirely different layouts in portrait and landscape if simply having two versions of an image isn't sufficient.

Jessica