Listview with edittext inside scrollview is not clickable - android

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"

Related

How to align textviews regarding to the layout background

I would like to know if there is a way to place all the textviews that start with little bit space regarding the layout they located. For example I want that in the follwoing image all the textvies will not touch in the border of layout sucah as the word "place","location","Between","When" are doing.
This is current situation:
and this is my xml code:
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="#+id/relativlayoutGcmMessage"
android:background="#ffffff">
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:id="#+id/separatorUp"
android:visibility="visible"
android:background="#FF0000"
android:layout_marginTop="25dp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<RelativeLayout
android:layout_width="match_parent"
android:id="#+id/textlayout"
android:layout_marginTop="5dp"
android:layout_below="#+id/separatorUp"
android:background="#drawable/edit_text_style_focused"
android:layout_margin="10dp"
android:layout_height="wrap_content"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="User ,"
android:gravity="center"
android:id="#+id/textViewUser"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textStyle="bold"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:textSize="20sp"
android:textColor="#FF0000" />
<TextView
android:id="#+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="this is the message"
android:textSize="20sp"
android:layout_marginLeft="5dp"
android:layout_below="#+id/textViewUser"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textColor="#000000" />
</RelativeLayout>
<LinearLayout
android:id="#+id/linearLayoutBtn"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<Button
android:text="Join"
android:id="#+id/ButtonJoin"
android:textColor="#ffffff"
android:background="#606060"
android:layout_margin="10dp"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_alignParentBottom="true"
android:layout_height="wrap_content"
>
</Button>
<Button
android:text="Deny"
android:id="#+id/ButtonDeny"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_margin="10dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:textColor="#ffffff"
android:background="#606060"
>
</Button>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:id="#+id/relativeLayoutTextVals"
android:layout_marginTop="20dp"
android:layout_margin="10dp"
android:background="#drawable/edit_text_style_focused"
android:layout_below="#+id/textlayout"
android:layout_height="wrap_content">
<TableRow
android:layout_width="match_parent"
android:id="#+id/row2"
android:layout_below="#+id/row1"
android:layout_height="wrap_content">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Between:"
android:id="#+id/textViewbtwn"
android:textColor="#FF0000"
android:textStyle="bold"
android:textSize="20sp"
android:layout_weight="0.62" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Time"
android:id="#+id/textViewtime"
android:layout_marginLeft="10dp"
android:textSize="20sp"
android:layout_weight="1.45"
android:textColor="#000000" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:id="#+id/row3"
android:layout_below="#+id/row2"
android:layout_height="wrap_content">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Location:"
android:id="#+id/textViewloc"
android:textStyle="bold"
android:textColor="#FF0000"
android:textSize="20sp"
android:layout_weight="1" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="place"
android:layout_marginLeft="10dp"
android:id="#+id/textViewPlace"
android:textSize="20sp"
android:layout_weight="2.28"
android:textColor="#000000" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:id="#+id/row1"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_gravity="center">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="When:"
android:id="#+id/textViewWhen"
android:textStyle="bold"
android:textSize="20sp"
android:textColor="#FF0000"
android:layout_weight="51.15" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Date"
android:layout_marginLeft="10dp"
android:id="#+id/textViewDate"
android:textSize="20sp"
android:layout_weight="115.29"
android:textColor="#000000" />
</TableRow>
</RelativeLayout>
</RelativeLayout>
Try another approach as follows , it works as per your requirement
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/relativlayoutGcmMessage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff">
<View
android:id="#+id/separatorUp"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginTop="25dp"
android:background="#FF0000"
android:visibility="visible" />
<RelativeLayout
android:id="#+id/textlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/separatorUp"
android:layout_margin="10dp"
android:layout_marginTop="5dp"
android:padding="10dp">
<TextView
android:id="#+id/textViewUser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:gravity="center"
android:text="User ,"
android:textColor="#FF0000"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="#+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/textViewUser"
android:layout_marginLeft="5dp"
android:text="this is the message"
android:textColor="#000000"
android:textSize="20sp" />
</RelativeLayout>
<LinearLayout
android:id="#+id/linearLayoutBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:orientation="horizontal">
<Button
android:id="#+id/ButtonJoin"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_margin="10dp"
android:layout_weight="1"
android:background="#606060"
android:text="Join"
android:textColor="#ffffff"></Button>
<Button
android:id="#+id/ButtonDeny"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_margin="10dp"
android:layout_weight="1"
android:background="#606060"
android:text="Deny"
android:textColor="#ffffff">
</Button>
</LinearLayout>
<RelativeLayout
android:id="#+id/relativeLayoutTextVals"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/textlayout"
android:layout_margin="10dp"
android:layout_marginTop="20dp">
<LinearLayout
android:id="#+id/row2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/row1"
android:layout_margin="5dp">
<TextView
android:id="#+id/textViewbtwn"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Between:"
android:textColor="#FF0000"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="#+id/textViewtime"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="Time"
android:textColor="#000000"
android:textSize="20sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/row3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/row2"
android:layout_margin="5dp">
<TextView
android:id="#+id/textViewloc"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Location:"
android:textColor="#FF0000"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="#+id/textViewPlace"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="place"
android:textColor="#000000"
android:textSize="20sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/row1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_gravity="center"
android:layout_margin="5dp"
android:orientation="horizontal"
android:weightSum="2">
<TextView
android:id="#+id/textViewWhen"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="When:"
android:textColor="#FF0000"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="#+id/textViewDate"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="Date"
android:textColor="#000000"
android:textSize="20sp" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>

Facing an issue with listview display

I am having five columns displaying data,the issue i am facing is the fifth column data is not visible its getting hidden as well the column heading and the data are not getting properly aligned.Following is my xml for data display
<TextView
android:id="#+id/textView1"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="10dp"
android:textColor="#000000"
android:text="TextView" />
<TextView
android:id="#+id/textViewStyle"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="10dp"
android:textColor="#000000"
android:text="23" />
</LinearLayout>
<LinearLayout
android:layout_width="100dp"
android:layout_height="wrap_content" android:orientation="vertical">
<TextView
android:id="#+id/textView2"
android:layout_gravity="center"
android:layout_marginLeft="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="10dp"
android:text="TextView" />
<TextView
android:id="#+id/textView21"
android:layout_gravity="center"
android:layout_marginLeft="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="10dp"
android:textColor="#000000"
android:text="23" />
<TextView
android:id="#+id/textView22"
android:layout_gravity="center"
android:layout_marginLeft="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="10dp"
android:textColor="#000000"
android:text="23" />
</LinearLayout>
<LinearLayout
android:layout_width="100dp"
android:layout_height="wrap_content" android:orientation="vertical">
<TextView
android:id="#+id/textView3"
android:layout_gravity="center"
android:layout_marginLeft="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="10dp"
android:text="455" />
<TextView
android:id="#+id/textView31"
android:layout_gravity="center"
android:layout_marginLeft="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="10dp"
android:text="554" />
<TextView
android:id="#+id/textView32"
android:layout_gravity="center"
android:layout_marginLeft="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="10dp"
android:text="755" />
</LinearLayout>
<LinearLayout
android:layout_width="100dp"
android:layout_height="wrap_content" android:orientation="vertical">
<TextView
android:id="#+id/textView4"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:textColor="#000000"
android:textSize="10dp"
android:text="6654" />
<TextView
android:id="#+id/textView41"
android:layout_gravity="center"
android:layout_marginLeft="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="10dp"
android:text="7676" />
<TextView
android:id="#+id/textView42"
android:layout_gravity="center"
android:layout_marginLeft="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="10dp"
android:text="7765" />
</LinearLayout>
<LinearLayout
android:layout_width="100dp"
android:layout_height="wrap_content" android:orientation="vertical">
<TextView
android:id="#+id/textView5"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:textColor="#000000"
android:textSize="10dp"
android:text="12" />
<TextView
android:id="#+id/textView51"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:textColor="#000000"
android:textSize="10dp"
android:text="45" />
<TextView
android:id="#+id/textView52"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:textColor="#000000"
android:textSize="10dp"
android:text="644" />
</LinearLayout>
</LinearLayout>
and the listview xml is has below
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#android:color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_margin="10dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:text="12345617890" />
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:fontFamily="#android:color/black"
android:text="Ramakrisha Tripati" />
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:text="9876543210" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_weight="1"
android:layout_margin="10dp"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:text="13/1/2015" />
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:text="Rohit Sharma" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="55dp"
android:orientation="horizontal"
android:background="#F5D8BA">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="item#\nstyle#"
android:layout_weight="1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="M Wt\nD Wt\nCS Wt"
android:layout_weight="1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Making\nD Rate\nCS Rate"
android:layout_weight="1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Margin\nDis %\nDiscount"
android:layout_weight="1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="GT\nFSP"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ListView android:id="#+id/listView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:divider="#00000000"
android:dividerHeight="5dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:textColor="#000000"
android:text="Comment" />
<EditText
android:id="#+id/editText2"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:ems="10"
android:hint="Comment goes here"
android:inputType="textMultiLine" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:orientation="horizontal">
<Button
android:id="#+id/buttonAcc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:padding="10dp"
android:textColor="#000000"
android:background="#drawable/mybutton"
android:layout_marginLeft="20dp"
android:text="Accept" />
<Button
android:id="#+id/buttonRej"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:padding="10dp"
android:textColor="#000000"
android:background="#drawable/mybutton"
android:layout_marginLeft="100dp"
android:text="Reject" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="100dp"
android:layout_height="wrap_content" android:orientation="vertical">
because of that
why you not use tablelayout?
Just replace your All Linear Layouts under "xml for data display"
<LinearLayout
android:layout_width="100dp"
android:layout_height="wrap_content"
android:orientation="vertical">
With this
<LinearLayout
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">
You can see your fifth Layout.

