I have the following xml layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="#+id/textHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:padding="10dp"
android:textStyle="bold"
android:text="#string/form_header"
android:textSize="10pt" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical"
android:layout_below="#+id/textHeader">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="#+id/textComp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="10dp"
android:textColor="#color/red"
android:text="#string/form_comp"
android:textSize="7pt" />
<RelativeLayout
android:id="#+id/relativeLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/textComp" >
<TextView
android:id="#+id/textTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="10dip"
android:text="#string/form_title"
android:textSize="7pt" />
<Spinner
android:id="#+id/title_spinner"
android:layout_width="110dp"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/textTitle"
android:focusable="true"
android:padding="10dip" />
<TextView
android:id="#+id/textFname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/textTitle"
android:gravity="center_horizontal"
android:padding="10dip"
android:text="#string/form_fname"
android:textSize="7pt" />
<EditText
android:id="#+id/editFname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:layout_below="#+id/textTitle"
android:layout_toRightOf="#id/textFname"
android:ems="10"
android:maxLength="15" />
<TextView
android:id="#+id/textLname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/textFname"
android:gravity="center_horizontal"
android:padding="10dip"
android:text="#string/form_lname"
android:textSize="7pt" />
<EditText
android:id="#+id/editLname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:layout_below="#+id/textFname"
android:layout_toRightOf="#id/textLname"
android:ems="10"
android:maxLength="15" />
<TextView
android:id="#+id/textTel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/textLname"
android:gravity="center_horizontal"
android:padding="10dip"
android:text="#string/form_tel"
android:textSize="7pt" />
<EditText
android:id="#+id/editTel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:layout_below="#+id/textLname"
android:layout_toRightOf="#id/textTel"
android:ems="10"
android:maxLength="15" />
<TextView
android:id="#+id/textEmail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/textTel"
android:gravity="center_horizontal"
android:padding="10dip"
android:text="#string/form_email"
android:textSize="7pt" />
<EditText
android:id="#+id/editEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:layout_below="#+id/textTel"
android:layout_toRightOf="#id/textEmail"
android:ems="10"
android:maxLength="25" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/relativeLayout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/relativeLayout1" >
<TextView
android:id="#+id/textDep"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="10dip"
android:text="#string/form_dep"
android:textSize="7pt" />
<EditText
android:id="#+id/editDep"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:layout_toRightOf="#id/textDep"
android:ems="10"
android:maxLength="25" />
<TextView
android:id="#+id/textDest"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="10dip"
android:text="#string/form_dest"
android:layout_below="#+id/textDep"
android:textSize="7pt" />
<EditText
android:id="#+id/editDest"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:layout_toRightOf="#id/textDest"
android:layout_below="#+id/textDep"
android:ems="10"
android:maxLength="25" />
<TextView
android:id="#+id/textNpersons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="10dip"
android:text="#string/form_npersons"
android:layout_below="#+id/editDest"
android:textSize="7pt" />
<EditText
android:id="#+id/editNpersons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:layout_toRightOf="#id/textNpersons"
android:layout_below="#+id/editDest"
android:ems="10"
android:maxLength="3" />
<TextView
android:id="#+id/textDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="10dip"
android:text="#string/form_date"
android:layout_below="#+id/textNpersons"
android:textSize="7pt" />
<Spinner
android:id="#+id/spYear"
android:layout_width="85dp"
android:layout_height="wrap_content"
android:layout_below="#+id/textNpersons"
android:layout_toRightOf="#id/textDate"/>
<Spinner
android:id="#+id/spMonth"
android:layout_width="85dp"
android:layout_height="wrap_content"
android:layout_below="#+id/textNpersons"
android:layout_toRightOf="#id/spYear"/>
<Spinner
android:id="#+id/spDay"
android:layout_width="85dp"
android:layout_height="wrap_content"
android:layout_below="#+id/textNpersons"
android:layout_toRightOf="#id/spMonth"/>
<TextView
android:id="#+id/textTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="10dip"
android:text="#string/form_time"
android:layout_below="#+id/spDay"
android:textSize="7pt" />
<Spinner
android:id="#+id/spTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:layout_toRightOf="#id/textTime"
android:layout_below="#+id/spDay"/>
<TextView
android:id="#+id/textComms"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="10dip"
android:text="#string/form_comments"
android:layout_below="#+id/spTime"
android:textSize="7pt" />
<EditText
android:id="#+id/editComms"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:inputType="textMultiLine"
android:lines="2"
android:minLines="2"
android:gravity="top|left"
android:maxLines="5"
android:layout_below="#+id/spTime"
android:layout_toRightOf="#id/textComms"
android:scrollbars="vertical"/>
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/editComms"
android:layout_centerHorizontal="true"
android:text="#string/form_snd_button" />
</RelativeLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
The ScrollView scrolls fine; however, the last button (#+id/button1) is not shown.
I've tried several combinations with match_parent and wrap_content for the contained layouts but with no luck.
Any ideas?
Thanks in advance.
Edit: Actually I'm writing my app so as to work in both tablets and phones. The above layout that belongs to a fragment works fine for phones.
In the case of tablets, the specific button is not shown. The above layout is attached to the Framelayout:aboutusdet shown in the code below:
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="#android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.gms.ads.AdView android:id="#+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="SMART_BANNER"
ads:adUnitId="#string/UnitId"/>
<FrameLayout
android:id="#+id/mainfrg"
android:layout_width="500dp"
android:layout_height="wrap_content"
android:layout_below="#+id/adView"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="15dp"
android:layout_alignParentLeft="true"
/>
<FrameLayout
android:id="#+id/aboutusdet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/mainfrg"
android:layout_below="#+id/adView"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="15dp"
/>
<FrameLayout android:id="#android:id/tabcontent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/mainfrg" />
<TabWidget android:id="#android:id/tabs"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true" />
</RelativeLayout>
</TabHost>
Related
HI,
In my android app,the emulator screen is rotating in landscape i didn't get the full view of a registration form. But in portrait mode it works perfectly. Please Look through it.Thanks in Advance.
activity_main
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp"
android:weightSum="1">
<TextView
android:text="Soil Test Based Nutrient Recommendations"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textAlignment="center"
android:id="#+id/title"
android:layout_weight="0.03" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:textColor="#000000"
android:text="Crop"/>
<Spinner android:id="#+id/spinFood"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView
android:text="State"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
android:id="#+id/textView" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/spinner" />
<TextView
android:text="Category"
android:textColor="#000000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/textView2" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/spinner2" />
<TextView
android:text="Soil_Texture"
android:textColor="#000000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/textView3" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/spinner3" />
<TextView
android:text="pH"
android:textColor="#000000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/textView4" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text=""
android:ems="10"
android:id="#+id/editText" />
<TextView
android:text="Available Phosphorus"
android:textColor="#000000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/textView5" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text=""
android:ems="10"
android:id="#+id/editText2" />
<TextView
android:text="Available Pottassium"
android:textColor="#000000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/textView6" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text=""
android:ems="10"
android:id="#+id/editText3" />
<Button
android:text="Button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/button" />
</LinearLayout>
<ScrollView 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">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp"
android:weightSum="1">
<TextView
android:text="Soil Test Based Nutrient Recommendations"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textAlignment="center"
android:id="#+id/title"
android:layout_weight="0.03" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:textColor="#000000"
android:text="Crop"/>
<Spinner android:id="#+id/spinFood"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView
android:text="State"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
android:id="#+id/textView" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/spinner" />
<TextView
android:text="Category"
android:textColor="#000000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/textView2" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/spinner2" />
<TextView
android:text="Soil_Texture"
android:textColor="#000000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/textView3" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/spinner3" />
<TextView
android:text="pH"
android:textColor="#000000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/textView4" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text=""
android:ems="10"
android:id="#+id/editText" />
<TextView
android:text="Available Phosphorus"
android:textColor="#000000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/textView5" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text=""
android:ems="10"
android:id="#+id/editText2" />
<TextView
android:text="Available Pottassium"
android:textColor="#000000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/textView6" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text=""
android:ems="10"
android:id="#+id/editText3" />
<Button
android:text="Button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/button" />
</LinearLayout>
</ScrollView>
Just wrap into ScrollView to Main LinearLayout
Add android:screenOrientation="portrait" to the activity you want to disable landscape mode.
Can anybody tell me why this ScrollView is not working? I checked the other answers for this question and it hasn't solved my problem. It has just one child. It has a closing bracket. Any ideas? Thanks in advance
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#89abe3"
tools:context=".GardaLoginActivity" >
<RelativeLayout
android:layout_width="match_parent" android:layout_height="match_parent"
android:focusableInTouchMode="true" android:fitsSystemWindows="true"
android:background="#89abe3">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Smart Neighborhood Watch"
android:id="#+id/Logo"
android:textSize="40dp"
android:layout_gravity="center_horizontal"
android:gravity="center"
android:layout_centerHorizontal="true"
android:layout_marginTop="35dp"
android:textColor="#ffdd00"
android:textStyle="bold"/>
<LinearLayout
android:id="#+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/Logo"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<TextView
android:id="#+id/lblGardaEmail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Email"
android:textColor="#FFFFFF"/>
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout1"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp">
<EditText
android:id="#+id/txtGardaEmail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="textEmailAddress"
android:textColor="#FFFFFF"/>
<requestFocus />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout2"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp">
<TextView
android:id="#+id/lblGardaPassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="#string/password"
android:textColor="#FFFFFF"/>
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout3"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp">
<EditText
android:id="#+id/txtGardaPassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColorHint="#cccccc"
android:hint="Minimum 7 characters"
android:inputType="textPassword"
android:textColor="#FFFFFF" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout4"
android:layout_centerHorizontal="true"
android:paddingTop="30dp"
android:gravity="center"
android:weightSum="1">
<Button
android:id="#+id/btnGardaLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/login"
android:background="#66c2ff"
android:textColor="#FFFFFF"
android:layout_weight="0.30" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout5"
android:layout_centerHorizontal="true"
android:paddingTop="10dp"
android:gravity="center"
>
<TextView
android:id="#+id/textViewGardaRegister"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Not a member? Register"
android:paddingTop="10dp"
android:textColor="#FFFFFF" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
Sorry that i wrote this as an awnser as I can't comment on questions.
If your layout is bigger than your screen the scrollview will work.
And One more thing Child layout of ScrollView's height wrap_content
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#89abe3"
tools:context=".GardaLoginActivity" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusableInTouchMode="true"
android:fitsSystemWindows="true"
android:background="#89abe3">
//Your Code
</RelativeLayout>
</ScrollView>
just Change your child Relative layout to
<RelativeLayout
android:layout_width="match_parent" android:layout_height="match_parent"
android:focusableInTouchMode="true"
android:background="#89abe3">
as the relative layouts android:fitsSystemWindows="true" attribute is using whole screen there is no room for ScrollView to scroll.
Important Note :
According to Android guidelines, android:layout_height attribute of
the first (and only) ScrollView children should always be
"wrap_content". You will get a Lint warning if you use match_parent
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
>
with this code:
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true">
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#89abe3"
tools:context=".GardaLoginActivity" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#89abe3"
android:fitsSystemWindows="true"
android:focusableInTouchMode="true" >
<TextView
android:id="#+id/Logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_marginTop="35dp"
android:gravity="center"
android:text="Smart Neighborhood Watch"
android:textColor="#ffdd00"
android:textSize="40dp"
android:textStyle="bold" />
<LinearLayout
android:id="#+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/Logo"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<TextView
android:id="#+id/lblGardaEmail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Email"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#FFFFFF" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout1"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<EditText
android:id="#+id/txtGardaEmail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="textEmailAddress"
android:textColor="#FFFFFF" />
<requestFocus />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout2"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<TextView
android:id="#+id/lblGardaPassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#FFFFFF" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout3"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<EditText
android:id="#+id/txtGardaPassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Minimum 7 characters"
android:inputType="textPassword"
android:textColor="#FFFFFF"
android:textColorHint="#cccccc" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout4"
android:layout_centerHorizontal="true"
android:gravity="center"
android:paddingTop="30dp"
android:weightSum="1" >
<Button
android:id="#+id/btnGardaLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.30"
android:background="#66c2ff"
android:textColor="#FFFFFF" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout5"
android:layout_centerHorizontal="true"
android:gravity="center"
android:paddingTop="10dp" >
<TextView
android:id="#+id/textViewGardaRegister"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:text="Not a member? Register"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#FFFFFF" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout6"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<EditText
android:id="#+id/edt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Minimum 7 characters"
android:inputType="textPassword"
android:textColor="#FFFFFF"
android:textColorHint="#cccccc" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout7"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<EditText
android:id="#+id/edt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Minimum 7 characters"
android:inputType="textPassword"
android:textColor="#FFFFFF"
android:textColorHint="#cccccc" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout9"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout8"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<EditText
android:id="#+id/edt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Minimum 7 characters"
android:inputType="textPassword"
android:textColor="#FFFFFF"
android:textColorHint="#cccccc" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout9"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<EditText
android:id="#+id/edt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Minimum 7 characters"
android:inputType="textPassword"
android:textColor="#FFFFFF"
android:textColorHint="#cccccc" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout10"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<EditText
android:id="#+id/edt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Minimum 7 characters"
android:inputType="textPassword"
android:textColor="#FFFFFF"
android:textColorHint="#cccccc" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout11"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<EditText
android:id="#+id/edt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Minimum 7 characters"
android:inputType="textPassword"
android:textColor="#FFFFFF"
android:textColorHint="#cccccc" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout12"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<EditText
android:id="#+id/edt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Minimum 7 characters"
android:inputType="textPassword"
android:textColor="#FFFFFF"
android:textColorHint="#cccccc" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout13"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<EditText
android:id="#+id/edt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Minimum 7 characters"
android:inputType="textPassword"
android:textColor="#FFFFFF"
android:textColorHint="#cccccc" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout15"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout14"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<EditText
android:id="#+id/edt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Minimum 7 characters"
android:inputType="textPassword"
android:textColor="#FFFFFF"
android:textColorHint="#cccccc" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout16"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout15"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<EditText
android:id="#+id/edt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Minimum 7 characters"
android:inputType="textPassword"
android:textColor="#FFFFFF"
android:textColorHint="#cccccc" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout17"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout16"
android:layout_centerHorizontal="true"
android:layout_marginTop="17dp" >
<EditText
android:id="#+id/edt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Minimum 7 characters"
android:inputType="textPassword"
android:textColor="#FFFFFF"
/>
</LinearLayout>
</RelativeLayout>
</ScrollView>
I have checked your code. It's working perfectly even with scroll.
Do you have any other doubt?
I am creating a registration screen strangely I am facing an issue with padding a layout which has sign up text.
I would like to align it according to text box shown in the screen shot below. I am not sure why this giving me this strange issue?
Below is the code I have tried:
<?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"
android:background="#color/backgroundcolor"
android:orientation="vertical" >
<TextView
android:id="#+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="10dp"
android:text="#string/signUp"
android:textColor="#000000"
android:textSize="20sp" />
<LinearLayout
android:id="#+id/linearlayout1"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_below="#+id/header"
android:padding="10dp" >
<EditText
android:id="#+id/namefEDIT"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/textbox"
android:hint="#string/fname"
android:padding="5dp"
android:textColor="#000000"
android:textColorHint="#000000"
android:textSize="20sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearlayout2"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_below="#+id/fnamelinearlayout"
android:padding="10dp" >
<EditText
android:id="#+id/namelEDIT"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/textbox"
android:hint="#string/lname"
android:padding="5dp"
android:textColor="#000000"
android:textColorHint="#000000"
android:textSize="20sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearlayout3"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_below="#+id/lnamelinearlayout"
android:padding="10dp" >
<EditText
android:id="#+id/numberEDIT"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/textbox"
android:hint="#string/mobilenumber"
android:inputType="numberSigned"
android:padding="5dp"
android:textColor="#000000"
android:textColorHint="#000000"
android:textSize="20sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearlayout4"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_below="#+id/mobilelinearlayout"
android:padding="10dp" >
<EditText
android:id="#+id/pEDIT"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/textbox"
android:hint="#string/password"
android:inputType="textPassword"
android:padding="5dp"
android:textColor="#000000"
android:textColorHint="#000000"
android:textSize="20sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearlayout5"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="#+id/passwordlinearlayout"
android:layout_marginTop="15dp"
android:background="#drawable/button_selector"
android:orientation="vertical" >
<TextView
android:id="#+id/textEdit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_vertical"
android:padding="10dp"
android:textSize="20sp"
android:text="#string/signText"
android:textColor="#000000" />
</LinearLayout>
</RelativeLayout>
Below is the screen shot:
This layout should do the same:
<TextView
android:id="#+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="10dp"
android:text="#string/signUp"
android:textColor="#000000"
android:textSize="20sp" />
<EditText
android:id="#+id/namefEDIT"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/textbox"
android:hint="#string/fname"
android:padding="5dp"
android:layout_margin="10dp"
android:textColor="#000000"
android:textColorHint="#000000"
android:textSize="20sp" />
<EditText
android:id="#+id/namelEDIT"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/textbox"
android:hint="#string/lname"
android:padding="5dp"
android:layout_margin="10dp"
android:textColor="#000000"
android:textColorHint="#000000"
android:textSize="20sp" />
<EditText
android:id="#+id/numberEDIT"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/textbox"
android:hint="#string/mobilenumber"
android:inputType="numberSigned"
android:padding="5dp"
android:layout_margin="10dp"
android:textColor="#000000"
android:textColorHint="#000000"
android:textSize="20sp" />
<EditText
android:id="#+id/pEDIT"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/textbox"
android:hint="#string/password"
android:inputType="textPassword"
android:padding="5dp"
android:layout_margin="10dp"
android:textColor="#000000"
android:textColorHint="#000000"
android:textSize="20sp" />
<TextView
android:id="#+id/textEdit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_vertical"
android:padding="10dp"
android:layout_margin="10dp"
android:textSize="20sp"
android:text="#string/signText"
android:textColor="#000000" />
</LinearLayout>
I am trying to create a layout it was working good yesterday but today I am opened the xml view all the text of controls is right aligned it happen with every screen.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/bg"
>
<RelativeLayout
android:id="#+id/layout_logo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/layout_loginArea"
android:gravity="center_horizontal" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/logo" />
</RelativeLayout>
<LinearLayout
android:id="#+id/layout_loginArea"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:orientation="vertical"
android:padding="10dp" >
<EditText
android:id="#+id/edit_username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/txt_box"
android:hint="#string/usernamehint"
android:inputType="textPersonName"
android:paddingBottom="4dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingTop="4dp"
android:textColor="#ffffff"
android:textColorHint="#ffffff" />
<EditText
android:id="#+id/edit_password"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:background="#drawable/txt_box"
android:hint="#string/passwordhint"
android:inputType="textPassword"
android:padding="4dp"
android:paddingBottom="4dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingTop="4dp"
android:textColor="#ffffff"
android:textColorHint="#ffffff" />
<Button
android:id="#+id/button_login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="3dp"
android:background="#drawable/signin_button"
android:text="#string/loginButtonText" />
<TextView
android:id="#+id/txt_forgotpassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_horizontal"
android:text="#string/forgotpassword" />
</LinearLayout>
<LinearLayout
android:id="#+id/layout_createAccount"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="center"
android:orientation="vertical"
android:padding="10dp" >
<Button
android:id="#+id/button_facebook"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#drawable/facebook_button"
android:text="#string/createaccount" />
<Button
android:id="#+id/button_createAccount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/create_account" />
</LinearLayout>
</RelativeLayout>
Set the width of view and make view gravity="center"
<LinearLayout
android:id="#+id/layout_createAccount"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical"
android:padding="10dp" >
<Button
android:id="#+id/button_facebook"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#color/app_bg"
android:gravity="center"
android:text="createaccount" />
<Button
android:id="#+id/button_createAccount"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:background="#color/app_bg"
android:gravity="center"
android:text="createaccount" />
</LinearLayout>
So I've completed an early version of my Android app and begun testing on various devices. I'm finding my nested LinearLayouts aren't sufficient for my purposes so I'm trying to convert the nested LinearLayouts to a RelativeLayout. Below is my starting point:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
tools:context=".LoginActivity">
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/backgroundhomescreen"
android:scaleType="fitXY" />
<TableLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="35dp">
<LinearLayout
android:orientation="vertical"
android:padding="10dp">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal"
android:paddingBottom="3dp"
android:layout_marginBottom="10dp">
<EditText
android:id="#+id/login_txt_Username"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#layout/textboxlogin"
android:hint="Username or Email"
android:inputType="textEmailAddress"
android:scrollbars="none"
android:textColor="#fff"
android:textColorHint="#ddd" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:layout_marginBottom="10dp">
<EditText
android:id="#+id/login_txt_Password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#layout/textboxlogin"
android:hint="Password"
android:inputType="textPassword"
android:maxLines="1"
android:textColorHint="#ddd" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp">
<Button
android:id="#+id/login_btn_submit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="SIGN IN"
android:textColor="#fff"
android:textSize="25dp"
android:textStyle="bold"
android:typeface="normal"
android:background="#layout/buttonsigninbackground" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal"
android:paddingBottom="10dp"
android:paddingTop="3dp">
<TextView
android:id="#+id/login_txt_or"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="- or -"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="25dp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal"
android:paddingBottom="15dp"
android:paddingTop="3dp">
<Button
android:id="#+id/login_btn_navCreateAccount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#layout/buttoncreateaccountbackground"
android:text="CREATE AN ACCOUNT"
android:textColor="#fff"
android:textSize="25dp"
android:textStyle="bold"
android:typeface="normal" />
</LinearLayout>
</LinearLayout>
</TableLayout>
</RelativeLayout>
And here is where I've gotten so far but with some issues - even after following this tutorial - Visual Guide to RelativeLayout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:context=".LoginActivity">
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/backgroundhomescreen"
android:scaleType="fitXY" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<EditText
android:id="#+id/login_txt_Username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#layout/textboxlogin"
android:hint="Username"
android:layout_centerHorizontal="true"
android:inputType="textEmailAddress"
android:maxLines="1"
android:scrollbars="none"
android:textColor="#fff"
android:textColorHint="#ddd" />
<EditText
android:id="#+id/login_txt_Password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#layout/textboxlogin"
android:hint="Password"
android:layout_centerHorizontal="true"
android:inputType="textPassword"
android:maxLines="1"
android:scrollbars="none"
android:textColor="#fff"
android:textColorHint="#ddd"
android:layout_below="#id/login_txt_Username"
/>
<Button
android:id="#+id/login_btn_submit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="SIGN IN"
android:layout_centerHorizontal="true"
android:textColor="#fff"
android:textSize="25dp"
android:textStyle="bold"
android:typeface="normal"
android:background="#layout/buttonsigninbackground" />
<TextView
android:id="#+id/login_txt_or"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="- or -"
android:layout_centerHorizontal="true"
android:layout_above="#+id/login_btn_navCreateAccount"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="#id/login_btn_navCreateAccount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#layout/buttoncreateaccountbackground"
android:text="CREATE AN ACCOUNT"
android:textColor="#fff"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="25dp"
android:textSize="25dp"
android:textStyle="bold"
android:typeface="normal" />
</RelativeLayout>
</RelativeLayout>
Ultimately I need a relative layout that's bottom aligned so I can place other views just above the previous. In my second code sample above, textview 'login_txt_or' that references login_btn_navCreateAccount seems to be ignored.
Any clue to why this is? If it's of any use, I'm using Xamarin.Android 4.10.1 in Xamarin Studio.
This is what I ended up with
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/activity_login_relativeLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="#drawable/backgroundgameplaying"
android:scaleType="fitXY" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom"
android:layout_marginBottom="45dp">
<TextView
android:id="#+id/login_tv_error"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="15dp"
android:textColor="#f00" />
<EditText
android:id="#+id/login_txt_Username"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="25dp"
android:background="#layout/textboxlogin"
android:hint="Username"
android:layout_centerHorizontal="true"
android:inputType="textEmailAddress"
android:maxLines="1"
android:scrollbars="none"
android:textColor="#fff"
android:textColorHint="#ddd"
android:layout_below="#id/login_tv_error" />
<EditText
android:id="#+id/login_txt_Password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="25dp"
android:background="#layout/textboxlogin"
android:hint="Password"
android:layout_centerHorizontal="true"
android:inputType="textPassword"
android:maxLines="1"
android:scrollbars="none"
android:textColor="#fff"
android:textColorHint="#ddd"
android:layout_below="#id/login_txt_Username" />
<Button
android:id="#+id/login_btn_submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/login_txt_Password"
android:layout_centerHorizontal="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="25dp"
android:textColor="#fff"
android:textSize="25dp"
android:textStyle="bold"
android:typeface="normal"
android:background="#layout/buttonsigninbackground"
android:text="SIGN IN" />
<TextView
android:id="#+id/loginTxtOr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/login_btn_submit"
android:layout_centerHorizontal="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_marginBottom="25dp"
android:textSize="25dp"
android:textStyle="bold|italic"
android:text="- or -" />
<Button
android:id="#+id/login_btn_navCreateAccount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_alignParentRight="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="25dp"
android:layout_below="#id/loginTxtOr"
android:background="#layout/buttoncreateaccountbackground"
android:textColor="#fff"
android:textSize="25dp"
android:textStyle="bold"
android:typeface="normal"
android:text="CREATE AN ACCOUNT" />
</RelativeLayout>
</RelativeLayout>