scrollView with Button at Bottom of screen - android

I have to use a scroll view for the form data and a button that should be at the bottom of the screen. I have achieved it. but the problem is whenever the EditText gets focused and the keyboard is opened the button does not stay at the bottom of the screen it comes just above the android keyboard. I want it to be there at the bottom even when the keyboard is opened or not.
I have tried the android:fillViewport="true" with scroll view but it does not give a proper output.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="#+id/lout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
android:id="#+id/fout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="16dp"
android:paddingTop="10dp">
<ImageView
android:id="#+id/fimg"
android:layout_width="match_parent"
android:layout_height="250dp"
android:src="#drawable/addimg" />
<android.support.design.widget.TextInputLayout
android:id="#+id/vsubcusine"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="10dp"
>
<EditText
android:id="#+id/add_food_title"
style="#style/textbox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Title for Food"
android:inputType="text"
/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="#+id/vcusine"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="cusine"
android:paddingBottom="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="0dp">
<Spinner
android:id="#+id/cusine"
style="#style/textbox"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fff"
android:padding="10dp" />
</android.support.design.widget.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp">
<RadioGroup
android:id="#+id/isveg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="20dp">
<RadioButton
android:id="#+id/veg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="Veg" />
<RadioButton
android:id="#+id/nonveg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="Non-Veg" />
</RadioGroup>
</LinearLayout>
<android.support.design.widget.TextInputLayout
android:id="#+id/vfprice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="0dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="0dp"
>
<EditText
android:id="#+id/fprice"
style="#style/textbox"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="price"
android:inputType="number" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
android:id="#+id/t"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="2">
<Button
android:id="#+id/foodadd"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_weight="1"
android:background="#drawable/button"
android:text="ADD FOOD"
android:textColor="#FFF"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>

In manifest, Just Add android:windowSoftInputMode="adjustPan" to your corresponding activity tag:
<activity
android:name=".YourActivity"
android:windowSoftInputMode="adjustPan">
Output:
Hope this helps.

Related

Android: Next EditText focus with different views doesn't work properly

I have this widget:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="#+id/root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#android:color/white"
android:foreground="?attr/selectableItemBackground">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="horizontal"
android:padding="#dimen/keyline_1">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical">
<LinearLayout
android:id="#+id/title_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:orientation="vertical">
<TextView
android:id="#+id/title"
style="#style/WizardItemTitleView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:singleLine="true"/>
<TextView
android:id="#+id/subtitle"
android:textColor="#color/amber_200"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>
</LinearLayout>
<LinearLayout
android:id="#+id/info_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_toRightOf="#+id/title_layout"
android:layout_marginLeft="#dimen/keyline_1"
android:gravity="right"
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true">
<EditText
android:id="#+id/edit"
style="#style/WizardItemEditTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:maxLines="1"
android:singleLine="true"/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</FrameLayout>
This is my test layout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.example.anthony.myapplication.wizard.ItemWizardEditTextView
android:id="#+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="NOM"/>
<com.example.anthony.myapplication.wizard.ItemWizardEditTextView
android:id="#+id/brand1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="MARQUE 1"/>
<com.example.anthony.myapplication.wizard.ItemWizardEditTextView
android:id="#+id/brand2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="MARQUE 2"/>
<com.example.anthony.myapplication.wizard.ItemWizardEditTextView
android:id="#+id/brand3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="MARQUE 3"/>
</LinearLayout>
So if I set by default #+id/name edittext with a default value, then the next action can't perform on my next EditText. I don't know where is the focus.
Thank you very much for your help!
if you want focus on any of the edittext use
<requestfocus />
and its good to use visibility programmaticaly

ListView not Scrolling with parent LinearLayout?

I have a main ScrollView and then I have a child LinearLayout and that has ListView in it. I'm not sure why it is not scrolling. I read about how listview should not be inside scroll view, but I need my layout to scroll and then view the listview. I'm not sure if this is the proper approach. Please direct.
This works on my tablet with a large screen but not on my phone which has a smaller screen and you need to scroll to view the listview completely. The listview works if I use linear layout but then I don't see the listview completely because its on the bottom of the layout.
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fitsSystemWindows="true" >
<LinearLayout
android:id="#+id/user_info"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:paddingTop="46dp"
android:paddingLeft="24dp"
android:paddingRight="24dp" >
<Spinner
android:id="#+id/userTypeSpinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp" />
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<EditText android:id="#+id/fname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:hint="First Name"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp" >
<EditText android:id="#+id/lname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:hint="Last Name"/>
</android.support.design.widget.TextInputLayout>
<LinearLayout
android:id="#+id/staff_username"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone" >
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp" >
<EditText android:id="#+id/uname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:hint="Username"/>
</android.support.design.widget.TextInputLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/staff_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone" >
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp" >
<EditText android:id="#+id/upassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:hint="Password"/>
</android.support.design.widget.TextInputLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/staff_email"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone" >
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp" >
<EditText android:id="#+id/uemail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:hint="Email"/>
</android.support.design.widget.TextInputLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/staff_permissions"
android:layout_marginTop="8dp"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:visibility="gone"
>
<ListView
android:id="#+id/permission_list"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:fadeScrollbars="false"
/>
</LinearLayout>
<android.support.v7.widget.AppCompatButton
android:id="#+id/addUserBtn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginBottom="24dp"
android:padding="12dp"
android:text="#string/add_new_user"/>
</LinearLayout>
Same problem i had. This is my code. Check it out.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/login_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/login"
android:gravity="center"
android:orientation="vertical" >
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="250dp"
android:layout_height="270dp"
android:layout_marginTop="40dp"
android:gravity="center"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/username_login" />
<EditText
android:id="#+id/username_login"
android:layout_width="200dp"
android:layout_height="30dp"
android:background="#drawable/edit_text"
android:inputType="text"
android:paddingLeft="5dp"
android:paddingTop="2dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/password_login" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
Don't use scrollview as a parent. Just take scrollview inside parent layout i.e. LinearLayout or RelativeLayout.
Try to replace your ListView with LinearLayout and add same items(views) in this which you want to add in your listview

Scroll is not getting enabled

I have designed a signup screen in which I have a Scroll view , But Scroll view is not working.
I am not able to find why Scroll is not working , Help me with this.
Below is the code for reference:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="#+id/tool_bar"
layout="#layout/tool_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView
android:id="#+id/sign_up_profile_image"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:background="#drawable/shape_rectangle_rounded_corner"
android:padding="10dp"
android:scaleType="fitXY"
android:src="#drawable/icon_avatar" />
<RelativeLayout
android:id="#+id/container_two"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/container_three"
android:layout_below="#+id/sign_up_profile_image"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="20dp"
android:orientation="vertical">
<LinearLayout
android:id="#+id/first_last_name_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="100">
<ui.customviews.MaterialEditText
android:id="#+id/sign_up_first_name_edit_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="1dp"
android:layout_marginTop="2dp"
android:layout_weight="50"
android:hint="#string/first_name_hint"
android:imeOptions="actionNext"
android:inputType="textPersonName"
android:textSize="18sp"
app:baseColor="#363636"
app:floatingLabel="normal"
app:primaryColor="#000000" />
<customviews.MaterialEditText
android:id="#+id/sign_up_last_name_edit_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="1dp"
android:layout_marginTop="2dp"
android:layout_weight="50"
android:hint="#string/last_name_hint"
android:imeOptions="actionNext"
android:inputType="textPersonName"
android:textSize="18sp"
app:baseColor="#363636"
app:floatingLabel="normal"
app:primaryColor="#000000" />
</LinearLayout>
<ui.customviews.MaterialEditText
android:id="#+id/sign_up_email_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/first_last_name_container"
android:hint="#string/email"
android:imeOptions="actionNext"
android:inputType="textEmailAddress"
android:textSize="18sp"
app:baseColor="#363636"
app:floatingLabel="normal"
app:primaryColor="#000000"
/>
<ui.customviews.MaterialEditText
android:id="#+id/sign_up_password_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/sign_up_email_edit_text"
android:hint="#string/password"
android:imeOptions="actionDone"
android:inputType="textPassword"
android:textSize="18sp"
app:baseColor="#363636"
app:floatingLabel="normal"
app:primaryColor="#000000" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/container_three"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="#dimen/activity_vertical_margin">
<TextView
android:id="#+id/sign_up_terms_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:gravity="center_horizontal"
android:lineSpacingExtra="2dp"
android:lineSpacingMultiplier="1.2"
android:text="By signing up, you accept to the Terms and Conditions and Privacy Policy"
android:textColor="#6b6b6b"
android:textSize="14sp" />
<Button
android:id="#+id/sign_up_accept_button"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="#+id/sign_up_terms_text_view"
android:layout_marginLeft="#dimen/activity_vertical_margin"
android:layout_marginRight="#dimen/activity_vertical_margin"
android:background="#025961"
android:text="#string/accept_and_signup"
android:textColor="#android:color/white"
android:textSize="14sp" />
</RelativeLayout>
</RelativeLayout>
</ScrollView>
</LinearLayout>
Try Like this, Add inside Linear layout , it will Scroll till End of the Page.
<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">
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
// Your xml Code Put Here
</LinearLayout>
</ScrollView>
</Relativelayout>
solution can be change ScrollView to:
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
>
Then you should change nested's layout height as well

Modifying login Page design to make login button always visible

I have the following layout for login page,i need to reduce the spacing between each element,in short i need to move username,password and login button upwards of the screen ,that is when we open virtual keyboard the login button should be visible always,i tried using 'margintop=-negative value',its not working out.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:andriod="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/loginbackmain"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="vertical" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="#drawable/ic_launcher" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
android:gravity="top"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:gravity="top"
android:background="#drawable/loginformback"
android:orientation="vertical"
android:weightSum="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<EditText
android:id="#+id/editText1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:layout_weight="1"
android:drawableLeft="#android:drawable/ic_menu_day"
android:ems="10"
android:hint="username" >
<requestFocus />
</EditText>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="-30dp">
<EditText
android:id="#+id/editText2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:drawableLeft="#android:drawable/ic_menu_day"
android:ems="10"
android:hint="password"
android:inputType="textPassword" />
</LinearLayout>
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="5dp"
android:onClick="login"
android:text="Login"
andriod:background="#A0522D"/>
<ProgressBar
android:id="#+id/progressBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:visibility="invisible"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
Set
android:windowSoftInputMode="stateVisible|adjustPan"
in Android manifest file inside tag

How to modify layout to display input field when keyboard is shown?

I use the following layout
<?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="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:padding="10dp"
android:isScrollContainer="true">
<TextView
android:id="#+id/wizard4_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:scrollbars="vertical"
android:text="#string/wizard4_title"
android:textColor="#0088cc"
android:textSize="20sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="0dp"
android:orientation="vertical"
android:layout_weight="1">
<TextView
android:id="#+id/wizard4_text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:gravity="fill_horizontal"
android:scrollbars="vertical"
android:text="#string/wizard4_text1"
android:textSize="18sp" />
<EditText
android:id="#+id/wizard4_name"
android:hint="#string/wizard4_name_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<TextView
android:id="#+id/wizard4_text3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:gravity="fill_horizontal"
android:scrollbars="vertical"
android:text="#string/wizard4_text3"
android:textSize="18sp" />
<EditText
android:id="#+id/wizard4_address"
android:hint="#string/wizard4_address_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp">
<Button
android:id="#+id/wizard4_btn_back"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/wizard_back" />
<Button
android:id="#+id/wizard4_btn_next"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/wizard_next" />
</LinearLayout>
</LinearLayout>
It is displayed as part of ViewAnimator:
viewAnimator = new ViewAnimator(this);
...
View step4 = View.inflate(getBaseContext(), R.layout.wizard4, null);
viewAnimator.addView(step4);
setContentView(viewAnimator);
When user clicks on the second input field (wizard4_address), soft keyboard is display, which hides the input field. Currently buttons wizard4_btn_next and wizard4_btn_back are also displayed when keyboard is shown, I don't need it. But I should keep them always at the bottom.
Try this. Hope you will get what you want.
<?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="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:padding="10dp" >
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="#+id/wizard4_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:scrollbars="vertical"
android:text="#string/wizard4_title"
android:textColor="#0088cc"
android:textSize="20sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="0dp"
android:layout_weight="1"
android:orientation="vertical" >
<TextView
android:id="#+id/wizard4_text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:gravity="fill_horizontal"
android:scrollbars="vertical"
android:text="#string/wizard4_text1"
android:textSize="18sp" />
<EditText
android:id="#+id/wizard4_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="#string/wizard4_name_hint" />
<TextView
android:id="#+id/wizard4_text3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:gravity="fill_horizontal"
android:scrollbars="vertical"
android:text="#string/wizard4_text3"
android:textSize="18sp" />
<EditText
android:id="#+id/wizard4_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="#string/wizard4_address_hint" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp" >
<Button
android:id="#+id/wizard4_btn_back"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/wizard_back" />
<Button
android:id="#+id/wizard4_btn_next"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/wizard_next" />
</LinearLayout>

Categories

Resources