issue in bus seat layout in android - android

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
seat_selection_screen.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<include
android:id="#+id/header"
layout="#layout/common_header_with_sub_title" />
<RelativeLayout
android:id="#+id/busDeckSelectionLayout"
android:layout_width="fill_parent"
android:layout_height="45.0dip"
android:layout_below="#+id/header" >
<RelativeLayout
android:id="#+id/busDeckSelectionButtons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="#ffeeeeee" >
<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" />
<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" />
</RelativeLayout>
</RelativeLayout>
<View
android:id="#+id/busDeckSelectionMargin"
android:layout_width="fill_parent"
android:layout_height="1.0dip"
android:layout_below="#+id/busDeckSelectionLayout"
android:background="#ffdddddd" />
<RelativeLayout
android:id="#+id/seatSelectionHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/busDeckSelectionMargin" >
<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" >
<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" />
<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" />
</RelativeLayout>
<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" >
<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" />
<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" />
</RelativeLayout>
</RelativeLayout>
<View
android:id="#+id/seatSelectionHeaderMargin"
android:layout_width="fill_parent"
android:layout_height="1.0dip"
android:layout_below="#+id/seatSelectionHeader"
android:background="#ffdddddd" />
<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" >
<RelativeLayout
android:id="#+id/scrollableLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<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" >
<RelativeLayout
android:id="#+id/availableImageLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true" >
<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" />
<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" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/bookedImageLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/availableImageLayout" >
<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" />
<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" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/selectedImageLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/bookedImageLayout" >
<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" />
<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" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/ladiesImageLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/selectedImageLayout">
<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" />
<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" />
</RelativeLayout>
</RelativeLayout>
<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" >
<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" >
</GridView>
<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" >
</RelativeLayout>
</RelativeLayout>
<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" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:id="#+id/bottomBarSeatSelection"
android:layout_width="fill_parent"
android:layout_height="49.0dip"
android:layout_alignParentBottom="true"
android:background="#color/white" >
<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" />
<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" />
</RelativeLayout>
</RelativeLayout>

Related

Listview with edittext inside scrollview is not clickable

I have a listview with edittext as row items inside scrollview.I have used on touch listener on listview so I can scroll the list inside scrollview.But unable to make a call to onItemClickListener or OnItemSelectedListener.
I have tried android:windowSoftInputMode="adjustPan".
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="#+id/rlHamburger"
android:layout_width="50dp"
android:layout_height="match_parent" >
<Button
android:id="#+id/btnHamburger"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_centerInParent="true"
android:background="#drawable/images" />
</RelativeLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toRightOf="#+id/rlHamburger" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="#+id/rlTitle"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="5dp"
android:background="#drawable/relative_background" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="10dp"
android:text="Add Quote"
android:textColor="#color/black"
android:textSize="20sp"
android:textStyle="bold" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/rlButtons"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="#id/rlTitle"
android:layout_margin="5dp"
android:orientation="horizontal" >
<Button
android:id="#+id/btnBack"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_alignParentLeft="true"
android:layout_gravity="center_vertical"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="#drawable/button"
android:gravity="center"
android:text="Back"
android:textColor="#drawable/text_color" />
<Button
android:id="#+id/btnAddPhoto"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
android:layout_margin="5dp"
android:layout_toLeftOf="#+id/btnAddNote"
android:layout_weight="1"
android:background="#drawable/button"
android:gravity="center"
android:text="Add Photo"
android:textColor="#drawable/text_color" />
<Button
android:id="#+id/btnAddNote"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
android:layout_margin="5dp"
android:layout_toLeftOf="#+id/btnSave"
android:layout_weight="1"
android:background="#drawable/button"
android:gravity="center"
android:text="Add Note"
android:textColor="#drawable/text_color" />
<Button
android:id="#+id/btnSave"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_gravity="center_vertical"
android:layout_margin="5dp"
android:background="#drawable/button"
android:gravity="center"
android:text="Save"
android:textColor="#drawable/text_color" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/rlInformation"
android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_below="#id/rlButtons"
android:layout_margin="5dp"
android:background="#drawable/relative_background"
android:orientation="horizontal"
android:padding="5dp" >
<RelativeLayout
android:id="#+id/rlInfo1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp" >
<TextView
android:id="#+id/title"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="Title" />
<EditText
android:id="#+id/tvTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/title"
android:background="#drawable/relative_background"
android:hint="Title"
android:padding="5dp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/rlInfo2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/rlInfo1"
android:layout_margin="2dp" >
<TextView
android:id="#+id/owner"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="Owner" />
<EditText
android:id="#+id/tvOwner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/owner"
android:background="#drawable/relative_background"
android:hint="Owner"
android:padding="5dp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/rlInfo3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/rlInfo2"
android:layout_margin="2dp" >
<TextView
android:id="#+id/address"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="Address" />
<EditText
android:id="#+id/tvAddress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/address"
android:background="#drawable/relative_background"
android:hint="Address"
android:padding="5dp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/rlInfo4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/rlInfo3"
android:layout_margin="2dp" >
<TextView
android:id="#+id/status"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="Status" />
<TextView
android:id="#+id/tvStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#id/status"
android:text="Status" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/rlInfo5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/rlInfo4"
android:layout_margin="2dp" >
<TextView
android:id="#+id/description"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="Description" />
<EditText
android:id="#+id/tvDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/description"
android:background="#drawable/relative_background"
android:hint="Description"
android:padding="5dp" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:id="#+id/rlList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/rlInformation"
android:layout_margin="10dp" >
<TextView
android:id="#+id/tvProductName"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Product Name" />
<TextView
android:id="#+id/tvShortDescription"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/tvProductName"
android:gravity="center"
android:text="Short Description" />
<TextView
android:id="#+id/tvQuantity"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/tvShortDescription"
android:gravity="center"
android:text="Qty" />
<TextView
android:id="#+id/tvUnits"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/tvQuantity"
android:gravity="center"
android:text="units" />
<TextView
android:id="#+id/tvPrice"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/tvUnits"
android:gravity="center"
android:text="Price" />
<TextView
android:id="#+id/tvTotal"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="center"
android:text="Total" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/rlList1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/rlList"
android:layout_margin="10dp" >
<ListView
android:id="#+id/lvItems"
android:layout_width="match_parent"
android:layout_height="300dp" >
</ListView>
<Button
android:id="#+id/btnAddItem"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_below="#id/lvItems"
android:background="#drawable/button"
android:text="Add item"
android:textColor="#drawable/text_color" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/rlList1"
android:layout_margin="20dp" >
<TextView
android:id="#+id/tvTotalEstimation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="center"
android:text="Total estimation"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="#+id/tvEstimationValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#id/tvTotalEstimation"
android:gravity="center"
android:text="$0.0"
android:textSize="20sp"
android:textStyle="bold" />
</RelativeLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
Here is the screenshot of my layout:
Please help me with the solution.Thanks.
Go to your manifest file and add these steps with activity tag of your class
android:configChanges="keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize|stateAlwaysHidden"

Parent LinearLayout not filling to ScrollView at the bottom part

Hi,
As you can see from the image above, the parent LinearLayout is not filling until the bottom of the scroll view (in blue). I chose to put the scroll view at the bottom because the LinearLayout has a ListView.
XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ImageView
android:id="#+id/finalImg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:src="#drawable/image_01_big" />
<RelativeLayout
android:id="#+id/imgFinal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" >
</RelativeLayout>
<LinearLayout
android:id="#+id/linearLayoutInfoTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/imgFinal"
android:layout_centerHorizontal="true"
android:orientation="vertical" >
<TextView
android:id="#+id/finalInfoTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="infoTitle"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayoutInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/imgFinal"
android:layout_marginTop="20dp"
android:orientation="horizontal" >
<TextView
android:id="#+id/finalInfoDesc"
android:layout_width="match_parent"
android:layout_height="84dp"
android:gravity="center"
android:text="infoDesc"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayoutInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/imgFinal"
android:layout_marginTop="20dp"
android:orientation="horizontal" >
<TextView
android:id="#+id/finalLineUpStatic"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Line Up"
android:textStyle="bold"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<ListView
android:id="#+id/finalListView"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_above="#+id/Scroll"
android:layout_below="#+id/linearLayoutInfo"
android:layout_centerHorizontal="true"
android:layout_weight=".94"
android:fadeScrollbars="false" >
</ListView>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:id="#+id/Lin_Scroll"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<RelativeLayout
android:id="#+id/Rel_Scroll"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<RelativeLayout
android:id="#+id/Rel_add_gps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="65dp" >
<RelativeLayout
android:id="#+id/RelGPS"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_toRightOf="#+id/RelAddress" >
<TextView
android:id="#+id/finalGPSStatic"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:gravity="center"
android:text="GPS"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="#+id/finalGPS"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/finalGPSStatic"
android:layout_below="#+id/finalGPSStatic"
android:gravity="center"
android:text="click"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RelAddress"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
<TextView
android:id="#+id/finalAddressStatic"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:gravity="center"
android:text="Address"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="#+id/finalAddress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/finalAddressStatic"
android:layout_below="#+id/finalAddressStatic"
android:gravity="center"
android:text="not static"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:id="#+id/Rel_ven_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/Rel_add_gps"
android:layout_alignParentLeft="true"
android:layout_marginBottom="22dp"
android:background="#color/gray"
>
<RelativeLayout
android:id="#+id/RelDate"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_toRightOf="#+id/RelVenue"
android:background="#color/blue"
>
<TextView
android:id="#+id/finalDateStatic"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:gravity="center"
android:text="Date"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="#+id/finalDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/finalDateStatic"
android:layout_below="#+id/finalDateStatic"
android:gravity="center"
android:text="not static"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/finalTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/finalDateStatic"
android:layout_below="#+id/finalDate"
android:gravity="center"
android:text="not static"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RelVenue"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
<TextView
android:id="#+id/finalVenueStatic"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:gravity="center"
android:text="not static"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="#+id/finalVenue"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/finalVenueStatic"
android:layout_below="#+id/finalVenueStatic"
android:gravity="center"
android:text="not static"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
<ProgressBar
android:id="#+id/progressBar2"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<RelativeLayout
android:id="#+id/RelButtonTop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2.45" >
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="42dp"
android:text="Button" />
<Button
android:id="#+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="54dp"
android:text="Button" />
<RelativeLayout
android:id="#+id/RelativeLayout01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_weight="2.45" >
<Button
android:id="#+id/Button01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="42dp"
android:text="Button" />
<Button
android:id="#+id/Button02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="54dp"
android:text="Button" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:id="#+id/RelativeLayout02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2.45" >
<Button
android:id="#+id/Button03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="42dp"
android:text="Button" />
<Button
android:id="#+id/Button04"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="54dp"
android:text="Button" />
</RelativeLayout>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Button 11" />
</LinearLayout>
</ScrollView>
</LinearLayout>

SlidingDrawer And ScrollView

I have a SlidingDrawer. And I want use ScrollView in my SlidingDrawer. I Try but app is not running.
I am tried ScrollView in LinearLayout but still not running app.
How can I do this.
Here İs Code:
.
.
.
.
.
.
<LinearLayout
android:id="#+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical" >
<SlidingDrawer
android:layout_width="wrap_content"
android:layout_height="330dp"
android:content="#+id/content"
android:handle="#+id/handle"
android:id="#+id/slidingDrawer"
android:layout_gravity="center_horizontal"
android:padding="10dip">
<Button
android:id="#+id/handle"
android:layout_width="200dp"
android:layout_height="33dp"
android:text="== ÇÖZÜM =="
android:textSize="10dp"/>
<!-- I Try Add LinearLayout here But still not ronning.-->
<ScrollView
android:id="#+id/content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="#ababab"
android:gravity="center|top"
android:padding="10dip">
.
.
.
.
.
.
</ScrollView>
</SlidingDrawer>
</LinearLayout>
THANKS!
This is my layout design that i had used in one of my project and it worked perfect check this :
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<com.wholesaleraja.touch_image.TouchImageZoom
android:id="#+id/singe_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:src="#drawable/raja" />
<RelativeLayout
android:id="#+id/det"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="#+id/single_item_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:padding="5dp"
android:text="Single Name"
android:textColor="#000000"
android:textSize="20sp"
android:textStyle="bold" />
<View
android:id="#+id/view"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/single_item_text"
android:background="#color/list_divider" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/view"
android:orientation="horizontal" >
<TextView
android:id="#+id/code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="Product Code : "
android:textColor="#000000"
android:textSize="17sp"
android:textStyle="bold" />
<TextView
android:id="#+id/code_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:textColor="#000000"
android:textSize="14sp" />
</LinearLayout>
<Button
android:id="#+id/price_tag"
style="#style/button_text"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="5dp"
android:layout_marginRight="5dp"
android:background="#drawable/price_button_background"
android:clickable="false"
android:padding="5dp"
android:text="Price"
android:textColor="#ffffff" />
</RelativeLayout>
<SlidingDrawer
android:id="#+id/SlidingDrawer"
android:layout_width="fill_parent"
android:layout_height="400dp"
android:layout_alignParentBottom="true"
android:content="#+id/contentLayout"
android:handle="#+id/slideButton"
android:orientation="vertical"
android:padding="0dip"
android:rotation="0" >
<ImageView
android:id="#+id/slideButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="#drawable/up" />
<ScrollView
android:id="#+id/contentLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#e5e5e5" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="7dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Lot Size : "
android:textSize="15sp" />
<TextView
android:id="#+id/lot_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1 "
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Piece(s)/Lot"
android:textSize="15sp" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="10dp" >
<TableLayout
android:id="#+id/details"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#color/list_divider"
android:orientation="vertical"
android:stretchColumns="*" >
<TableRow
android:id="#+id/row3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Lot(s) "
android:textSize="22sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Discount"
android:textSize="22sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Price/Lot"
android:textSize="22sp" />
</TableRow>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#color/list_divider" />
</TableLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="Lot Qty : "
android:textSize="18sp" />
<Button
android:id="#+id/minus"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="10dp"
android:background="#drawable/round_button"
android:text="-"
android:textSize="30sp"
android:textStyle="bold" />
<EditText
android:id="#+id/count"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#drawable/round_edittext"
android:focusable="false"
android:gravity="center"
android:inputType="number" >
</EditText>
<Button
android:id="#+id/plus"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="#drawable/round_button"
android:text="+"
android:textSize="30sp"
android:textStyle="bold" />
</LinearLayout>
<Button
android:id="#+id/addtocart"
style="#style/button_text"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:background="#drawable/cart_button_background"
android:padding="5dp"
android:text="Add to Cart"
android:textColor="#ffffff" />
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#color/list_divider" />
<TextView
android:id="#+id/description"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="7dp"
android:text="Description"
android:textSize="20sp"
android:textStyle="bold" />
<View
android:layout_width="fill_parent"
android:layout_height="1.5dp"
android:background="#color/list_divider" />
<TextView
android:id="#+id/full_desc"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:padding="5dp"
android:paddingBottom="5dp"
android:textSize="15sp" />
</LinearLayout>
</ScrollView>
</SlidingDrawer>
</RelativeLayout>
</FrameLayout>

Alignment issue when using different screen resolutions

please help me to arrange the layouts and elements which is suitable for all devices,
my current xml codes is given below.the main problem is the elements are changed when it runs on different screen resolutions`
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="2dp" >
<Button
android:id="#+id/firstimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/smallcircle"
android:gravity="center"
android:scaleType="fitXY" />
<ImageView
android:id="#+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="#drawable/workscam"/>
<TextView
android:id="#+id/texthere"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="helloooo"
android:textSize="15dp"
android:layout_below="#+id/firstimage"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp" >
<ImageView
android:id="#+id/secondimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/smallcircle" />
<ImageView
android:id="#+id/text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="#drawable/workscam"
android:textSize="15dp" />
<TextView
android:id="#+id/texthere2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="helloooo"
android:textSize="15dp"
android:layout_below="#+id/secondimage"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp" >
<ImageView
android:id="#+id/thirdimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/smallcircle" />
<ImageView
android:id="#+id/text3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="#drawable/workscam"
android:textSize="15dp" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/second_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/first_row"
android:layout_centerHorizontal="true"
android:layout_margin="15dp"
android:orientation="horizontal" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp" >
<ImageView
android:id="#+id/fourthimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/smallcircle" />
<ImageView
android:id="#+id/text4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="#drawable/workscam"
android:textSize="15dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp" >
<ImageView
android:id="#+id/fifthimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/smallcircle" />
<ImageView
android:id="#+id/text5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="#drawable/workscam"
android:textSize="15dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp" >
<ImageView
android:id="#+id/sixthimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/smallcircle" />
<ImageView
android:id="#+id/text6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="#drawable/workscam"
android:textSize="15dp" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/third_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/second_row"
android:layout_centerHorizontal="true"
android:layout_margin="15dp"
android:orientation="horizontal" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp" >
<ImageView
android:id="#+id/sevimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/smallcircle" />
<ImageView
android:id="#+id/text7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="#drawable/workscam"
android:textSize="15dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp" >
<ImageView
android:id="#+id/eighthimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/smallcircle" />
<ImageView
android:id="#+id/text8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="#drawable/workscam"
android:textSize="15dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp" >
<ImageView
android:id="#+id/ninthimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/smallcircle" />
<ImageView
android:id="#+id/text9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="#drawable/workscam"
android:textSize="15dp" />
</RelativeLayout>
</LinearLayout>
`

Scrollview issue in xml, doesn't work

I have a following code.. I want to scroll my text area and my buttons within in LinearLayout. But my bottom button which is in relativelayout i want to stay it always in bottom not scroll able.
Thanks
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="175dip"
android:background="#android:color/white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:textSize="20dip"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="35dp"
android:textSize="15dip"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="55dp"
android:textSize="15dip"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="75dp"
android:textSize="15dip"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="95dp"
android:textSize="15dip"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="115dp"
android:textSize="15dip"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="135dp"
android:textSize="15dip"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="155dp"
android:textSize="15dip"
/>
</RelativeLayout>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="XYZ"/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="XYZ"/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="XYZ"/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="XYZ"/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Contact Us"/>
</LinearLayout>
</ScrollView>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="50dip"
android:background="#android:color/black"
android:layout_alignParentBottom="true" >
<Button
android:id="#+id/buttonCheck"
android:layout_width="50sp"
android:layout_height="50sp"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:background="#drawable/round_button"
android:text="Checked" />
</RelativeLayout>
</RelativeLayout>
As you are using relative layout, first put the button at the bottom of screen, and then let scrollview occupy the the height available.
Try following code:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout
android:id="#+id/rel_btn_Check"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:layout_alignParentBottom="true"
android:background="#android:color/black" >
<Button
android:id="#+id/buttonCheck"
android:layout_width="50sp"
android:layout_height="50sp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="#drawable/round_button"
android:text="Checked" />
</RelativeLayout>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="#id/rel_btn_Check"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="175dip"
android:background="#android:color/white" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:textSize="20dip" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="35dp"
android:textSize="15dip" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="55dp"
android:textSize="15dip" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="75dp"
android:textSize="15dip" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="95dp"
android:textSize="15dip" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="115dp"
android:textSize="15dip" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="135dp"
android:textSize="15dip" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="155dp"
android:textSize="15dip" />
</RelativeLayout>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="XYZ" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="XYZ" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="XYZ" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="XYZ" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Contact Us" />
</LinearLayout>
</ScrollView>
</RelativeLayout>
</RelativeLayout>
use this mechanism
set scroll view >
android:layout_weight="1"
and put footer :
android:layout_alignParentBottom="true"
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical">
<ScrollView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1">
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="jgfhrtuioghju oioupotyuhjipouipoi typ[ipo[ip[ijup0[ip0[ujiptjuip[juip[i]]]]]]] jogi5thjuohuortthjuo90uto okithjoitthjuo thjpo ktjhporyjohj ptlhjyjohjpy plthjoyjpokjotjhojuyojuhoithjoi kgjhoithoithjuotjupojutpo[ujotpotpojuote]ihihoihoi rguigreuighreiuyghir orighoihyheiyhreiygh oighoihtgihidrfyh8irfyhuesghuyhuiehvguyh rueighuyghuiyghieryhirgeyhi gorfihoihklrjegoij5oi hi thkoihioghoirhirhuiurg] th5yj u trjuykyu yjytku yktyu k ykj k y jiyku ykj yuk yku k y 6ty 6y 6yy kuiil 6 u67 uokityy7 i78o8 "/>
</ScrollView>
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true"><Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="rgfjughtih g5yujhoihuoi"/></LinearLayout></LinearLayout>

Categories

Resources