I have this layout
<?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:orientation="vertical" >
<LinearLayout
android:id="#+id/viewer_top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#android:color/background_dark"
android:orientation="horizontal" >
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="3dp"
android:layout_weight="1" >
<EditText
android:id="#+id/viewer_filter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="#string/hint_filter"
android:background="#android:color/white"
android:drawableLeft="#android:drawable/ic_menu_search"
android:inputType="text"
android:paddingLeft="4dp"
android:selectAllOnFocus="true" >
</EditText>
<ImageView
android:id="#+id/viewer_filterX"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#id/viewer_filter"
android:layout_alignRight="#id/viewer_filter"
android:src="#android:drawable/ic_menu_close_clear_cancel"
android:visibility="invisible" >
</ImageView>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_marginTop="3dp"
android:layout_marginBottom="5dp"
android:layout_weight="1" >
<EditText
android:id="#+id/viewer_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="#string/hint_search"
android:background="#android:color/white"
android:drawableLeft="#android:drawable/ic_menu_search"
android:inputType="text"
android:paddingLeft="4dp"
android:selectAllOnFocus="true" >
</EditText>
<ImageView
android:id="#+id/viewer_searchGo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#id/viewer_search"
android:layout_alignRight="#id/viewer_search"
android:src="#android:drawable/ic_menu_send"
android:visibility="invisible" >
</ImageView>
<ImageView
android:id="#+id/viewer_searchX"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#id/viewer_search"
android:layout_toLeftOf="#id/viewer_searchGo"
android:src="#android:drawable/ic_menu_close_clear_cancel"
android:visibility="invisible" >
</ImageView>
</RelativeLayout>
</LinearLayout>
<HorizontalScrollView
android:id="#+id/viewer_hscroll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/viewer_top" >
<ListView
android:id="#+id/viewer_list"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</ListView>
</HorizontalScrollView>
</RelativeLayout>
When I click on either EditText it expands to this dialog:
On portrait mode the EditTexts can be edited as they are without expanding. The XML for portrait is similar, only the EditTexts are one below the other and are screen wide.
How do I prevent this EditText expansion?
Not only the full phone screen is hidden by the EditText + virtual keyboard, but the clickable images the I put over the EditText are not visible.
I tried to set the EditText layout_width to 0dp, but they don't show.
I am not using SearchViews because they steal the focus and I cannot use the back key to go back to the previous activity.
Update
I removed the layout-land XML and used the same XML for both portrait and landscape.
In portrait mode it is fine, no expansion, in landscape mode there is expansion.
So it has to do somehow with being in landscape mode.
add this line to your edit text
android:imeOptions="flagNoFullscreen"
edit text look like this
<EditText
android:id="#+id/viewer_filter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="hint_filter"
android:background="#android:color/white"
android:drawableLeft="#android:drawable/ic_menu_search"
android:inputType="text"
android:paddingLeft="4dp"
android:selectAllOnFocus="true"
android:imeOptions="flagNoFullscreen">
Try to use android:maxLines="1" for EditText
I had similar issue. You can use mEditText.setSingleLine(true); where you are using it. This will solve your problem.
Hi please add this line in java code where your edit text is declared description.setMaxLines(1);
This post addresses the same problem and has the solution
Need to add
android:imeOptions="flagNoExtractUi"
to prevent this behavior.
If someone knows how, please mark this post as duplicate.
Related
I have a custom Dialog as shown below:
When I click on the Edit Text, The dialog is shifted upwards but half of the dialog becomes invisible as shown below:
I verified the issue on Android ICS and Gingerbread but it doesn't happen on Android Lollipop.
I appreciate your help for figuring out why.
Here is the custom dialog layout XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/layoutChatInGame"
android:layout_width="305dp"
android:layout_height="190dp"
android:background="#drawable/dialog_table_border"
android:orientation="vertical"
android:visibility="visible">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/roomlist_title_background">
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/progressBar"
android:layout_margin="5dp"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_margin="5dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical">
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Game is on hold because the host paused the app"
android:id="#+id/lblOnHoldDialogMessage"
android:textColor="#color/progress_dialog_on_hold_text"
android:textSize="18dp"
android:singleLine="false"
android:layout_gravity="center_horizontal"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<TextView
android:id="#+id/lblChatHistoryGameOnHold"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:gravity="bottom"
android:maxLines="5"
android:scrollbars="vertical"
android:textColor="#color/edit_text_general_text"
android:textColorHint="#color/edit_text_general_hint"
android:paddingRight="2dp"
android:paddingLeft="2dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="#+id/textChatGameOnHold"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:layout_marginStart="2dp"
android:layout_weight="1"
android:ems="10"
android:hint="#string/edit_text_send_chat_message"
android:imeOptions="flagNoExtractUi|actionDone"
android:inputType="text"
android:maxLength="100"
android:maxLines="1"
android:textColor="#color/edit_text_general_text"
android:textColorHint="#color/edit_text_general_hint"/>
<Button
android:id="#+id/btnSendGameOnHold"
style="#style/lightboxButton.Blue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="sendChatMessageInGame"
android:text="#string/btn_send"/>
</LinearLayout>
</LinearLayout>
Try to use also android:imeOptions="flagNoFullscreen" in your .xml. Recommend you to make some tests, using it with and without flagNoExtractUi. Please give me some feedback.
If all the other solutions are not working then try adding marginBottom in the top layout:
LinearLayout android:layout_marginBottom=20dp
You can get the desired behavior by making adjustResize flag for the windowSoftInputMode of the dialog in the manifest if your dialog is declared as an activity.
Like This:
android:windowSoftInputMode="adjustResize|stateHidden"
You can also directly try something like this directly on the dialog:
alertDialog.getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
I'm trying to get the editTexts, and sign in button to move up when the software keyboard is out however I want the background to not be compressed(I'm going to add an image soon). I have the TextView(Login), two EditTexts(email and password) and signin button in a ScrollView because I thought that might help however I have not be able to figure anything out.
http://i.imgur.com/vlYifc6.png
http://i.imgur.com/vlYifc6.png
This is the xml
<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:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
android:paddingBottom="#dimen/activity_vertical_margin" tools:context=".MainActivity">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="#+id/scrollView"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" >
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:gravity="center"
android:id="#+id/textLayout">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Login"
android:id="#+id/loginView"
android:textSize="22dp"
android:layout_above="#+id/textLayout"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="#+id/emailTextfield"
android:inputType="textEmailAddress"
android:background="#android:drawable/edit_text"
android:textColor="#android:color/primary_text_light"
android:text="andresc1305#yahoo.com"
android:hint="Email" />
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:hint="Password"
android:text="Andres123"
android:background="#android:drawable/edit_text"
android:textColor="#android:color/primary_text_light"
android:ems="10"
android:id="#+id/passwordTextfield" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="SIGN IN"
android:background="#android:color/transparent"
android:textSize="24dp"
android:id="#+id/signinButton"
android:layout_below="#+id/textLayout"
android:layout_centerHorizontal="true"
android:onClick="onSigninClick"/>
</LinearLayout>
</ScrollView>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Forgot your password?"
android:background="#android:color/transparent"
android:textSize="14dp"
android:id="#+id/forgotButton"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:onClick="onPasswordRecoverClick"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Register"
android:background="#android:color/transparent"
android:textSize="14dp"
android:id="#+id/registerButton"
android:layout_alignTop="#+id/forgotButton"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:onClick="onRegisterClick"/>
</RelativeLayout>
Look at this answer. In short, your problem can most likely be solved by setting the following in your AndroidManifest.xml inside the relevant activity or application element:
android:windowSoftInputMode="adjustResize"
#PPartisan
This is without:
android:windowSoftInputMode="adjustResize"
http://i.imgur.com/tbNioU2.png
This is with:
http://i.imgur.com/7ZePHjS.png
Beside the compression you can see my "Forgot your password" and "Register" buttons but I have those outside my ScrollView in the XML. Is there a way to scroll the LinearLayout (which contains the Login(TextView, email(EditText), password(EditText), and Signin(button) up when the software keyboard comes up?
The answer by zmilojko seems like what I want to do but he only says to add the ScrollView and not what to do after that has been added. Is there something I can place in the to make it move up when the software keyboard comes up?
see this thread, i think it can help you
layout of the screen moves up when keyboard is displayed
or just try to put this in your xml:
android:windowSoftInputMode="adjustPan"
or this
android:windowSoftInputMode="adjustNothing"
Seems like it works different in each case.
I am trying to shift my layout up when soft keyboard will open.
I have edittext and button. I can see edittext clearly whether keyboard is open or not but problem is that i am showing drop down for edittext. When drop down open it open on top of edittext because there is no sufficient space between keyboard and dropdown.
So i am trying to shift my entire screen up (only edittext will show). So can show dropdown below of Edittext.
I try following things...
I add following attribute in my activity in AndroidManifest.xml
android:windowSoftInputMode="adjustPan"
I add following code in my .java file
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN)
I read somewhere i need to use relative layout. I also try this but none of them helpful.
Here is my xml code for your reference.
<?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="fill_parent"
android:background="#EFEFEF"
>
<ViewStub
android:id="#+id/vsHeader2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inflatedId="#+id/header"
android:layout="#layout/copyofheader" />
<TextView
android:id="#+id/firstPara"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="56dip"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:text=""
android:textSize="16sp" />
<TextView
android:id="#+id/secondPara"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/firstPara"
android:layout_marginTop="24dip"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:text=""
android:textColor="#666666"
android:textSize="16sp" />
<AutoCompleteTextView
android:id="#+id/mysecondautocomplete"
android:layout_width="fill_parent"
android:layout_height="40dip"
android:layout_below="#id/secondPara"
android:layout_marginLeft="12dip"
android:layout_marginRight="12dip"
android:layout_marginTop="12dip"
android:ems="10"
android:dropDownVerticalOffset="44dip"
android:windowSoftInputMode="stateHidden"
android:dropDownHeight="290dip"
android:imeOptions="actionSearch"
android:drawableLeft="#drawable/search_grey"
android:background="#drawable/borderforloginedittext"
android:drawablePadding="6dip"
android:hint="Enter Restaurant Name"
android:inputType="textPersonName"
android:dropDownWidth="match_parent"
android:textColor="#cc3333"
android:textColorHint="#999999"
android:textSize="16sp" />
I don't understand why my layout not shifting up. Please give me any hint or reference.
UPDATE:
I just re-read your question and found the mistake you are making. You are adding android:windowSoftInputMode="adjustPan" in AndroidManifestfor resizing or scaling the window for the keyboard.
You should use android:windowSoftInputMode="adjustResize" which will resize the window or adjust the window accordingly.
Try this:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="#EFEFEF"
>
<ViewStub
android:id="#+id/vsHeader2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inflatedId="#+id/header"
android:layout="#layout/copyofheader" />
<TextView
android:id="#+id/firstPara"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="56dip"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:text=""
android:textSize="16sp" />
<TextView
android:id="#+id/secondPara"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/firstPara"
android:layout_marginTop="24dip"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:text=""
android:textColor="#666666"
android:textSize="16sp" />
<AutoCompleteTextView
android:id="#+id/mysecondautocomplete"
android:layout_width="fill_parent"
android:layout_height="40dip"
android:layout_below="#id/secondPara"
android:layout_marginLeft="12dip"
android:layout_marginRight="12dip"
android:layout_marginTop="12dip"
android:ems="10"
android:dropDownVerticalOffset="44dip"
android:windowSoftInputMode="stateHidden"
android:dropDownHeight="290dip"
android:imeOptions="actionSearch"
android:drawableLeft="#drawable/search_grey"
android:background="#drawable/borderforloginedittext"
android:drawablePadding="6dip"
android:hint="Enter Restaurant Name"
android:inputType="textPersonName"
android:dropDownWidth="match_parent"
android:textColor="#cc3333"
android:textColorHint="#999999"
android:textSize="16sp" />
</RelativeLayout>
</ScrollView>
</RelativeLayout>
Put your entire layout inside a Scrollview. So when the soft keyboard gets open, your view will get adjusted accordingly.
I was trying to implement a message box similar with that of Hangout. I want the edittext to expand if more content is typed into it, with the button to the right remain at the bottom right corner.
My current implement is as follows. The button to the right will move up if the edit text expands due to "alignParentTop". But if I set "alignParentBottom" as true, the entire screen will get occupied by this relative layout. Any idea how to fix it
<RelativeLayout android:id="#+id/structured_relative_interaction"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#E0E0E0">
<ImageButton android:id="#+id/structured_imagebutton_takePhoto"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:background="#drawable/save_structured_button"
android:src="#drawable/take_photo"/>
<EditText android:id="#+id/structured_edittext_answer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_toLeftOf="#id/structured_imagebutton_takePhoto"
android:layout_margin="5dp"
android:gravity="top"
android:maxLines="5"
android:padding="10dp"
android:hint="#string/structured_hint"
android:textColorHint="#B0B0B0"
android:inputType="textCapSentences|textMultiLine">
</EditText>
</RelativeLayout>
I was able to achieve it using the following layout (some ids for images and strings were changed to make it compileable):
<!--suppress AndroidLintUselessParent, AndroidLintContentDescription -->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="#+id/structured_relative_interaction"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="bottom"
android:background="#E0E0E0">
<EditText
android:id="#+id/structured_edittext_answer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="#+id/structured_imagebutton_takePhoto"
android:layout_margin="5dp"
android:gravity="bottom"
android:maxLines="5"
android:padding="10dp"
android:hint="hint"
android:textColorHint="#B0B0B0"
android:inputType="textCapSentences|textMultiLine" />
<ImageButton
android:id="#+id/structured_imagebutton_takePhoto"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_alignBottom="#id/structured_edittext_answer"
android:background="#drawable/ic_launcher" />
</RelativeLayout>
</RelativeLayout>
Will produce:
Seems it's common issue with ExitText and RelativeLayout (at least, I've seen some similar questions previously).
<EditText
android:id="#+id/write_post"
android:layout_width="match_parent"
android:layout_height="85dip"
android:ems="10"
android:gravity="top"
android:hint="#string/write_post"
android:inputType="textMultiLine"
android:textAppearance="?android:attr/textAppearanceSmall" >
</EditText>
set android:inputType to textMultiLine, android automatically expands edittext if the text exceeds from its boundry.
Yes, this is yet another edittext grow question on SO. And yes I've already gone through all those edittext grow questions. But this ones a bit specific.
UI:
A simple android layout with edittext and button below it. When text is less, the edittext view is still covering whole screen leaving space for button below.
Once user starts entering text, edittext grows vertically to accommodate text. At the same time, the button should also kept pushing downwards to let edittext grow.
User can vertically scroll through screen to view full text.
UI after entering significant text:
Here's the layout with edittext and button below:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/background"
android:clipToPadding="false"
android:fadingEdge="none"
android:fillViewport="true"
android:padding="13dp"
android:scrollbarStyle="outsideOverlay" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
<!-- some fixed width image -->
<ImageView
android:id="#+id/someimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:src="#drawable/page_white_text" />
<EditText
android:id="#+id/some"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#id/someimage"
android:background="#null"
android:gravity="top"
android:minLines="10"
android:minHeight="50dp"
android:textColor="#222222"
android:textSize="15dp"
android:typeface="serif" >
<requestFocus />
</EditText>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:baselineAligned="true"
android:layout_marginTop="5dp"
android:padding="10dp"
android:orientation="vertical" >
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
This works more or less. But when I enter to much text, instead of pushing button downwards. It goes behind it like:
Any help here is much appreciated. Thanks :)
Here's my recommendation: inside the ScrollView, put a RelativeLayout in which you can place every element in a certain order using android:layout_below. For the auto-growing of your EditText, use this solution.
Let's see an example:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center">
<RelativeLayout
android:id="#+id/general2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="20sp" >
<TextView
android:id="#+id/textFirstOpinion"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="#string/titleFirstOpinion"
android:textStyle="bold"
android:textSize="23sp"
android:textColor="#FFFFFF"
android:layout_marginTop="10dp" />
<EditText
android:id="#+id/fieldFirstOpinion"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#id/textFirstOpinion"
android:minHeight="80sp"
android:isScrollContainer="true"
android:inputType="textMultiLine"
android:textSize="20sp"
android:gravity="top|left" />
<Button
android:id="#+id/button"
android:layout_width="110dp"
android:layout_height="wrap_content"
android:layout_below="#id/fieldFirstOpinion"
android:layout_centerHorizontal="true"
android:layout_marginTop="37sp"
android:textSize="23sp"
android:text="#string/textSendButton"
android:gravity="center_horizontal"
android:padding="10dp" />
</RelativeLayout>
</ScrollView>
try adding android:layout_below="#id/some" in your LinearLayout like
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:baselineAligned="true"
android:layout_marginTop="5dp"
android:padding="10dp"
android:orientation="vertical"
android:layout_below="#id/some" >
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout>
Since you want the button to be at the bottom of the page, add the following line
android:layout_below="#+id/some"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
in your LinearLayout code here like
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/some"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:baselineAligned="true"
android:layout_marginTop="5dp"
android:padding="10dp"
android:orientation="vertical" >
Also make sure the layout:height parameter of EditText is set to wrap_content
Try this and tell me if it works or not