Scrollview is not working when a linear layout inside it - android

I just put a linear layout inside a scrollview dont know why its not working.
When the keyboard is open the scrollbar is not showing at all. When i move one text box to another there is a submit button which is not show when i run on small size devices.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/white"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/white"
android:orientation="vertical">
<RelativeLayout
android:id="#+id/layoutPopUp"
android:layout_width="match_parent"
android:layout_height="79dp"
android:background="#F57F20"
android:paddingBottom="20dp"
android:paddingTop="20dp"
android:visibility="visible">
<LinearLayout
android:id="#+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">
<LinearLayout
android:id="#+id/backlayout"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:orientation="horizontal">
<ImageButton
android:id="#+id/btnBackbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:background="#color/transparent"
android:gravity="center"
android:src="#drawable/back"
android:visibility="visible" />
<TextView
android:id="#+id/textBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:gravity="center"
android:text="Back"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="15sp" />
</LinearLayout>
<TextView
android:id="#+id/textTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.6"
android:gravity="center"
android:text="Contact Us"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp"
android:textStyle="bold" />
<ImageButton
android:id="#+id/imagePopUp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="0.2"
android:background="#color/transparent"
android:gravity="center"
android:src="#drawable/menu"
android:visibility="visible" />
</LinearLayout>
</RelativeLayout>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<EditText
android:id="#+id/editTextName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="#drawable/editboxshap"
android:ems="10"
android:hint="Name"
android:inputType="textPersonName"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#2b2b2b"
android:textColorHint="#2b2b2b"
android:textCursorDrawable="#color/black">
<requestFocus />
</EditText>
<EditText
android:id="#+id/editPhone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="#drawable/editboxshap"
android:ems="10"
android:hint="Phone No."
android:inputType="phone"
android:maxLength="12"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#2b2b2b"
android:textColorHint="#2b2b2b"
android:textCursorDrawable="#color/black" />
<EditText
android:id="#+id/editEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="#drawable/editboxshap"
android:ems="10"
android:hint="E-mail"
android:inputType="textEmailAddress"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#2b2b2b"
android:textColorHint="#2b2b2b"
android:textCursorDrawable="#color/black" />
<EditText
android:id="#+id/editComment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="#drawable/editboxshap"
android:ems="10"
android:gravity="start"
android:hint="Comments"
android:inputType="textMultiLine"
android:lines="3"
android:maxLength="500"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#2b2b2b"
android:textColorHint="#2b2b2b"
android:textCursorDrawable="#color/black" />
<Button
android:id="#+id/btnSubmit"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="20dp"
android:background="#drawable/button_shape"
android:text="SUBMIT"
android:textColor="#color/white" />
</LinearLayout>
</ScrollView>
</LinearLayout>

try to put scrollview inside another linear layout and try

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/parentLin"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="//define in dp"
android:scrollbars="vertical"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<EditText
android:id="#+id/editTextName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="#drawable/editboxshap"
android:textColorHint="#2b2b2b"
android:textColor="#2b2b2b"
android:ems="10"
android:hint="Name"
android:inputType="textPersonName"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium">
<requestFocus />
</EditText>
<EditText
android:id="#+id/editPhone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="#drawable/editboxshap"
android:ems="10"
android:textColor="#2b2b2b"
android:hint="Phone No."
android:inputType="phone"
android:textColorHint="#2b2b2b"
android:maxLength="12"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="#drawable/editboxshap"
android:textColor="#2b2b2b"
android:ems="10"
android:textColorHint="#2b2b2b"
android:hint="E-mail"
android:inputType="textEmailAddress"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editComment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="#drawable/editboxshap"
android:ems="10"
android:gravity="start"
android:textColor="#2b2b2b"
android:hint="Comments"
android:textColorHint="#2b2b2b"
android:inputType="textMultiLine"
android:lines="3"
android:maxLength="500"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
</ScrollView>
<RelativeLayout
android:id="#+id/footer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="center">
<Button
android:id="#+id/btnSubmit"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="5dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#drawable/button_shape"
android:text="SUBMIT"
android:textColor="#color/white" />
</RelativeLayout>
</RelativeLayout>
and You have to specify the following line of code in the manifest file with your activity
android:windowSoftInputMode="adjustResize"

try This.. on your activity / fragment
getActivity().getWindow()
.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE |
WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);

Related

Adjusting Widgets in a Layout

Hey I have a ScrollView which allow users to input their credentials in the EditTexts inside. But there's one problem, one of the TextViews prior to its EditText consist of a Spinner but I do not know how to make that Spinner and the TextView side by side. Any help will be appreciated, thanks!:)
My xml:
<ScrollView
android:layout_width="344dp"
android:layout_height="495dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
tools:layout_editor_absoluteX="8dp"
tools:layout_editor_absoluteY="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="#+id/textView39"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Billing Address"
android:textSize="30dp" />
<TextView
android:id="#+id/textView38"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:layout_marginTop="20dp"
android:text="First Name"
android:textSize="16dp" />
<EditText
android:id="#+id/editText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:ems="10"
android:inputType="textPersonName" />
<TextView
android:id="#+id/textView40"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:layout_marginTop="10dp"
android:text="Last Name"
android:textSize="16dp" />
<EditText
android:id="#+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:ems="10"
android:inputType="textPersonName" />
<TextView
android:id="#+id/textView41"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:layout_marginTop="10dp"
android:text="Street"
android:textSize="16dp" />
<EditText
android:id="#+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:ems="10"
android:inputType="textPostalAddress" />
<TextView
android:id="#+id/textView42"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Country"
android:layout_marginLeft="70dp"
android:layout_marginTop="10dp"
android:textSize="16dp" />
<Spinner
android:id="#+id/spinner2"
android:layout_width="50dp"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
Try this,
<?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">
<ScrollView
tools:layout_editor_absoluteX="8dp"
tools:layout_editor_absoluteY="8dp"
android:layout_width="344dp"
android:layout_height="495dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="#+id/textView39"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Billing Address"
android:textSize="30dp" />
<TextView
android:id="#+id/textView38"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:layout_marginTop="20dp"
android:text="First Name"
android:textSize="16dp" />
<EditText
android:id="#+id/editText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:ems="10"
android:inputType="textPersonName" />
<TextView
android:id="#+id/textView40"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:layout_marginTop="10dp"
android:text="Last Name"
android:textSize="16dp" />
<EditText
android:id="#+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:ems="10"
android:inputType="textPersonName" />
<TextView
android:id="#+id/textView41"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:layout_marginTop="10dp"
android:text="Street"
android:textSize="16dp" />
<EditText
android:id="#+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:ems="10"
android:inputType="textPostalAddress" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp">
<TextView
android:id="#+id/textView42"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:text="Country"
android:textSize="16dp" />
<Spinner
android:id="#+id/spinner2"
android:layout_width="50dp"
android:layout_marginLeft="30dp"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
Use Linear Layout after Edittext3 as:
<!--Use dimensions of your choice-->
<LinearLayout
android:orientation="horizontal"
<!-- TO display in center use android:layout_gravity="center" -->
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginTop="10dp">
<TextView
android:id="#+id/textView42"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Country"
android:layout_marginLeft="70dp"
android:textSize="16dp" />
<Spinner
android:id="#+id/spinner2"
android:layout_width="50dp"
android:layout_marginLeft="10dp"
android:layout_height="wrap_content" />
</LinearLayout>

Layout size too big compared to preview only in htc devices

