Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid application layout issue
    text
    copied!<p>Hi all i am new to android development .. In my application I want to display a layout as like this image:</p> <p><img src="https://i.stack.imgur.com/yD4CO.jpg" alt="enter image description here"><br> But I am getting this image instead:</p> <p><img src="https://i.stack.imgur.com/Ghpsv.jpg" alt="http://www.freeimagehosting.net/newuploads/7aqo7.jpg"> </p> <p>here is my code :- <a href="http://www.freefilehosting.net/bookingform_1" rel="nofollow noreferrer">http://www.freefilehosting.net/bookingform_1</a> </p> <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;TableLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/bg" &gt; &lt;TableRow android:id="@+id/tableRow1" android:layout_width="wrap_content" android:layout_height="wrap_content" &gt; &lt;TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/BookingFormRoomLabel" android:textColor="@android:color/white" /&gt; &lt;Spinner android:id="@+id/roomspinner" android:layout_width="wrap_content" android:layout_height="wrap_content" /&gt; &lt;/TableRow&gt; &lt;TableRow android:id="@+id/tableRow2" android:layout_width="wrap_content" android:layout_height="wrap_content" &gt; &lt;TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/BookingFormDocTypeLabel" android:textColor="@android:color/white" /&gt; &lt;Spinner android:id="@+id/DocTypeSpinner" android:layout_width="wrap_content" android:layout_height="wrap_content" /&gt; &lt;/TableRow&gt; &lt;TableRow android:id="@+id/tableRow3" android:layout_width="wrap_content" android:layout_height="wrap_content" &gt; &lt;TextView android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/BookingFormAdultsLabel" android:textColor="@android:color/white" /&gt; &lt;Spinner android:id="@+id/AdultsSpinner" android:layout_width="wrap_content" android:layout_height="wrap_content" /&gt; &lt;/TableRow&gt; &lt;TableRow android:id="@+id/tableRow4" android:layout_width="wrap_content" android:layout_height="wrap_content" &gt; &lt;TextView android:id="@+id/textView4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/BookinFormChildrensLabel" android:textColor="@android:color/white" /&gt; &lt;Spinner android:id="@+id/ChildrensSpinner" android:layout_width="wrap_content" android:layout_height="wrap_content" /&gt; &lt;/TableRow&gt; &lt;TableRow android:id="@+id/tableRow5" android:layout_width="wrap_content" android:layout_height="wrap_content" &gt; &lt;TextView android:id="@+id/textView5" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/BookingFormNightsLabel" android:textColor="@android:color/white" /&gt; &lt;Spinner android:id="@+id/NightSpinner" android:layout_width="wrap_content" android:layout_height="wrap_content" /&gt; &lt;/TableRow&gt; &lt;TableRow android:id="@+id/tableRow6" android:layout_width="wrap_content" android:layout_height="wrap_content" &gt; &lt;TabHost android:id="@android:id/tabhost" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"&gt; &lt;LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" &gt; &lt;TabWidget android:id="@android:id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" &gt; &lt;/TabWidget&gt; &lt;FrameLayout android:id="@android:id/tabcontent" android:layout_width="match_parent" android:layout_height="match_parent" &gt; &lt;LinearLayout android:id="@+id/tab1" android:layout_width="match_parent" android:layout_height="match_parent" &gt; &lt;TableRow android:id="@+id/tableRow7" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_span="2" &gt; &lt;ImageView android:id="@+id/MainImageView" android:layout_width="200dp" android:layout_height="200dp" android:layout_weight="1" android:contentDescription="@string/BookingFormMainImage" android:src="@drawable/documentsample" /&gt; &lt;Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /&gt; &lt;Button android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_vertical" android:text="Button" /&gt; &lt;/TableRow&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:id="@+id/tab2" android:layout_width="match_parent" android:layout_height="match_parent" &gt; &lt;ImageView android:id="@+id/SubImageView" android:layout_width="200dp" android:layout_height="200dp" android:contentDescription="@string/BookingFormSubImage" android:src="@drawable/documentsample" /&gt; &lt;Button android:id="@+id/BtnSubImageCapture" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:text="@string/BtnBookingFormSubImageCapture" /&gt; &lt;Button android:id="@+id/BtnSubImageBrowse" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right|center" android:text="@string/BtnBookingFormSumbImageBrowse" /&gt; &lt;Button android:id="@+id/BtnSubImageDelete" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right|center_vertical|center" android:text="@string/BtnBookingFormSubImageDelete" /&gt; &lt;/LinearLayout&gt; &lt;/FrameLayout&gt; &lt;/LinearLayout&gt; &lt;/TabHost&gt; &lt;/TableRow&gt; </code></pre> <p> </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload