I have a strange error with ScrollView.
When the soft keyboard is not shown, scrolling works fine on both 2.2, 2.3 and 4.0.
But when the soft keyboard is shown, scrolling makes header layout invisible on 2.2 and 2.3.
What's wrong with my layout?
Please give me your suggestion.
This is my layout :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/white"
android:orientation="vertical" >
<include
android:id="#+id/header"
layout="#layout/b2u_header" />
<ScrollView
android:id="#+id/ScrollView02"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="15dp" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="15dp"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="#string/msg_register"
android:textColor="#color/black_color" />
<include
android:id="#+id/friend_name_table"
layout="#layout/b2u_profile_friend_name_table" />
<include
android:id="#+id/other_info"
layout="#layout/b2u_profile_settings_other_info" />
<LinearLayout
android:id="#+id/layout_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:gravity="center_vertical"
android:text="#string/password"
android:textColor="#000000" />
<EditText
android:id="#+id/edt_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:hint="パスワード"
android:inputType="textPassword" />
<EditText
android:id="#+id/edt_password_rewrite"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:hint="確認用パスワード"
android:inputType="textPassword" />
</LinearLayout>
<TextView
android:id="#+id/question_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:gravity="center_vertical"
android:text="■パスワードを忘れた時のヒント"
android:textColor="#000000" />
<Spinner
android:id="#+id/spinner_reminder_questions"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:entries="#array/reminder_questions" >
</Spinner>
<TextView
android:id="#+id/answer_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:gravity="center_vertical"
android:text="こたえ"
android:textColor="#000000" />
<EditText
android:id="#+id/answer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:gravity="center_vertical" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:gravity="center_vertical"
android:text="■ メールマガジンを受け取る"
android:textColor="#000000" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<RadioGroup
android:id="#+id/confirmemail_group"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/rb_notreceive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="受け取らない"
android:textColor="#000000" />
<RadioButton
android:id="#+id/rb_receive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="受け取る"
android:textColor="#000000" />
</RadioGroup>
</LinearLayout>
<LinearLayout
android:id="#+id/layout_agree_term"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:gravity="center_vertical"
android:text="■ 利用規約、プライバシーポリシーの同意"
android:textColor="#000000" />
<TextView
android:id="#+id/term_btn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:textColor="#000000" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal" >
<CheckBox
android:id="#+id/agree_term"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" 同意する" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
Related
<?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:background="#00b9e8"
android:orientation="vertical" >
<!-- <include layout="#layout/header" /> -->
<LinearLayout
android:id="#+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:background="#ffffff"
android:gravity="center"
android:padding="5dp" >
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Search Status"
android:textColor="#0060a4"
android:textSize="#dimen/font_15dp" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<ImageView
android:id="#+id/setting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/settings" />
<ImageView
android:id="#+id/searchstatus_imgBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/back_icon" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="40dp" >
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.35"
android:background="#drawable/round_bg"
android:padding="10dp" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Status"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0060a4"
android:textSize="20dp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_weight="0.65"
android:background="#drawable/round_bg"
android:gravity="center"
android:padding="8dp" >
<TextView
android:id="#+id/status"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:gravity="center"
android:text="Accepted"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0060a4"
android:textSize="20dp" />
<ImageView
android:id="#+id/imageView1"
android:layout_width="40dip"
android:layout_height="40dip"
android:paddingLeft="25dip" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="40dp" >
<LinearLayout
android:id="#+id/linearlayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.35"
android:background="#drawable/round_bg"
android:padding="10dp" >
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Reason"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#0060a4"
android:textSize="20dp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearlayout2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_weight="0.65"
android:background="#drawable/round_bg"
android:gravity="center"
android:padding="10dp" >
<TextView
android:id="#+id/reason"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#0060a4"
android:textSize="20dp" />
</LinearLayout>
</LinearLayout>
</LinearLayot>
This is my code i want to add one Footer but i am unable to do this i dont know why this Problem is coming even i have take relative layout then also its not working please tell me how add one footer plz Help
Try this method and better to use relative layout for this.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<LinearLayout
android:layout_alignParentTop="true"
android:layout_above="#+id/footer"
android:id="#+id/content"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#999"
android:layout_margin="4dp"
>
<TextView
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Content"
android:gravity="center"
android:padding="20dp"
android:textColor="#fff"
/>
</LinearLayout>
<LinearLayout
android:layout_alignParentBottom="true"
android:id="#+id/footer"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="FOOTER"
android:gravity="center"
android:padding="20dp"
android:textColor="#fff"
android:background="#666"
/>
</LinearLayout>
</RelativeLayout>
this will give like this .is that you want ?
First of all sorry for my english, This is my first question on StackOverflow, but I've learned a lot here .
Now I have a problem, which I couldn't solve. I have a framelayout with some elements. In android 4.x, Menu Panel's buttons onClick method doesn't fire. menupanel work to be in scroolview but in android 2.x buttons and layout work without problem as i want. I didn't find a problem.
Thanks for the help!
<?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"
android:orientation="horizontal" >
<!-- Menu Panel starts here -->
<RelativeLayout
android:scrollbars="none"
android:id="#+id/menuPanel"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#drawable/gray_bg"
android:gravity="right"
android:orientation="vertical">
<TextView
android:id="#+id/menu_title_1"
android:layout_width="fill_parent"
android:layout_height="45dp"
android:layout_alignParentTop="true"
android:layout_marginLeft="0dp"
android:background="#353535"
android:gravity="center_vertical"
android:paddingLeft="15dp"
android:text="#string/menu_title"
android:textColor="#android:color/white"
android:textSize="20sp"
android:textStyle="bold" >
</TextView>
<View
android:id="#+id/menu_item_divider_5"
android:layout_width="fill_parent"
android:layout_height="0.5dp"
android:layout_below="#+id/menu_title_1"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#b5b5b5" />
<Button
android:id="#+id/aktifgorevlerim"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_below="#+id/menu_item_divider_5"
android:background="#drawable/buton"
android:gravity="center_vertical"
android:onClick="AYARLAR_Click"
android:paddingLeft="15dp"
android:text="#string/item_1"
android:textColor="#android:color/white" >
</Button>
<View
android:id="#+id/menu_item_divider_2"
android:layout_width="fill_parent"
android:layout_height="0.5dp"
android:layout_below="#+id/aktifgorevlerim"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#b5b5b5" />
<Button
android:id="#+id/tamamlanmisgorevlerim"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_below="#+id/menu_item_divider_2"
android:background="#drawable/buton"
android:gravity="center_vertical"
android:onClick="GOREVLERIM_Click"
android:paddingLeft="15dp"
android:text="#string/item_2"
android:textColor="#android:color/white" />
<View
android:id="#+id/menu_item_divider_1"
android:layout_width="fill_parent"
android:layout_height="0.5dp"
android:layout_below="#+id/tamamlanmisgorevlerim"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:background="#b5b5b5" />
<Button
android:id="#+id/hakkinda"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_below="#+id/menu_item_divider_1"
android:background="#drawable/buton"
android:gravity="center_vertical"
android:onClick="HAKKINDA_Click"
android:paddingLeft="15dp"
android:text="HAKKINDA"
android:textColor="#android:color/white" >
</Button>
<Button
android:id="#+id/cikisyap"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="0dp"
android:background="#drawable/buton2"
android:gravity="center_vertical"
android:onClick="CIKISYAP_Click"
android:paddingLeft="15dp"
android:text="#string/item_4"
android:textColor="#android:color/white" >
</Button>
</RelativeLayout>
<!-- menuPanel ends here -->
<ScrollView
android:id="#+id/scrolpanel"
android:layout_width="wrap_content"
android:fillViewport="false"
android:layout_height="fill_parent"
>
<LinearLayout
android:id="#+id/slidingPanel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#android:color/white"
android:gravity="left"
android:orientation="vertical" >
<RelativeLayout
android:id="#+id/header"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginBottom="5dp"
android:background="#drawable/blue_bg" >
<View
android:id="#+id/header_vertical_divider_1"
android:layout_width="2dp"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_marginLeft="15dp"
android:layout_toRightOf="#+id/menuViewButton"
android:background="#drawable/engraved_bg" />
<ImageView
android:id="#+id/menuViewButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:clickable="true"
android:contentDescription="#string/description"
android:src="#drawable/icon_menu"
android:visibility="visible" />
<TextView
android:id="#+id/titlebar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Talep Detay Formu"
android:textColor="#color/White"
android:textSize="20sp" />
</RelativeLayout>
<EditText
android:id="#+id/Textgorevbaslik"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:ems="10"
android:gravity="top"
android:hint="Görev Başlığı"
android:textSize="10pt" >
<requestFocus />
</EditText>
<EditText
android:id="#+id/Textgorevaciklama"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:gravity="top"
android:hint="Açıklama"
android:lines="6"
android:singleLine="false"
android:textSize="10pt" >
</EditText>
<CheckBox
android:id="#+id/Checkgrupgorevi"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:gravity="center"
android:onClick="CHECKBOX_click"
android:text="Grup Görevi mi ?" >
</CheckBox>
<Spinner
android:id="#+id/spinnergorevkisilistesi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:gravity="center" />
<Spinner
android:id="#+id/spinnergorevprojelistesi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:gravity="center" />
<Spinner
android:id="#+id/spinnergorevdurumlistesi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:gravity="center" />
<CheckBox
android:id="#+id/Checkgorulmegorevi"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:gravity="center"
android:text="Sadece Yönetici ve Uzman Görebilsin ?" >
</CheckBox>
<Spinner
android:id="#+id/spinnergorevonceliksirasi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:gravity="center" />
<Button
android:id="#+id/btngorevekle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:background="#drawable/roundedbutton"
android:height="35dp"
android:onClick="GOREVEKLE"
android:text="EKLE"
android:textColor="#color/White"
android:textStyle="bold"
android:width="100dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:height="100dp"/>
</LinearLayout>
</ScrollView>
</FrameLayout>
onClick method
public void GOREVLERIM_Click(View view){
Intent intent = new Intent(GorevEkleActivity.this, GorevActivity.class);
startActivity(intent);
}
Thanks for answers. I found the solution. I put scrollview in a linearlayout. Problem was solved.
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<ScrollView
android:id="#+id/scrolpanel"
android:layout_width="match_parent"
android:fillViewport="false"
android:layout_height="match_parent"
android:orientation="vertical"
>
.
.
.
</ScrollView>
</LinearLayout>
I am using two ListView in my Layout. and having fixed header and footer.But when i am running my code my header is getting breaked not coming full on my Device and my footer is not showing because of the ListView .
This is my main XML file that is having the ListView
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="#+id/llHeader"
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_weight="1">
<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="Boston to San Fransisco, "
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="10sp"
android:layout_weight="1"
android:textStyle="bold" />
<ImageView
android:id="#+id/bookBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left"
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>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_weight="4"
android:orientation="horizontal">
<ListView
android:id="#+id/lvDepartures"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"/>
<ListView
android:id="#+id/lvArrivals"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"/>
</LinearLayout>
<LinearLayout
android:id="#+id/llFooter"
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_weight="1"/>
<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>
</LinearLayout>
And this my Layout that i am putting in the ListView at RunTime
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="#+id/flightLogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginBottom="5sp"
android:layout_marginRight="10sp"
android:layout_marginTop="5sp"
android:src="#drawable/spicejet" />
<TextView
android:id="#+id/flightCompanyName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/flightLogo"
android:text="Spice Jet" />
<TextView
android:id="#+id/flightNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/flightCompanyName"
android:text="9W-123" />
<TextView
android:id="#+id/flightTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/flightLogo"
android:gravity="center_vertical"
android:text="6:00 - 7:00" />
<TextView
android:id="#+id/flightStop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/flightTime"
android:layout_toRightOf="#+id/flightLogo"
android:text="1h 35m | Non Stop" />
<TextView
android:id="#+id/amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/flightStop"
android:layout_toRightOf="#+id/flightLogo"
android:text="Rs 20,000" />
</RelativeLayout>
I can't tell if this is your only problem yet but when you use layout_weight inside of a vertical LinearLayout then your layout_height should be 0dp.
Likewise if it is inside of a horizontal LinearLayout then the layout_width should be 0dp. Also, all of the layouts should have a weight if you are using it on one of thenm.
android:layout_below= in your third LinearLayout, I believe, is not a property of LinearLayout. That is a property of RelativeLayout.
My suggestion for this type of setup is to use RelativeLayout as the root layout. Then, for your header LinearLayout you can use android:layout_alignParentTop="true" and for your footer use android:layout_alignParentBottom="true" then stick your ListView in the middle with android:layout_below="#id/idOfHeaderLL"
<RelativeLayout
...>
<LinearLayout
android:id="#+id/headerLL"
android:layout_alignParentTop="true"
...>
<!-- add header veiws -->
</LinearLayout
<ListView
android:layout_below="#id/headerLL"
.../>
<LinearLayout
android:layout_alignParentBottom="true"
...>
<!-- add footer views -->
</LinearLayout>
</RelativeLayout>
I'm not going to rewrite the whole layout but that should give you an idea. The "..." is where you will put in your other properties such as height, width, etc...
i have a layout having many fields and i wish to add scrollbars for both horizontal and vertical layout.But vertical scroll is working horizontal scroll is not working.I have loaded the text fields dynamically in program and add the fields with web service .
My Activity
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/LayoutScroll"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="horizontal|vertical" >
<LinearLayout
android:id="#+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginBottom="10dp"
android:layout_marginTop="30dp"
android:gravity="fill|fill_horizontal"
android:orientation="vertical" >
<TableRow
android:id="#+id/Row_User_Deletion"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#DF0101"
android:gravity="center" >
<TextView
android:id="#+id/user_creation_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/txt_delete_user_userDeletion"
android:textColor="#color/white"
android:textSize="15dp" />
</TableRow>
<TableRow
android:id="#+id/RowUserType"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="10dp" >
<TextView
android:id="#+id/txt_delete_user_selectuserType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="#string/txt_delete_user_selectuserType"
android:textColor="#424242" />
<Spinner
android:id="#+id/spin_delete_userType"
android:layout_width="120dp"
android:layout_height="50dp"
android:layout_marginBottom="5dp"
android:entries="#array/utype" />
<Button
android:id="#+id/btn_spinner_user_search_select"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginTop="5dp"
android:background="#drawable/redbtn"
android:text="#string/btn_delete_user_search_user" />
</TableRow>
<TableRow
android:id="#+id/deleteUserRow"
android:layout_width="match_parent"
android:layout_height="34dp"
android:layout_marginTop="10dp"
android:gravity="fill" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/txt_user_creation_userId"
android:textColor="#424242" />
<EditText
android:id="#+id/txt_user_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:ems="10" >
<requestFocus />
</EditText>
<Button
android:id="#+id/button1"
android:layout_width="55dp"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:background="#drawable/redbtn"
android:text="#string/btn_delete_user_search_user" />
</TableRow>
<TableLayout
android:id="#+id/delete_userDetails_Table"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="vertical"
android:stretchColumns="*" >
<TableRow
android:id="#+id/tableRow2"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:background="#color/red" >
<TextView
android:id="#+id/textView2"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:text="#string/txt_delete_user_select"
android:textColor="#color/white" />
<TextView
android:id="#+id/textView3"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:text="#string/txt_user_creation_userId"
android:textColor="#color/white" />
<TextView
android:id="#+id/textView4"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:text="#string/txt_user_creation_userName"
android:textColor="#color/white" />
<TextView
android:id="#+id/textView5"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:text="#string/txt_delete_user_UserRole"
android:textColor="#color/white" />
<TextView
android:id="#+id/textView5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/txt_componentmaster_createdDate"
android:textColor="#color/white" />
<TextView
android:id="#+id/textView5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/txt_componentmaster_createdBy"
android:textColor="#color/white" />
</TableRow>
</TableLayout>
</LinearLayout>
</ScrollView>
ImageView
Please keep in mind that the view that you want to scroll Horizontal is must have LinearLayout as parent then only you can set the HorizontalScrollView between that layout.
And Put one HorizontalScrollView as the Parent of those both LinearLayout.
Hope this will help you.
Smple:
<HORIZONTAL_VIEW ... >
<!-- Your First Layout -->
<LinearLayout ... >
</LinearLayout>
<!-- Your Second Layout -->
<LinearLayout ... >
</LinearLayout>
</HORIZONTAL_VIEW ... >
Hope you got my point.
Feel free for any query. :)
Try the Scroll Bars with out the Scrollview..
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginBottom="10dp"
android:layout_marginTop="30dp"
android:gravity="fill|fill_horizontal"
android:scrollbars="horizontal|vertical"
android:orientation="vertical" >
<TableRow
android:id="#+id/Row_User_Deletion"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#DF0101"
android:gravity="center" >
<TextView
android:id="#+id/user_creation_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/txt_delete_user_userDeletion"
android:textColor="#color/white"
android:textSize="15dp" />
</TableRow>
<TableRow
android:id="#+id/RowUserType"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="10dp" >
<TextView
android:id="#+id/txt_delete_user_selectuserType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="#string/txt_delete_user_selectuserType"
android:textColor="#424242" />
<Spinner
android:id="#+id/spin_delete_userType"
android:layout_width="120dp"
android:layout_height="50dp"
android:layout_marginBottom="5dp"
android:entries="#array/utype" />
<Button
android:id="#+id/btn_spinner_user_search_select"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginTop="5dp"
android:background="#drawable/redbtn"
android:text="#string/btn_delete_user_search_user" />
</TableRow>
<TableRow
android:id="#+id/deleteUserRow"
android:layout_width="match_parent"
android:layout_height="34dp"
android:layout_marginTop="10dp"
android:gravity="fill" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/txt_user_creation_userId"
android:textColor="#424242" />
<EditText
android:id="#+id/txt_user_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:ems="10" >
<requestFocus />
</EditText>
<Button
android:id="#+id/button1"
android:layout_width="55dp"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:background="#drawable/redbtn"
android:text="#string/btn_delete_user_search_user" />
</TableRow>
<TableLayout
android:id="#+id/delete_userDetails_Table"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="vertical"
android:stretchColumns="*" >
<TableRow
android:id="#+id/tableRow2"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:background="#color/red" >
<TextView
android:id="#+id/textView2"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:text="#string/txt_delete_user_select"
android:textColor="#color/white" />
<TextView
android:id="#+id/textView3"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:text="#string/txt_user_creation_userId"
android:textColor="#color/white" />
<TextView
android:id="#+id/textView4"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:text="#string/txt_user_creation_userName"
android:textColor="#color/white" />
<TextView
android:id="#+id/textView5"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:text="#string/txt_delete_user_UserRole"
android:textColor="#color/white" />
<TextView
android:id="#+id/textView5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/txt_componentmaster_createdDate"
android:textColor="#color/white" />
<TextView
android:id="#+id/textView5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/txt_componentmaster_createdBy"
android:textColor="#color/white" />
</TableRow>
</TableLayout>
</LinearLayout>
MY XMl code looks like :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="430dp"
android:fadingEdge="none"
>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#drawable/descriptionanth"
android:orientation="vertical"
android:id="#+id/searchjobslayout"
>
<ImageView android:id="#+id/homeimage_one" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_width="fill_parent" android:background="#drawable/logoblack"></ImageView>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="match_parent">
<TextView
android:id="#+id/keywords"
android:text="Search by keyword:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textStyle="bold"
android:textColor="#000000"
android:layout_marginLeft="10dp"
></TextView>
<EditText
android:id="#+id/keywordsedit"
android:hint=" Enter KeyWords"
android:layout_width="fill_parent"
android:layout_height="32dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:textSize="14sp"
android:background="#drawable/text_field"
android:layout_marginTop="5dp"
android:textColorHint="#FFFFFF"
android:paddingLeft="10dp"
android:textColor="#000000"
></EditText>
<Button
android:id="#+id/search"
android:text="Search"
android:layout_width="fill_parent"
android:layout_height="35dp"
android:textColor="#FFFFFF"
android:background="#drawable/buttonclick"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:textSize="20sp"
></Button>
<TextView
android:id="#+id/browseby"
android:text="Browse by:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textStyle="bold"
android:textColor="#000000"
android:layout_marginLeft="10dp"
android:paddingTop="10dp"></TextView>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<Button
android:id="#+id/jobsbycity"
android:text="City"
android:layout_width="fill_parent"
android:layout_height="30dp"
android:textColor="#FFFFFF"
android:background="#drawable/buttonclick"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:textStyle="bold"
android:textSize="15sp"
></Button>
<Button
android:id="#+id/jobsbytype"
android:text="Category"
android:layout_width="fill_parent"
android:layout_height="30dp"
android:textColor="#FFFFFF"
android:background="#drawable/buttonclick"
android:layout_below="#id/jobsbycity"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:textStyle="bold"
android:layout_marginTop="5dp"
android:textSize="15sp"
></Button>
<TextView
android:id="#+id/signin"
android:text="Signed in as"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
android:textColor="#000000"
android:layout_centerInParent="true"
android:gravity="center_horizontal"
android:layout_below="#id/jobsbytype"
android:paddingTop="10dp"></TextView>
<TextView
android:id="#+id/signinas"
android:text="mail_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
android:layout_centerInParent="true"
android:textColor="#000000"
android:gravity="center_horizontal"
android:layout_below="#id/signin"
android:paddingTop="5dp"></TextView>
<TextView
android:id="#+id/logout"
android:text="Sign out"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="13sp"
android:gravity="center_vertical"
android:textColor="#000000"
android:layout_below="#id/signinas"
android:layout_centerInParent="true"
android:layout_marginTop="20dp"
android:textStyle="bold" ></TextView>
</RelativeLayout>
</LinearLayout>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</ScrollView>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/tabbarbottom"
android:layout_gravity="bottom"
>
<Button
android:id="#+id/jobs"
android:text="About Us"
android:layout_width="100dp"
android:layout_height="fill_parent"
android:textColor="#drawable/white"
android:background="#android:color/transparent"
android:layout_alignParentBottom="true"
android:textStyle="bold"
android:textSize="12.5sp"
></Button>
<Button
android:id="#+id/aboutus"
android:text="Value"
android:layout_width="100dp"
android:layout_height="fill_parent"
android:textColor="#drawable/white"
android:layout_toRightOf="#id/jobs"
android:background="#android:color/transparent"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_alignParentBottom="true"
android:layout_marginLeft="10dp"
android:textStyle="bold"
android:textSize="12.5sp"
></Button>
<Button
android:id="#+id/benefits"
android:text="History"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="#drawable/white"
android:layout_toRightOf="#id/aboutus"
android:background="#android:color/transparent"
android:layout_centerVertical="true"
android:layout_alignParentBottom="true"
android:textStyle="bold"
android:textSize="12.5sp"
></Button>
</RelativeLayout>
</LinearLayout>
I want to place the relative layout (last relative layout which having 3 buttons it, after scrollview ) at the bottom my screen. but its not happening
what to do??
Edited: The happening is i statically placed the relative layout by specifying padding, when running in portrait mode i made it fix at bottom but when i changed to landscape its not at bottom. How to place relativelayout in bottom in either cases??
Thanks
Add following line to your Relative layout
android:layout_alignParentBottom="true"
This must be work.
Happy coding.
Here the solution I tested and which works :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" 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="100dp"
android:layout_weight="1.0" android:fadingEdge="none">
...
</ScrollView>
<RelativeLayout android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_height="60dip"
android:background="#drawable/tabbarbottom">
<Button android:id="#+id/jobs" android:text="About Us"
android:layout_width="100dp" android:layout_height="fill_parent"
...></Button>
<Button android:id="#+id/aboutus" android:text="Value"
android:layout_width="100dp" android:layout_height="fill_parent"
...></Button>
<Button android:id="#+id/benefits" android:text="History"
android:layout_width="fill_parent" android:layout_height="fill_parent" ...></Button>
</RelativeLayout>
</LinearLayout>
The first LinearLayout should have layout_height="fill_parent".
This way it takes up the whole screen.
The ScrollView should have a
small fixed height, and an extra android:layout_weight="1.0" : it
will take up whatever space is remaining.
The RelativeLayout should
have a fixed height (it will always take up the same space at the
bottom of the screen), and the Buttons inside of it should have
layout_height="fill_parent" (to have the same height as the
RelativeLayout).
Make parent layout as relative layout. layout which contain button put that on bottom using
android:layout_alignParentBottom="true"
This will work
In the ScrollView
android:fillViewport="false"
#Udaykiran Hey Your Code for XMl is ok please check here i put your code with some change and i found only one change in this Relative Layout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
please change this than try
here is xml with with out resources
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="vertical">
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="430dp"
android:fadingEdge="none">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:background="#drawable/splash_screen_large_long_land"
android:orientation="vertical" android:id="#+id/searchjobslayout">
<ImageView android:id="#+id/homeimage_one"
android:layout_height="wrap_content" android:layout_gravity="center_horizontal"
android:layout_width="fill_parent"></ImageView>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="vertical">
<TextView android:id="#+id/keywords" android:text="Search by keyword:"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" android:textStyle="bold" android:textColor="#000000"
android:layout_marginLeft="10dp"></TextView>
<EditText android:id="#+id/keywordsedit" android:hint=" Enter KeyWords"
android:layout_width="fill_parent" android:layout_height="32dp"
android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:textSize="14sp" android:layout_marginTop="5dp"
android:textColorHint="#FFFFFF" android:paddingLeft="10dp"
android:textColor="#000000"></EditText>
<Button android:id="#+id/search" android:text="Search"
android:layout_width="fill_parent" android:layout_height="35dp"
android:textColor="#FFFFFF" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginTop="5dp"
android:textSize="20sp"></Button>
<TextView android:id="#+id/browseby" android:text="Browse by:"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" android:textStyle="bold" android:textColor="#000000"
android:layout_marginLeft="10dp" android:paddingTop="10dp"></TextView>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button android:id="#+id/jobsbycity" android:text="City"
android:layout_width="fill_parent" android:layout_height="30dp"
android:textColor="#FFFFFF" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginTop="5dp"
android:textStyle="bold" android:textSize="15sp"></Button>
<Button android:id="#+id/jobsbytype" android:text="Category"
android:layout_width="fill_parent" android:layout_height="30dp"
android:textColor="#FFFFFF" android:layout_below="#id/jobsbycity"
android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:textStyle="bold" android:layout_marginTop="5dp"
android:textSize="15sp"></Button>
<TextView android:id="#+id/signin" android:text="Signed in as"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="12sp" android:textColor="#000000"
android:layout_centerInParent="true" android:gravity="center_horizontal"
android:layout_below="#id/jobsbytype" android:paddingTop="10dp"></TextView>
<TextView android:id="#+id/signinas" android:text="mail_id"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="12sp" android:layout_centerInParent="true"
android:textColor="#000000" android:gravity="center_horizontal"
android:layout_below="#id/signin" android:paddingTop="5dp"></TextView>
<TextView android:id="#+id/logout" android:text="Sign out"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="13sp" android:gravity="center_vertical"
android:textColor="#000000" android:layout_below="#id/signinas"
android:layout_centerInParent="true" android:layout_marginTop="20dp"
android:textStyle="bold"></TextView>
</RelativeLayout>
</LinearLayout>
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_gravity="bottom">
<Button android:id="#+id/jobs" android:text="About Us"
android:layout_width="100dp" android:layout_height="fill_parent"
android:background="#android:color/transparent"
android:layout_alignParentBottom="true" android:textStyle="bold"
android:textSize="12.5sp"></Button>
<Button android:id="#+id/aboutus" android:text="Value"
android:layout_width="100dp" android:layout_height="fill_parent"
android:layout_toRightOf="#id/jobs" android:background="#android:color/transparent"
android:layout_centerHorizontal="true" android:layout_centerVertical="true"
android:layout_alignParentBottom="true" android:layout_marginLeft="10dp"
android:textStyle="bold" android:textSize="12.5sp"></Button>
<Button android:id="#+id/benefits" android:text="History"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:layout_toRightOf="#id/aboutus" android:background="#android:color/transparent"
android:layout_centerVertical="true"
android:layout_alignParentBottom="true" android:textStyle="bold"
android:textSize="12.5sp"></Button>
</RelativeLayout>