I am facing this strange issue with my layout that too only in htc devices.
This is how the original layout looks
This is how it looks in device
This is the xml code for the following
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/relative"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="#+id/topRl"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="#color/white">
<Button
android:id="#+id/backBtn"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:background="#drawable/back_arrow" />
<TextView
android:id="#+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:text="#string/register_heading"
android:textColor="#color/black"
android:textSize="#dimen/text_size_for_heading" />
</RelativeLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="3px"
android:background="#drawable/shadow_down"
/>
<ScrollView
android:id="#+id/scroll"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="#+id/mainLinear"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:gravity="center_horizontal"
android:orientation="vertical">
<Button
android:id="#+id/registerWithFacebookBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20px"
android:background="#drawable/blue_dark_btn_selector"
android:text="#string/register_with_facebook"
android:textColor="#drawable/white_color_selector"
android:textSize="#dimen/text_18sp" />
<LinearLayout
android:id="#+id/etLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:gravity="center_horizontal"
android:orientation="vertical"
>
<EditText
android:id="#+id/firstNameEt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="#string/first_name"
android:imeOptions="actionNext"
android:inputType="textPersonName|textNoSuggestions|textCapSentences"
android:maxLines="1"
android:textColor="#color/edit_text_text_color"
android:textColorHint="#color/edit_text_hint_color"
android:textCursorDrawable="#drawable/color_cursor"
android:textSize="#dimen/text_size_edit_text" />
<EditText
android:id="#+id/lastNameEt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5px"
android:hint="#string/last_name"
android:inputType="textPersonName|textNoSuggestions|textCapSentences"
android:maxLines="1"
android:textColor="#color/edit_text_text_color"
android:textColorHint="#color/edit_text_hint_color"
android:textCursorDrawable="#drawable/color_cursor"
android:textSize="#dimen/text_size_edit_text" />
<!--<RelativeLayout
android:id="#+id/rlCountryCode"
android:layout_width="150px"
android:layout_height="#dimen/edit_text_height"
android:layout_alignParentLeft="true">
<TextView
android:id="#+id/tvCountryCode"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="5px"
android:background="#drawable/edit_text_bg"
android:gravity="center"
android:paddingLeft="20px"
android:paddingRight="20px"
android:singleLine="true"
android:textColor="#color/edit_text_text_color"
android:textColorHint="#color/edit_text_hint_color"
android:textSize="#dimen/text_size_edit_text" />
<Button
android:id="#+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="14px"
android:layout_height="11px"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10px"
android:background="#drawable/down_arrow_btn_selector"
android:clickable="false"
android:duplicateParentState="true" />
</RelativeLayout>-->
<EditText
android:id="#+id/phoneNoEt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="5px"
android:layout_toRightOf="#+id/rlCountryCode"
android:digits="0123456789"
android:hint="#string/phone_number"
android:inputType="phone|textNoSuggestions"
android:maxLength="10"
android:singleLine="true"
android:textColor="#color/edit_text_text_color"
android:textColorHint="#color/edit_text_hint_color"
android:textCursorDrawable="#drawable/color_cursor"
android:textSize="#dimen/text_size_edit_text" />
<EditText
android:id="#+id/emailIdEt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5px"
android:hint="#string/email_id"
android:inputType="textEmailAddress"
android:singleLine="true"
android:textColor="#color/edit_text_text_color"
android:textColorHint="#color/edit_text_hint_color"
android:textCursorDrawable="#drawable/color_cursor"
android:textSize="#dimen/text_size_edit_text" />
<EditText
android:id="#+id/passwordEt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5px"
android:hint="#string/password"
android:inputType="textPassword"
android:singleLine="true"
android:textColor="#color/edit_text_text_color"
android:textColorHint="#color/edit_text_hint_color"
android:textCursorDrawable="#drawable/color_cursor"
android:textSize="#dimen/text_size_edit_text" />
<EditText
android:id="#+id/confirmPasswordEt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5px"
android:hint="#string/confirm_password"
android:inputType="textPassword"
android:singleLine="true"
android:textColor="#color/edit_text_text_color"
android:textColorHint="#color/edit_text_hint_color"
android:textCursorDrawable="#drawable/color_cursor"
android:textSize="#dimen/text_size_edit_text" />
<EditText
android:id="#+id/aboutUsET"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5px"
android:hint="#string/hear_about_us"
android:inputType="textEmailAddress"
android:singleLine="true"
android:textColor="#color/edit_text_text_color"
android:textColorHint="#color/edit_text_hint_color"
android:textCursorDrawable="#drawable/color_cursor"
android:textSize="#dimen/text_size_edit_text" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="3dp"
android:layout_marginLeft="20px"
android:layout_marginRight="20px"
android:paddingTop="5dp">
<CheckBox
android:id="#+id/agree_chk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="#drawable/check_box_selector"
android:padding="5dp"
android:text="#string/agree_text"
android:textColor="#color/black"
android:textSize="12sp"
android:textStyle="bold"/>
<TextView
android:id="#+id/terms_of_use_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/terms_of_use"
android:textColor="#color/black"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="#+id/and_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="and"
android:textColor="#color/black"
android:textSize="12sp"
android:textStyle="bold"/>
</LinearLayout>
<TextView
android:id="#+id/privacy_policy_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="40dp"
android:text="#string/privacy_policy"
android:textColor="#color/black"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
<Button
android:id="#+id/signUpBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/btn_corner_margin"
android:layout_marginTop="#dimen/btn_corner_margin"
android:background="#drawable/blue_dark_btn_selector"
android:text="#string/register"
android:textColor="#drawable/btn_text_color_selector"
android:textSize="#dimen/button_text_size"
/>
</LinearLayout>
</ScrollView>
</LinearLayout>
I tried creating different layout according to different screen sizes but it still looks the same with no effect at all. I also have proper drawables in different folders.

How to fix background image with scrollView and textviews with edittext

How to fix background image with scrollview when windowSoftInputMode appears.
I used windowSoftInputMode="adjustPan",but scrollview doesn't work
completely, please help me. Last fields do not appear when virtual keyboard
appears.
I want that background image should not scroll up with virtual keyboard
and scrollview should show all the fields inside it while scrolling.
Here is my code
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#drawable/back">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/cancel_done_btn"
android:layout_marginLeft="30dp"
android:layout_marginTop="40dp"
android:textSize="17dp"
android:paddingTop="10dp"
android:textStyle="bold"
android:paddingBottom="10dp"
android:paddingLeft="28dp"
android:paddingRight="28dp"
android:text="#string/cancel"
android:id="#+id/btn_cancel_signin"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/cancel_done_btn"
android:layout_marginRight="30dp"
android:layout_marginTop="40dp"
android:textSize="17dp"
android:text="#string/done"
android:paddingTop="10dp"
android:textStyle="bold"
android:paddingBottom="10dp"
android:paddingLeft="35dp"
android:paddingRight="35dp"
android:layout_alignParentRight="true"
android:id="#+id/btn_done_signin"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="120dp"
android:layout_marginLeft="40dp"
android:orientation="vertical"
android:layout_below="#+id/btn_cancel_signin">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="times new roman"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Tuesday,May"
android:textSize="25dp"
android:textStyle="bold"
android:id="#+id/tv_day_month" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="times new roman"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text=" 7,2016"
android:textSize="25dp"
android:textStyle="bold"
android:id="#+id/tv_date" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="200dp"
android:layout_marginLeft="130dp"
android:layout_below="#+id/btn_cancel_signin">
<ImageView
android:id="#+id/iv_signin_logo"
android:layout_width="200dp"
android:layout_height="180dp"
android:src="#drawable/sign_in_logo"
android:layout_marginTop="10dp" />
</LinearLayout>
<ScrollView
android:layout_width="350dp"
android:layout_height="wrap_content"
android:id="#+id/scroller_sign_in"
android:layout_below="#+id/btn_done_signin"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true">
<LinearLayout
android:orientation="vertical"
android:paddingLeft="10dp"
android:layout_marginRight="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="30dp">
<TextView
android:layout_height="wrap_content"
android:text="First Name"
style="#style/sign_in_text"
android:id="#+id/label_firstname"
android:layout_alignParentLeft="true"
android:paddingTop="10dp"
android:inputType="textCapWords"
/>
<AutoCompleteTextView
android:id="#+id/et_firstname"
android:hint="Required"
android:ems="10"
android:textSize="20dp"
android:padding="10dp"
android:layout_width="160dp"
android:background="#drawable/et_border"
android:layout_height="wrap_content"
android:inputType="textCapWords"
android:layout_alignParentRight="true"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
>
<TextView
android:layout_height="wrap_content"
android:text="Last Name"
android:layout_width="wrap_content"
android:paddingRight="10dp"
android:gravity="left"
android:id="#+id/label_lastname"
android:paddingTop="10dp"
android:layout_alignParentLeft="true"
android:inputType="textCapWords"
/>
<AutoCompleteTextView
android:id="#+id/et_lastname"
android:hint="Required"
android:ems="10"
android:textSize="20dp"
android:textAllCaps="true"
android:padding="10dp"
android:layout_width="160dp"
android:background="#drawable/et_border"
android:layout_alignParentRight="true"
android:layout_height="wrap_content"
android:inputType="textCapWords"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
android:id="#+id/ll_company"
>
<TextView
android:layout_height="wrap_content"
android:text="Company"
android:layout_width="wrap_content"
android:paddingRight="10dp"
android:gravity="left"
android:layout_marginTop="10dp"
android:id="#+id/label_company"
android:layout_alignParentLeft="true"
/>
<AutoCompleteTextView
android:id="#+id/et_company"
android:ems="10"
android:textSize="20dp"
android:padding="10dp"
android:textAllCaps="true"
android:layout_width="160dp"
android:background="#drawable/et_border"
android:layout_height="wrap_content"
android:inputType="textCapWords"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<!--android:background="#drawable/contact_edittext_bg"-->
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
android:id="#+id/ll_address"
>
<TextView
android:layout_height="wrap_content"
android:text="Address"
android:layout_width="wrap_content"
android:paddingRight="10dp"
android:gravity="left"
android:id="#+id/label_address"
android:paddingTop="15dp"
/>
<AutoCompleteTextView
android:id="#+id/et_address"
android:ems="10"
android:textSize="20dp"
android:padding="10dp"
android:layout_width="160dp"
android:background="#drawable/et_border"
android:layout_height="wrap_content"
android:inputType="textCapWords"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
android:id="#+id/ll_city"
>
<TextView
android:layout_width="wrap_content"
android:paddingRight="10dp"
android:gravity="left"
android:layout_height="wrap_content"
android:text="City"
android:id="#+id/label_city"
android:paddingTop="15dp"
/>
<AutoCompleteTextView
android:id="#+id/et_city"
android:ems="10"
android:textSize="20dp"
android:padding="10dp"
android:layout_width="160dp"
android:background="#drawable/et_border"
android:layout_alignParentRight="true"
android:layout_height="wrap_content"
android:inputType="textCapWords"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
android:id="#+id/ll_state"
>
<AutoCompleteTextView
android:id="#+id/et_state"
android:ems="10"
android:textSize="20dp"
android:padding="10dp"
android:layout_width="160dp"
android:background="#drawable/et_border"
android:layout_alignParentRight="true"
android:layout_height="wrap_content"
android:inputType="textCapWords"/>
<TextView
android:layout_height="wrap_content"
android:text="State"
style="#style/sign_in_text"
android:id="#+id/label_state"
android:paddingTop="15dp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
android:id="#+id/ll_zip_code"
>
<TextView
android:layout_height="wrap_content"
android:text="Zip Code"
android:layout_width="wrap_content"
android:paddingRight="10dp"
android:gravity="left"
android:id="#+id/label_zip_code"
android:paddingTop="15dp"
/>
<AutoCompleteTextView
android:id="#+id/et_zipcode"
android:ems="10"
android:layout_width="160dp"
android:background="#drawable/et_border"
android:textSize="20dp"
android:padding="10dp"
android:layout_height="wrap_content"
android:inputType="number"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
remove this from xml.
android:background="#drawable/back"
Write in your java file.
getWindow().setBackgroundDrawableResource(R.drawable.back);

