title: issue in bus seat layout in android
body: <p>i want to create bus ticket booking layout in my app . i created layout but seat arrangement not came proper. below is image . i just want to seat layout proper other element is proper
  <a href="https://i.stack.imgur.com/2Dh44.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2Dh44.png" alt="in this  seat layout not proper i want to seat layout same as paytm bus ticket layout"></a></p>
  
  <p>seat_selection_screen.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" &gt;
  
      &lt;include
          android:id="@+id/header"
          layout="@layout/common_header_with_sub_title" /&gt;
  
      &lt;RelativeLayout
          android:id="@+id/busDeckSelectionLayout"
          android:layout_width="fill_parent"
          android:layout_height="45.0dip"
          android:layout_below="@+id/header" &gt;
  
          &lt;RelativeLayout
              android:id="@+id/busDeckSelectionButtons"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_centerInParent="true"
              android:background="#ffeeeeee" &gt;
  
              &lt;Button
                  android:id="@+id/lowerDeck"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentLeft="true"
                  android:background="@drawable/left_button"
                  android:text="@string/lower"
                  android:textColor="@color/black"
                  android:textSize="12.0sp" /&gt;
  
              &lt;Button
                  android:id="@+id/upperDeck"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_toRightOf="@+id/lowerDeck"
                  android:background="@drawable/right_button"
                  android:text="@string/upper"
                  android:textColor="@color/black"
                  android:textSize="12.0sp" /&gt;
          &lt;/RelativeLayout&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;View
          android:id="@+id/busDeckSelectionMargin"
          android:layout_width="fill_parent"
          android:layout_height="1.0dip"
          android:layout_below="@+id/busDeckSelectionLayout"
          android:background="#ffdddddd" /&gt;
  
      &lt;RelativeLayout
          android:id="@+id/seatSelectionHeader"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/busDeckSelectionMargin" &gt;
  
          &lt;RelativeLayout
              android:id="@+id/seatsLayout"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentLeft="true"
              android:layout_centerVertical="true"
              android:layout_marginLeft="5.0dip"
              android:layout_marginTop="5.0dip" &gt;
  
              &lt;TextView
                  android:id="@+id/seatsSelectedText"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentLeft="true"
                  android:layout_alignParentTop="true"
                  android:text="@string/seats_selected"
                  android:textColor="@color/black"
                  android:textSize="12.0sp" /&gt;
  
              &lt;TextView
                  android:id="@+id/seatsSelected"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentLeft="true"
                  android:layout_below="@+id/seatsSelectedText"
                  android:layout_marginTop="10.0dip"
                  android:textColor="@color/black"
                  android:textSize="14.0sp" /&gt;
          &lt;/RelativeLayout&gt;
  
          &lt;RelativeLayout
              android:id="@+id/fareLayout"
              android:layout_width="wrap_content"
              android:layout_height="40.0dip"
              android:layout_alignParentRight="true"
              android:layout_centerVertical="true"
              android:layout_toRightOf="@+id/seatsLayout"
              android:background="@layout/fare_seat_selection_background" &gt;
  
              &lt;TextView
                  android:id="@+id/rsText"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentLeft="true"
                  android:layout_centerVertical="true"
                  android:layout_marginBottom="10.0dip"
                  android:layout_marginLeft="5.0dip"
                  android:layout_marginTop="10.0dip"
                  android:text="@string/rupees"
                  android:textColor="@color/black"
                  android:textSize="18.0sp" /&gt;
  
              &lt;TextView
                  android:id="@+id/fare"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentRight="true"
                  android:layout_centerVertical="true"
                  android:layout_marginBottom="10.0dip"
                  android:layout_marginRight="5.0dip"
                  android:layout_marginTop="10.0dip"
                  android:textColor="@color/black"
                  android:textSize="18.0sp" /&gt;
          &lt;/RelativeLayout&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;View
          android:id="@+id/seatSelectionHeaderMargin"
          android:layout_width="fill_parent"
          android:layout_height="1.0dip"
          android:layout_below="@+id/seatSelectionHeader"
          android:background="#ffdddddd" /&gt;
  
      &lt;RelativeLayout
          android:id="@+id/seatLayoutScroll"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_above="@+id/bottomBarSeatSelection"
          android:layout_below="@+id/seatSelectionHeaderMargin"
          android:background="@color/white" &gt;
  
          &lt;RelativeLayout
              android:id="@+id/scrollableLayout"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content" &gt;
  
              &lt;RelativeLayout
                  android:id="@+id/seatLegendLayout"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginBottom="5.0dip"
                  android:layout_marginTop="5.0dip" &gt;
  
                  &lt;RelativeLayout
                      android:id="@+id/availableImageLayout"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_alignParentLeft="true" &gt;
  
                      &lt;ImageView
                          android:id="@+id/availableImage"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_alignParentLeft="true"
                          android:layout_marginLeft="10.0dip"
                          android:rotation="90.0"
                          android:src="@drawable/seat_layout_tab_nor_avl" /&gt;
  
                      &lt;TextView
                          android:id="@+id/availableText"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_centerVertical="true"
                          android:layout_marginLeft="5.0dip"
                          android:layout_toRightOf="@+id/availableImage"
                          android:text="@string/available"
                          android:textSize="12.0sp" /&gt;
                  &lt;/RelativeLayout&gt;
  
                  &lt;RelativeLayout
                      android:id="@+id/bookedImageLayout"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_toRightOf="@+id/availableImageLayout" &gt;
  
                      &lt;ImageView
                          android:id="@+id/bookedImage"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_alignParentLeft="true"
                          android:layout_centerVertical="true"
                          android:layout_marginLeft="10.0dip"
                          android:rotation="90.0"
                          android:src="@drawable/seat_layout_tab_nor_bkd" /&gt;
  
                      &lt;TextView
                          android:id="@+id/bookedText"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_centerVertical="true"
                          android:layout_marginLeft="5.0dip"
                          android:layout_toRightOf="@+id/bookedImage"
                          android:text="@string/booked"
                          android:textSize="12.0sp" /&gt;
                  &lt;/RelativeLayout&gt;
  
                  &lt;RelativeLayout
                      android:id="@+id/selectedImageLayout"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_toRightOf="@+id/bookedImageLayout" &gt;
  
                      &lt;ImageView
                          android:id="@+id/selectedImage"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_marginLeft="10.0dip"
                          android:rotation="90.0"
                          android:src="@drawable/seat_layout_tab_nor_std" /&gt;
  
                      &lt;TextView
                          android:id="@+id/selectedText"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_centerVertical="true"
                          android:layout_marginLeft="5.0dip"
                          android:layout_toRightOf="@+id/selectedImage"
                          android:text="@string/selected"
                          android:textSize="12.0sp" /&gt;
                  &lt;/RelativeLayout&gt;
  
                  &lt;RelativeLayout
                      android:id="@+id/ladiesImageLayout"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_toRightOf="@+id/selectedImageLayout"&gt;
  
                      &lt;ImageView
                          android:id="@+id/ladiesImage"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_marginLeft="10.0dip"
                          android:rotation="90.0"
                          android:src="@drawable/seat_layout_tab_nor_lad_avl" /&gt;
  
                      &lt;TextView
                          android:id="@+id/ladiesText"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_centerVertical="true"
                          android:layout_marginLeft="5.0dip"
                          android:layout_toRightOf="@+id/ladiesImage"
                          android:text="@string/ladies"
                          android:textSize="12.0sp" /&gt;
                  &lt;/RelativeLayout&gt;
              &lt;/RelativeLayout&gt;
  
              &lt;RelativeLayout
                  android:id="@+id/seatLayoutLowerMain"
                  android:layout_width="wrap_content"
                  android:layout_height="fill_parent"
                  android:layout_below="@+id/seatLegendLayout"
                  android:layout_centerHorizontal="true"
                  android:layout_marginTop="10.0dip"
                  android:background="@layout/seat_layout_border"
                  android:paddingBottom="5.0dp"
                  android:paddingRight="5.0dp" &gt;
  
                  &lt;GridView
                      android:id="@+id/gridView1"
                      android:layout_width="fill_parent"
                      android:layout_height="fill_parent"
                      android:layout_below="@+id/driver"
                      android:layout_margin="4dp"
                      android:columnWidth="100dp"
                      android:gravity="center"
                      android:numColumns="4"
                      android:stretchMode="columnWidth" &gt;
                  &lt;/GridView&gt;
  
                  &lt;RelativeLayout
                      android:id="@+id/driver"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_alignParentTop="true"
                      android:layout_alignRight="@+id/gridView1"
                      android:layout_marginRight="20.0dp"
                      android:layout_marginTop="5.0dp"
                      android:background="@drawable/steering_icon"
                      android:orientation="horizontal" &gt;
                  &lt;/RelativeLayout&gt;
              &lt;/RelativeLayout&gt;
  
              &lt;RelativeLayout
                  android:id="@+id/seatLayoutUpper"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_below="@+id/seatLegendLayout"
                  android:layout_centerHorizontal="true"
                  android:layout_marginTop="10.0dip"
                  android:background="@layout/seat_layout_border"
                  android:visibility="invisible" /&gt;
          &lt;/RelativeLayout&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;RelativeLayout
          android:id="@+id/bottomBarSeatSelection"
          android:layout_width="fill_parent"
          android:layout_height="49.0dip"
          android:layout_alignParentBottom="true"
          android:background="@color/white" &gt;
  
          &lt;Button
              android:id="@+id/doneButton"
              android:layout_width="160.0dip"
              android:layout_height="48.0dip"
              android:layout_alignParentLeft="true"
              android:layout_marginTop="1.0dip"
              android:background="@drawable/selector_red_btn"
              android:text="@string/done"
              android:textColor="@color/white"
              android:textSize="18.0sp" /&gt;
  
          &lt;Button
              android:id="@+id/cancelButton"
              android:layout_width="160.0dip"
              android:layout_height="48.0dip"
              android:layout_alignParentRight="true"
              android:layout_marginTop="1.0dip"
              android:background="@drawable/selector_black_btn"
              android:text="@string/goBack"
              android:textColor="@color/white"
              android:textSize="18.0sp" /&gt;
      &lt;/RelativeLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/0HnWV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0HnWV.png" alt="i want this type of layout for seat"></a></p>