how to prevent scrollview hiding other layout

clicking on edittext inside scrollview need to open other layout that should overlap scrollview(which occupies whole screen).But scrollview is hiding other layout.can anyone please give me a small hint.
<RelativeLayout
android:id="#+id/RLayout_main"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<RelativeLayout
android:id="#+id/RLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="#+id/homeButton"
android:layout_width="40dip"
android:layout_height="40dip"
android:layout_marginLeft="10dip"
android:layout_marginTop="10dip"
android:background="#drawable/home_icon" />
<TextView
android:id="#+id/textButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="15dp"
android:background="#005288"
android:text="#string/MyProfile"
android:textColor="#ffffff" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout1"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/pickup_textView1"
android:layout_width="110dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="#string/Title"
android:textColor="#ffffff" />
<RadioGroup
android:id="#+id/radioGroup1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_toRightOf="#+id/pickup_textView1"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/MrRadio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/Mr"
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="bold" >
</RadioButton>
<RadioButton
android:id="#+id/MrsRadio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/Mrs"
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="bold" >
</RadioButton>
<RadioButton
android:id="#+id/MsRadio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/Ms"
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="bold" >
</RadioButton>
</RadioGroup>
<TextView
android:id="#+id/required2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/radioGroup1"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout2"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/first_name"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:text="#string/First_Name"
android:textColor="#ffffff"
android:textSize="15sp" />
<EditText
android:id="#+id/firstNameEditText"
android:layout_width="190dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/first_name"
android:imeOptions="actionDone"
android:inputType="text"
android:textSize="15sp" />
<TextView
android:id="#+id/required3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/firstNameEditText"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout3"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/last_name"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:text="#string/Last_Name"
android:textColor="#ffffff"
android:textSize="15sp" />
<EditText
android:id="#+id/lastNameEditText"
android:layout_width="190dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/last_name"
android:imeOptions="actionDone"
android:inputType="text"
android:textSize="15sp" />
<TextView
android:id="#+id/required4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/lastNameEditText"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout4"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/email"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:text="#string/E_Mail"
android:textColor="#ffffff"
android:textSize="15sp" />
<EditText
android:id="#+id/eMailEditText"
android:layout_width="190dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/email"
android:imeOptions="actionDone"
android:inputType="textWebEmailAddress"
android:textSize="15sp" />
<TextView
android:id="#+id/required5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/eMailEditText"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
</RelativeLayout>
</ScrollView>
<include
android:layout_gravity="bottom"
layout="#layout/picker" />
</LinearLayout>
try this
<RelativeLayout
android:id="#+id/RLayout_main"
android:layout_width="Fill_parent"
android:layout_height="Fill_parent" >
<RelativeLayout
android:id="#+id/RLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="#+id/homeButton"
android:layout_width="40dip"
android:layout_height="40dip"
android:layout_marginLeft="10dip"
android:layout_marginTop="10dip"
android:background="#drawable/home_icon" />
<TextView
android:id="#+id/textButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="15dp"
android:background="#005288"
android:text="#string/MyProfile"
android:textColor="#ffffff" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout1"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/pickup_textView1"
android:layout_width="110dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="#string/Title"
android:textColor="#ffffff" />
<RadioGroup
android:id="#+id/radioGroup1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_toRightOf="#+id/pickup_textView1"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/MrRadio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/Mr"
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="bold" >
</RadioButton>
<RadioButton
android:id="#+id/MrsRadio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/Mrs"
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="bold" >
</RadioButton>
<RadioButton
android:id="#+id/MsRadio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/Ms"
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="bold" >
</RadioButton>
</RadioGroup>
<TextView
android:id="#+id/required2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/radioGroup1"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout2"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/first_name"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:text="#string/First_Name"
android:textColor="#ffffff"
android:textSize="15sp" />
<EditText
android:id="#+id/firstNameEditText"
android:layout_width="190dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/first_name"
android:imeOptions="actionDone"
android:inputType="text"
android:textSize="15sp" />
<TextView
android:id="#+id/required3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/firstNameEditText"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout3"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/last_name"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:text="#string/Last_Name"
android:textColor="#ffffff"
android:textSize="15sp" />
<EditText
android:id="#+id/lastNameEditText"
android:layout_width="190dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/last_name"
android:imeOptions="actionDone"
android:inputType="text"
android:textSize="15sp" />
<TextView
android:id="#+id/required4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/lastNameEditText"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout4"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/email"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:text="#string/E_Mail"
android:textColor="#ffffff"
android:textSize="15sp" />
<EditText
android:id="#+id/eMailEditText"
android:layout_width="190dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/email"
android:imeOptions="actionDone"
android:inputType="textWebEmailAddress"
android:textSize="15sp" />
<TextView
android:id="#+id/required5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/eMailEditText"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
</ScrollView>
<include
android:layout_gravity="bottom"
layout="#layout/picker"
android:layout_below="#+id/RLayout5"
/>
</RelativeLayout>
Use this code this will help u it has fixed header and footer in that there is Scroll
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<LinearLayout
android:id="#+id/mainLinearLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="#drawable/top_bg"
android:orientation="horizontal" >
<ImageView
android:id="#+id/back_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/back_btn"
android:layout_marginTop="5dp"
android:layout_marginLeft="10dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="75dp"
android:text="Flights"
android:textColor="#android:color/white" />
</LinearLayout>
<LinearLayout
android:id="#+id/flightDetailsLayout"
android:layout_width="fill_parent"
android:layout_height="70dp"
android:layout_below="#+id/mainLinearLayout"
android:layout_centerHorizontal="true"
android:background="#drawable/gray_bg123"
android:orientation="vertical" >
<LinearLayout
android:id="#+id/innerflightDetailsLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/from"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:paddingLeft="12dp"
android:textSize="12sp"
android:text="Delhi to Banglore, "
android:textStyle="bold" />
<TextView
android:id="#+id/tripType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="RoundTrip"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/innerTripLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/tripDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="12dp"
android:textSize="10sp"
android:text="19 Jan 2013 "
android:textStyle="bold"/>
<TextView
android:id="#+id/paxText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="for 1 Adults,0 Childs,O Infants"
android:textSize="12dp" />
</LinearLayout>
<LinearLayout
android:id="#+id/Book"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="5dp"
android:orientation="horizontal" >
<TextView
android:id="#+id/tripDate"
android:layout_width="84dp"
android:layout_height="wrap_content"
android:paddingLeft="12dp"
android:text="Rs 10,2345 /-"
android:textSize="14sp"
android:textStyle="bold" />
<ImageView
android:id="#+id/bookBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:layout_marginLeft="200dp"
android:src="#drawable/book" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/sortFlightLayouts"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/flightDetailsLayout"
android:background="#drawable/gray_bg123"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="DEL-BLR"
android:layout_marginLeft="6dp"
android:layout_marginTop="5dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:src="#drawable/flight_icon_result" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="25dp"
android:src="#drawable/time" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="5dp"
android:src="#drawable/rupee" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="1dp"
android:layout_height="60dp"
android:background="#android:color/darker_gray" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#drawable/gray_bg123"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BLR-DEL"
android:layout_marginLeft="6dp"
android:layout_marginTop="5dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:src="#drawable/flight_icon_result" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="25dp"
android:src="#drawable/time" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="5dp"
android:src="#drawable/rupee" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/footerLayout"
android:layout_below="#+id/sortFlightLayouts"
android:orientation="horizontal" >
<ListView
android:id="#+id/lvDepartures"
android:layout_weight="1"
android:layout_marginLeft="5dp"
android:choiceMode="singleChoice"
android:layout_height="wrap_content"
android:listSelector="#drawable/selection_effect"
android:layout_width="wrap_content"/>
<View
android:layout_width="1dp"
android:layout_height="wrap_content"
android:background="#android:color/darker_gray" />
<ListView
android:id="#+id/lvArrivals"
android:layout_weight="1"
android:layout_marginLeft="5dp"
android:choiceMode="singleChoice"
android:layout_height="wrap_content"
android:listSelector="#drawable/selection_effect"
android:layout_width="wrap_content"/>
</LinearLayout>
<LinearLayout
android:id="#+id/footerLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal"
android:background="#drawable/top_bg" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:layout_marginTop="5dp"
android:src="#drawable/filter" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:layout_marginTop="5dp"
android:src="#drawable/sort" />
</LinearLayout>
</RelativeLayout>