xml layout look different

The layout look nice in Android Studio but the design slightly run when running in real device.
Android Studio
Real device
Can someone tell me what's wrong here ? Any help would be greatly appreciated. Below is my xml layout code.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/bg_login"
android:gravity="center"
android:orientation="vertical"
android:padding="10dp">
<EditText
android:id="#+id/name"
android:layout_width="325dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:background="#color/white"
android:hint="#string/hint_name"
android:inputType="textPassword"
android:padding="10dp"
android:singleLine="true"
android:textColor="#color/input_login"
android:textColorHint="#color/input_login_hint" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingRight="20dp" >
<EditText
android:id="#+id/password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:background="#color/white"
android:hint="#string/hint_password"
android:inputType="textPassword"
android:padding="10dp"
android:singleLine="true"
android:textColor="#color/input_login"
android:textColorHint="#color/input_login_hint" />
<!-- Login Button -->
<Button
android:id="#+id/btnLogin"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dip"
android:background="#color/btn_login_bg"
android:text="#string/btn_login"
android:textColor="#color/btn_login" />
<Button
android:layout_width="327dp"
android:layout_height="33dp"
android:id="#+id/forget"
android:background="#null"
android:textColor="#color/white"
android:text="Forget Password ?"
android:textSize="12dp"
android:paddingLeft="150dp"
android:textAllCaps="false"
/>
<Button
android:id="#+id/btnLinkToRegisterScreen"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="#null"
android:text="Create account"
android:textAllCaps="false"
android:textColor="#color/white"
android:textSize="15dp" />
</LinearLayout>
</LinearLayout>
You need to put name edit text out of the inner linear layout, just update your xml as follows:-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/bg_login"
android:gravity="center"
android:orientation="vertical"
android:padding="10dp">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingRight="20dp" >
<EditText
android:id="#+id/name"
android:layout_width="325dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:background="#color/white"
android:hint="#string/hint_name"
android:inputType="textPassword"
android:padding="10dp"
android:singleLine="true"
android:textColor="#color/input_login"
android:textColorHint="#color/input_login_hint" />
<EditText
android:id="#+id/password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:background="#color/white"
android:hint="#string/hint_password"
android:inputType="textPassword"
android:padding="10dp"
android:singleLine="true"
android:textColor="#color/input_login"
android:textColorHint="#color/input_login_hint" />
<!-- Login Button -->
<Button
android:id="#+id/btnLogin"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dip"
android:background="#color/btn_login_bg"
android:text="#string/btn_login"
android:textColor="#color/btn_login" />
<Button
android:layout_width="327dp"
android:layout_height="33dp"
android:id="#+id/forget"
android:background="#null"
android:textColor="#color/white"
android:text="Forget Password ?"
android:textSize="12dp"
android:paddingLeft="150dp"
android:textAllCaps="false"
/>
<Button
android:id="#+id/btnLinkToRegisterScreen"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="#null"
android:text="Create account"
android:textAllCaps="false"
android:textColor="#color/white"
android:textSize="15dp" />
</LinearLayout></LinearLayout>
problem is that there is un even padding given to the editText for the password and email,
try this out
<?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="#android:color/holo_blue_dark"
android:gravity="center"
android:orientation="vertical"
android:padding="20dp">
<EditText
android:id="#+id/editText2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="15dp"
android:background="#android:color/holo_purple"
android:ems="10"
android:hint="username"
android:inputType="textEmailAddress" />
<EditText
android:id="#+id/editText3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="15dp"
android:layout_marginTop="15dp"
android:background="#android:color/holo_purple"
android:ems="10"
android:hint="password"
android:inputType="textPassword" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="15dp"
android:background="#android:color/darker_gray"
android:text="Login"
android:textAllCaps="false" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="#android:color/transparent"
android:text="Forgot password"
android:textAllCaps="false" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="10dp"
android:background="#android:color/transparent"
android:text="Create Account"
android:textAllCaps="false" />
</LinearLayout>
output
this will remain same for all the screens

Android: layout_below and layout_alignParentBottom

So I have the following layout
ScrollView
RelativeLayout
TextView1
EditText1
TextView2
EditText2
TextView3
EditText3
TextView4
EditText4
TextView5
EditText5:
android:id="#+id/txtPassword"
LinearLayout:
android:id="#+id/Linearlayout1"
layout_alignParentBottom="true"
Button1
Button2
Here's the problem
When I click the txtPassword EditText to enter some text Button1&Button2 from the LinearLayout overlaps or becomes on top of txtPassword
Someone suggested that I use android:layout_below="#id/txtPassword" for the Linear Layout but that makes the layout_alignParentBottom="true" useless because it will put the LinearLayout right below txtPassword and not at the bottom.
EDIT: Here's the Full Layout
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/signatureScroller"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true" >
<RelativeLayout
android:id="#+id/signatureLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFF"
android:orientation="vertical"
android:paddingBottom="20dp"
android:paddingLeft="10dp"
android:paddingRight="10dp" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="20dp"
android:text="#string/Meaning"
android:textColor="#000"
android:textSize="14sp" />
<EditText
android:id="#+id/txtMeaning"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView1"
android:layout_below="#+id/textView1"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="16dp"
android:ems="10"
android:enabled="false"
android:inputType="text|textMultiLine"
android:singleLine="true"
android:textColor="#505050"
android:textSize="14sp" >
</EditText>
<TextView
android:id="#+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView1"
android:layout_below="#+id/txtMeaning"
android:layout_marginTop="16dp"
android:text="#string/Comments"
android:textColor="#000"
android:textSize="14sp" />
<EditText
android:id="#+id/txtSignatureComments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/TextView01"
android:layout_below="#+id/TextView01"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="16dp"
android:ems="10"
android:hint="#string/Comments"
android:inputType="textMultiLine"
android:maxLength="250"
android:singleLine="false"
android:textSize="14sp" />
<ImageView
android:id="#+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView1"
android:layout_below="#+id/textView1"
android:layout_marginTop="4dp"
android:contentDescription="#string/Image"
android:scaleType="fitXY"
android:src="#drawable/line2" />
<ImageView
android:id="#+id/ImageView01"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/TextView01"
android:layout_below="#+id/TextView01"
android:layout_marginTop="4dp"
android:contentDescription="#string/Image"
android:scaleType="fitXY"
android:src="#drawable/line2" />
<TextView
android:id="#+id/txtDuration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/txtSignatureComments"
android:layout_marginTop="16dp"
android:text="#string/Duration2"
android:textColor="#000"
android:textSize="14sp" />
<ImageView
android:id="#+id/imgDuration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/txtDuration"
android:layout_marginTop="4dp"
android:contentDescription="#string/Image"
android:scaleType="fitXY"
android:src="#drawable/line2" />
<EditText
android:id="#+id/txtHours"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/imgDuration"
android:layout_marginLeft="6dp"
android:layout_marginTop="16dp"
android:ems="10"
android:hint="#string/Hours"
android:inputType="number|textMultiLine"
android:singleLine="true"
android:textColor="#505050"
android:textSize="14sp" >
</EditText>
<EditText
android:id="#+id/txtMinutes"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/txtHours"
android:layout_alignParentRight="true"
android:layout_marginRight="6dp"
android:ems="10"
android:hint="#string/Minutes"
android:inputType="numberDecimal|text|textMultiLine"
android:singleLine="true"
android:textColor="#505050"
android:textSize="14sp" >
</EditText>
<TextView
android:id="#+id/txtException"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/txtHours"
android:layout_marginTop="16dp"
android:text="#string/Exception"
android:textColor="#000"
android:textSize="14sp" />
<ImageView
android:id="#+id/imgException"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/txtException"
android:layout_marginTop="4dp"
android:contentDescription="#string/Image"
android:scaleType="fitXY"
android:src="#drawable/line2" />
<Spinner
android:id="#+id/spnrException"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/imgException"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="16dp" />
<EditText
android:id="#+id/txtExceptionDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/spnrException"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="8dp"
android:ems="10"
android:inputType="textMultiLine"
android:maxLength="250"
android:singleLine="false"
android:textSize="14sp" >
</EditText>
<TextView
android:id="#+id/txtPerformance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/txtExceptionDesc"
android:layout_marginTop="16dp"
android:text="#string/PerformanceBased"
android:textColor="#000"
android:textSize="14sp" />
<ImageView
android:id="#+id/imgPerformance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/txtPerformance"
android:layout_marginTop="4dp"
android:contentDescription="#string/Image"
android:scaleType="fitXY"
android:src="#drawable/line2" />
<Spinner
android:id="#+id/spnrPerformance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/imgPerformance"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="16dp" />
<EditText
android:id="#+id/txtUsername"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/spnrPerformance"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="60dp"
android:ems="10"
android:hint="#string/Username"
android:inputType="textCapCharacters|textAutoComplete"
android:singleLine="true"
android:textAllCaps="true"
android:textSize="12sp" >
</EditText>
<EditText
android:id="#+id/txtPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/txtUsername"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="10dp"
android:ems="10"
android:hint="#string/Password"
android:inputType="textPassword"
android:singleLine="true"
android:textSize="12sp" />
<LinearLayout
android:id="#+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<Button
android:id="#+id/btnSave"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#drawable/button_detail_bg"
android:text="#string/Sign"
android:textColor="#drawable/button_detail_txt"
android:textSize="16sp"
android:textStyle="bold" />
<Button
android:id="#+id/btnCancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#drawable/button_detail_bg"
android:text="#string/Cancel"
android:textColor="#drawable/button_detail_txt"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
You might want to see if this can be fixed using different windowSoftInputMode settings. You could try to set
android:windowSoftInputMode="adjustPan" for this specific activity. It will than move up the UI if the keyboard is visible and focused on a edittext.
adjustResize can have the effect that some views overlap when the keyboard is visible.
use android:layout_below="#id/txtPassword" for the LinearLayout will work and doesn't make alignparentbottom="true" useless.
try it
<LinearLayout
android:id="#+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
layout_below="#id/txtPassword"
android:layout_alignParentBottom="true" >
When you use a Relative Layout and the Keyboard will be opened you LinearLayout will be above the keyboard
I'll suggest another solution and I think it will work:
Use a LinearLayout as parent and the last LinearLayout height fill parent and set the gravity bottom try this:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/signatureScroller"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true" >
<LinearLayout
android:id="#+id/signatureLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFF"
android:orientation="vertical"
android:paddingBottom="20dp"
android:paddingLeft="10dp"
android:paddingRight="10dp" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="#string/Meaning"
android:textColor="#000"
android:textSize="14sp" />
<EditText
android:id="#+id/txtMeaning"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="16dp"
android:ems="10"
android:enabled="false"
android:inputType="text|textMultiLine"
android:singleLine="true"
android:textColor="#505050"
android:textSize="14sp" >
</EditText>
<TextView
android:id="#+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="16dp"
android:text="#string/Comments"
android:textColor="#000"
android:textSize="14sp" />
<EditText
android:id="#+id/txtSignatureComments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="16dp"
android:ems="10"
android:hint="#string/Comments"
android:inputType="textMultiLine"
android:maxLength="250"
android:singleLine="false"
android:textSize="14sp" />
<ImageView
android:id="#+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="4dp"
android:contentDescription="#string/Image"
android:scaleType="fitXY"
android:src="#drawable/line2" />
<ImageView
android:id="#+id/ImageView01"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="4dp"
android:contentDescription="#string/Image"
android:scaleType="fitXY"
android:src="#drawable/line2" />
<TextView
android:id="#+id/txtDuration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="16dp"
android:text="#string/Duration2"
android:textColor="#000"
android:textSize="14sp" />
<ImageView
android:id="#+id/imgDuration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="4dp"
android:contentDescription="#string/Image"
android:scaleType="fitXY"
android:src="#drawable/line2" />
<EditText
android:id="#+id/txtHours"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="6dp"
android:layout_marginTop="16dp"
android:ems="10"
android:hint="#string/Hours"
android:inputType="number|textMultiLine"
android:singleLine="true"
android:textColor="#505050"
android:textSize="14sp" >
</EditText>
<EditText
android:id="#+id/txtMinutes"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/txtHours"
android:layout_gravity="right"
android:layout_marginRight="6dp"
android:ems="10"
android:hint="#string/Minutes"
android:inputType="numberDecimal|text|textMultiLine"
android:singleLine="true"
android:textColor="#505050"
android:textSize="14sp" >
</EditText>
<TextView
android:id="#+id/txtException"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="16dp"
android:text="#string/Exception"
android:textColor="#000"
android:textSize="14sp" />
<ImageView
android:id="#+id/imgException"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="4dp"
android:contentDescription="#string/Image"
android:scaleType="fitXY"
android:src="#drawable/line2" />
<Spinner
android:id="#+id/spnrException"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="16dp" />
<EditText
android:id="#+id/txtExceptionDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="8dp"
android:ems="10"
android:inputType="textMultiLine"
android:maxLength="250"
android:singleLine="false"
android:textSize="14sp" >
</EditText>
<TextView
android:id="#+id/txtPerformance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="16dp"
android:text="#string/PerformanceBased"
android:textColor="#000"
android:textSize="14sp" />
<ImageView
android:id="#+id/imgPerformance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="4dp"
android:contentDescription="#string/Image"
android:scaleType="fitXY"
android:src="#drawable/line2" />
<Spinner
android:id="#+id/spnrPerformance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="16dp" />
<EditText
android:id="#+id/txtUsername"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="60dp"
android:ems="10"
android:hint="#string/Username"
android:inputType="textCapCharacters|textAutoComplete"
android:singleLine="true"
android:textAllCaps="true"
android:textSize="12sp" >
</EditText>
<EditText
android:id="#+id/txtPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/txtUsername"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="10dp"
android:ems="10"
android:hint="#string/Password"
android:inputType="textPassword"
android:singleLine="true"
android:textSize="12sp" />
<LinearLayout
android:id="#+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<Button
android:id="#+id/btnSave"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#drawable/button_detail_bg"
android:text="#string/Sign"
android:textColor="#drawable/button_detail_txt"
android:textSize="16sp"
android:textStyle="bold"
android:layout_gravity="bottom"
android:gravity="bottom" />
<Button
android:id="#+id/btnCancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#drawable/button_detail_bg"
android:text="#string/Cancel"
android:textColor="#drawable/button_detail_txt"
android:textSize="16sp"
android:textStyle="bold"
android:layout_gravity="bottom"
android:gravity="bottom" />
</LinearLayout>
</LinearLayout>
</ScrollView>

Categories

Resources