QuickcontactBadge not showing up in Layout when ran the app

I am using a FrameLayout with some EditText controls and a QuickContactBadge. Its fine till here. when I run the app, I am able to see all the controls, but QuickContactBadge not appearing in the layout.
What I need to do to make it visible? Did I miss anything?
This is my layout file,
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitXY"
android:src="#drawable/pattern1" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="50dp"
android:orientation="vertical" >
<ScrollView
android:layout_width="wrap_content"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<QuickContactBadge
android:id="#+id/quickContactBadge1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="10dp"
android:scaleType="centerCrop" />
<EditText
android:id="#+id/txtlastname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignRight="#+id/edttxtfirstname"
android:layout_marginTop="50dp"
android:ems="10"
android:hint="Last Name"
android:inputType="textPersonName"
android:textColor="#000000" />
<EditText
android:id="#+id/edttxtfirstname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:ems="10"
android:hint="First Name"
android:inputType="textPersonName"
android:textColor="#000000" >
<requestFocus />
</EditText>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#000000" >
</View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="#+id/txtheadingphone"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignRight="#+id/editText2"
android:layout_gravity="center"
android:layout_marginRight="70dp"
android:layout_weight="0.63"
android:gravity="center_vertical"
android:text="Phone"
android:textColor="#ffffffff" />
<ImageButton
android:id="#+id/imgbtnaddphone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#android:drawable/ic_input_add" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<Button
android:id="#+id/btnchphone"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Phone"
android:textColor="#ffffffff" />
<EditText
android:id="#+id/edttxtphone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.48"
android:ems="10"
android:gravity="center"
android:hint="Phone Number"
android:inputType="phone"
android:textColor="#000000" />
<ImageButton
android:id="#+id/imgbtndelphone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#android:drawable/ic_input_delete" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#000000" >
</View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="#+id/txtheadingaddress"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignRight="#+id/editText2"
android:layout_gravity="center"
android:layout_marginRight="70dp"
android:layout_weight="0.63"
android:gravity="center_vertical"
android:text="Address"
android:textColor="#ffffffff" />
<ImageButton
android:id="#+id/imgbtnaddAddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#android:drawable/ic_input_add" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<Button
android:id="#+id/btnAddress"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Home"
android:textColor="#ffffffff" />
<EditText
android:id="#+id/edttxtaddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:gravity="center"
android:hint="Address"
android:inputType="textPostalAddress"
android:textColor="#000000" />
<ImageButton
android:id="#+id/imgbtndeladdress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#android:drawable/ic_input_delete" />
</LinearLayout>
<EditText
android:id="#+id/edttxtcity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:gravity="center"
android:hint="City"
android:textColor="#000000" />
<EditText
android:id="#+id/edttxtstate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:gravity="center"
android:hint="State"
android:textColor="#000000" />
<EditText
android:id="#+id/edttxzipcode"
android:layout_width="236dp"
android:layout_height="wrap_content"
android:ems="10"
android:gravity="center"
android:hint="ZipCode"
android:inputType="phone"
android:textColor="#000000" />
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#000000" >
</View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="#+id/txtemail"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginRight="70dp"
android:layout_weight="0.63"
android:gravity="center_vertical"
android:text="Email"
android:textColor="#ffffffff" />
<ImageButton
android:id="#+id/imgbtnaddemail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#android:drawable/ic_input_add" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<Button
android:id="#+id/btnchemail"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Email"
android:textColor="#ffffffff" />
<EditText
android:id="#+id/edttxtemail"
android:layout_width="128dp"
android:layout_height="wrap_content"
android:layout_weight="0.48"
android:ems="10"
android:gravity="center"
android:hint=""
android:inputType="textEmailAddress"
android:textColor="#000000" />
<ImageButton
android:id="#+id/imgbtndelemail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#android:drawable/ic_input_delete" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
<LinearLayout
android:id="#+id/LinearLayout02"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
android:background="#AA000000" >
<Button
android:id="#+id/btnsave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick="addCustomerDetails"
android:text="Save"
android:textColor="#000000"
>
</Button>
<Button
android:id="#+id/btncancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Cancel"
android:textColor="#000000"
android:onClick="canceladdcustomer">
</Button>
</LinearLayout>
</FrameLayout>
Please correct me or provide any useful links, so that I will come to know my mistake.
Thanks for your valuable help!!

how to add single scroll to view and listview in same layout in android

I have a situation, in that situation one view contain imageviews on upper part and list view in the lower part and when we scrolling it is only scroll listview part but i have to scroll whole view simultaneously with single scroll.
I have used add header functionality of list view but in that i have to put seperate xml file of imageview and listview and i need to put them in one xml file. how can i do it..
<ViewFlipper
android:id="#+id/viewFlipper"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="#+id/header_relativelayout" >
<!-- //settings First view Setting -->
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingLeft="3dp"
android:paddingRight="3dp" >
<LinearLayout
android:id="#+id/first_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3" >
<TextView
android:id="#+id/textView_chooseteam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="d"
android:textColor="#color/gray"
android:textSize="10sp"
android:visibility="invisible" />
<ImageView
android:id="#+id/imageView_cbk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="#drawable/cbk_btn" />
<TextView
android:id="#+id/textView_chooseteam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="d"
android:textColor="#color/gray"
android:textSize="20sp"
android:visibility="invisible" />
<ImageView
android:id="#+id/imageView_cfb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="#drawable/cfb_btn" />
<TextView
android:id="#+id/textView_chooseteam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="d"
android:textColor="#color/gray"
android:textSize="20sp"
android:visibility="invisible" />
<ImageView
android:id="#+id/imageView_mlb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="#drawable/mlb_btn" />
<TextView
android:id="#+id/textView_chooseteam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="d"
android:textColor="#color/gray"
android:textSize="10sp"
android:visibility="invisible" />
</LinearLayout>
<TextView
android:id="#+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:text="#string/Games_Placebet_chooseteam"
android:textColor="#color/gray"
android:textSize="10sp"
android:textStyle="bold"
android:visibility="invisible" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="3" >
<TextView
android:id="#+id/textView_chooseteam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="d"
android:textColor="#color/gray"
android:textSize="10sp"
android:visibility="invisible" />
<ImageView
android:id="#+id/imageView_nba"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="#drawable/nba_btn" />
<TextView
android:id="#+id/textView_chooseteam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="d"
android:textColor="#color/gray"
android:textSize="20sp"
android:visibility="invisible" />
<ImageView
android:id="#+id/imageView_nfl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="#drawable/nfl_btn" />
<TextView
android:id="#+id/textView_chooseteam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="d"
android:textColor="#color/gray"
android:textSize="20sp"
android:visibility="invisible" />
<ImageView
android:id="#+id/imageView_nhl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="#drawable/nhl_btn" />
<TextView
android:id="#+id/textView_chooseteam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="d"
android:textColor="#color/gray"
android:textSize="10sp"
android:visibility="invisible" />
</LinearLayout>
<TextView
android:id="#+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:text="#string/Games_Placebet_chooseteam"
android:textColor="#color/gray"
android:textSize="12sp"
android:visibility="invisible" />
</LinearLayout>
<LinearLayout
android:id="#+id/middle_line"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/first_view"
android:orientation="vertical" >
<ImageView
android:id="#+id/small_line"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="#drawable/small_line" />
<TextView
android:id="#+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:text="f"
android:textColor="#color/gray"
android:textSize="5sp"
android:visibility="invisible" />
</LinearLayout>
<LinearLayout
android:id="#+id/list_header_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/middle_line" >
<TextView
android:id="#+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="dd"
android:textColor="#color/gray"
android:textSize="14sp"
android:visibility="invisible" />
<TextView
android:id="#+id/list_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Recent Activities"
android:textColor="#color/gray"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/list_header_layout" >
<ExpandableListView
android:id="#id/android:list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/first_view"
android:cacheColorHint="#00000000"
android:childDivider="#android:color/black"
android:divider="#android:color/black"
android:fadingEdge="none"
android:scrollingCache="false" >
</ExpandableListView>
</LinearLayout>
</RelativeLayout>
//settings Second view Setting
<RelativeLayout
android:id="#+id/progressrelative"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center_vertical|center_horizontal"
android:gravity="center_vertical|center_horizontal" >
<ProgressBar
android:id="#+id/progressbar2"
style="#android:style/Widget.ProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center_vertical|center_horizontal"
android:gravity="center_vertical|center_horizontal"
android:indeterminate="true"
android:visibility="gone" />
<ListView
android:id="#+id/channellist"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="#+id/frameLayout"
android:layout_below="#+id/header_relativelayout"
android:cacheColorHint="#00000000"
android:divider="#android:color/transparent"
android:fadingEdge="none"
android:scrollingCache="false" >
</ListView>
</RelativeLayout>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:id="#+id/betView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="8dp" >
<TextView
android:id="#+id/textView_chooseteam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:text="#string/Games_Placebet_chooseteam"
android:textColor="#color/gray"
android:textSize="16sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/gm4_headar_parch"
android:gravity="center" >
<TextView
android:id="#+id/button_date_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="8dp"
android:text="Saturday, 10/27/2012 at 01:00 PM"
android:textColor="#color/white"
android:textSize="13sp" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginTop="-5dp"
android:background="#drawable/gm4_1white_bg"
android:orientation="vertical"
android:paddingLeft="5dp"
android:paddingRight="5dp" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal"
android:paddingLeft="5dp"
android:paddingRight="5dp" >
<TextView
android:id="#+id/button_hometeam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:clickable="true"
android:text="Denver Broncos"
android:textColor="#color/gray"
android:textSize="16sp"
android:textStyle="bold" />
<ImageView
android:id="#+id/imageView_button_hometeam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:src="#drawable/game_click_btn" />
</RelativeLayout>
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_marginTop="8dp"
android:background="#drawable/recent_bigpatch_line" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal"
android:paddingLeft="5dp"
android:paddingRight="5dp" >
<TextView
android:id="#+id/button_visitorteam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="SD Chargers"
android:textColor="#color/gray"
android:textSize="16sp"
android:textStyle="bold" />
<ImageView
android:id="#+id/imageView_button_visitorteam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:src="#drawable/game_unclick_btn" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:text="Betting Amount"
android:textColor="#color/gray"
android:textSize="16sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="vertical" >
<RelativeLayout
android:id="#+id/upper_relative"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/gm4_headar_parch"
android:orientation="horizontal"
android:paddingLeft="8dp"
android:paddingRight="8dp" >
<TextView
android:id="#+id/textView_placebet_balance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:paddingTop="2dp"
android:text="#string/Games_Placebet_balance"
android:textColor="#android:color/white"
android:textSize="16sp"
android:textStyle="bold" />
<!--
<TextView
android:id="#+id/textView_placebet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:paddingRight="32dp"
android:paddingTop="4dp"
android:text="$"
android:textColor="#android:color/white"
android:textStyle="bold" />
-->
<TextView
android:id="#+id/textView_placebet_dollar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:paddingRight="10dp"
android:paddingTop="4dp"
android:text="100"
android:textColor="#android:color/white"
android:textStyle="bold" />
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="-5dp"
android:background="#drawable/gm4_1white_bg"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp" >
<TextView
android:id="#+id/button_placebet_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="Denver Broncos"
android:textColor="#color/gray"
android:textSize="16sp" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginTop="10dp"
android:background="#drawable/recent_bigpatch_line" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginRight="3dp"
android:layout_marginTop="10dp" >
<Button
android:id="#+id/button_placebet_up_counter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="10dp"
android:background="#drawable/pg_2_up_arrow_btn" />
<Button
android:id="#+id/textview_placebet_counter_digipanel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:background="#drawable/counter_digitaldisplay"
android:textColor="#109EE6" />
<Button
android:id="#+id/button_placebet_counter_down"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="10dp"
android:background="#drawable/pg_2_down_arrow_btn" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="vertical" >
<Button
android:id="#+id/button_betaganist"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|center_vertical"
android:background="#drawable/bet_against_btn_new"
android:gravity="center_horizontal|center_vertical"
android:paddingBottom="5dp"
android:text="#string/Games_Placebet_betaganist"
android:textColor="#color/white"
android:textSize="18sp"
android:textStyle="bold" />
<Button
android:id="#+id/button_placebet"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:background="#drawable/placebet_btn_new"
android:gravity="center_horizontal|center_vertical"
android:paddingBottom="5dp"
android:text="Place Bet"
android:textColor="#android:color/white"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<ListView
android:id="#+id/friendlist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/frameLayout"
android:layout_below="#+id/header_relativelayout"
android:cacheColorHint="#00000000"
android:divider="#android:color/transparent"
android:fadingEdge="none"
android:scrollingCache="false" >
</ListView>
</ViewFlipper>
here is a code of xml file in which i have used viewflipper and in that i have added views so the first view is image view on upper side listview on the lower side when we click on image view next view will flip and so on... but in the first view it is scrolling only listview part i need to scroll whole view with single scroll.
THanks in advance..
The issue is, all the possible ways to mix in two scrolls does not yield well ( to best of my knowledge), Setting the header xml is probably the best approach for it. try to find a way around the situation.

Categories

Resources