Android - EditText's hint changes View/Layout's size - android

I have a LinearLayout consisting of 3 LinearLayout's consisting of 2 TextView's and an EditText. When I add a hint to the third EditText I end up with a lot of whitespace between the 2nd and 3rd TextViews and also after the 3rd.
Code and images are below. What could be causing this?
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:id="#+id/self"
>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/name"
android:layout_marginLeft="5dp"
android:padding="5dp"
android:textSize="22sp"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Sample Name"
android:padding="5dp"
android:id="#+id/self_name_show"
android:textSize="22sp"
android:textColor="#0099CC"
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:id="#+id/self_name_edit"
android:inputType="text"
android:hint="#string/enter_name"
/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/address"
android:layout_marginLeft="5dp"
android:padding="5dp"
android:textSize="22sp"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Sample Address"
android:padding="5dp"
android:id="#+id/self_address_show"
android:textSize="22sp"
android:textColor="#0099CC"
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="#+id/self_address_edit"
android:visibility="gone"
android:inputType="text"
android:hint="#string/enter_address"
/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/phone"
android:layout_marginLeft="5dp"
android:padding="5dp"
android:autoLink="all"
android:textSize="22sp"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Sample Phone"
android:padding="5dp"
android:id="#+id/self_phone_show"
android:textSize="22sp"
android:textColor="#0099CC"
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="#+id/self_phone_edit"
android:phoneNumber="true"
android:hint="#string/enter_phone"
/>
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:text="#string/edit"
android:id="#+id/edit_self_button"
android:onClick="toggleSelfEdit"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:text="#string/update"
android:id="#+id/update_self_button"
android:visibility="gone"
/>
</LinearLayout>
Without hint:
With hint:

I think you forgot writing the android:visibility="gone" at the third edittext. I tried your xml and when I put visibility="gone" inside the edittext your xml looks like the first screenshot :)

Related

How to align image at extreme left of listitem?

I have an ImageView (android:id="#+id/unreadmail) which i want to show on extreme left of ListItem as shown in image. But it is not aligning properly. Any idea if i am missing anything ?
<LinearLayout
android:id="#+id/Text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="#+id/emailsubject"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:singleLine="true"
android:text="abcd"
android:textColor="#444444"
android:textSize="18sp" />
<TextView
android:id="#+id/emailcontent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#id/emailsubject"
android:layout_below="#id/emailsubject"
android:ellipsize="marquee"
android:gravity="center"
android:singleLine="true"
android:text="defg"
android:textColor="#444444"
android:textSize="14sp" />
</LinearLayout>
<ImageView
android:id="#+id/unreademail"
android:layout_width="2dip"
android:layout_height="wrap_content"
android:layout_toLeftOf="#id/emailsubject"
android:layout_centerVertical="true"
android:background="#8A6175"
android:visibility="invisible" />
<TextView
android:id="#+id/rcvdate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:paddingRight="20dip"
android:textColor="#313132"
android:textSize="12sp" />
Use this:
<LinearLayout 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=".MainActivity"
tools:ignore="ObsoleteLayoutParam,ContentDescription,UselessLeaf,UselessParent" >
<LinearLayout
android:id="#+id/Text"
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal" >
<ImageView
android:id="#+id/unreademail"
android:layout_width="15dip"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#drawable/ic_launcher"
android:visibility="visible" />
<LinearLayout
android:id="#+id/Text"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_marginLeft="20dp"
android:orientation="vertical" >
<TextView
android:id="#+id/emailsubject"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:singleLine="true"
android:text="abcd"
android:textColor="#444444"
android:textSize="18sp" />
<TextView
android:id="#+id/emailcontent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#id/emailsubject"
android:layout_below="#id/emailsubject"
android:ellipsize="marquee"
android:gravity="center"
android:singleLine="true"
android:text="defg"
android:textColor="#444444"
android:textSize="14sp" />
</LinearLayout>
<RelativeLayout
android:id="#+id/Text1"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:gravity="right"
android:layout_gravity="right"
android:orientation="horizontal" >
<TextView
android:id="#+id/rcvdate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="35dp"
android:text="Date"
android:textColor="#000"
android:textSize="12sp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
I think you should be using a relative layout at the top level (possibly not included in your code).
You cannot use 'to the left of' when the elements are at different levels in the heirarchy.
Thus I would start with your little icon left aligned to the parent and put the edit box (in the same relative view) 'to the right of' the icon.
This is the code sample for you there is no need to write the weight property if add the screenshot or the supported image how exactly you want then i can give you proper answer
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:id="#+id/Text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/unreademail"
android:layout_marginLeft="10dip"
android:orientation="vertical">
<TextView
android:id="#+id/emailsubject"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:singleLine="true"
android:text="abcd"
android:textColor="#444444"
android:textSize="18sp" />
<TextView
android:id="#+id/emailcontent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#id/emailsubject"
android:layout_below="#id/emailsubject"
android:ellipsize="marquee"
android:gravity="center"
android:singleLine="true"
android:text="defg"
android:textColor="#444444"
android:textSize="14sp" />
</LinearLayout>
<ImageView
android:id="#+id/unreademail"
android:layout_width="2dip"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:layout_marginBottom="5dip"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:background="#8A6175"
android:visibility="invisible" />
<TextView
android:id="#+id/rcvdate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:paddingRight="20dip"
android:textColor="#313132"
android:textSize="12sp" />
</RelativeLayout>

Not proper view in landscape

I am having a settings page in my application.In potrait all the fields are showing properly but when I switch to landscape mode the fields height are reducing and the hint of the fields are hiding which is not what I want.
I dont why it is happening.
It is my xml file:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/layoutsettings"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<Button
android:id="#+id/Button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40sp"
android:layout_marginRight="40sp"
android:gravity="center_horizontal"
android:padding="10sp"
android:text="Signin with FB" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<EditText
android:id="#+id/UserFirstName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:hint="FName"
android:textSize="15sp" />
<EditText
android:id="#+id/UserLastName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:hint="LName"
android:textSize="15sp" />
</LinearLayout>
<EditText
android:id="#+id/PhoneNumber"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="PhoneNumber"
android:inputType="number"
android:phoneNumber="true"
android:textSize="15sp" />
<EditText
android:id="#+id/EmailAddress"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="EmailAddress"
android:textSize="15sp" />
<EditText
android:id="#+id/AddressLine1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Address Line 1"
android:textSize="15sp" />
<EditText
android:id="#+id/AddressLine2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Address Line 2"
android:textSize="15sp" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<EditText
android:id="#+id/Locality"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:hint="Locality"
android:textSize="15sp" />
<EditText
android:id="#+id/City"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:hint="City"
android:textSize="15sp" />
</LinearLayout>
<EditText
android:id="#+id/PinCode"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:height="30dp"
android:layout_weight="0.5"
android:hint="PinCode"
android:inputType="number"
android:textSize="15sp" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/Feedback"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:text="Feedback"
android:textSize="17sp"
android:layout_marginLeft="20dp" />
<RatingBar
android:id="#+id/ratingbar"
style="#style/CustomRatingBar"
android:layout_width="wrap_content"
android:layout_height="50px"
android:layout_marginRight="20sp" />
</LinearLayout>
</LinearLayout>
If anybody can tell me what to do.
Thanks.
You need to create another folder in res called layout-land and add the same xml with the same code and arrange it accordingly. Then when you rotate your device/emulator then the xml in layout-land will inflate on your device/emulator

Switch between two or more edit text in android

Suppose I have two or more EditTextview in my layout and at run time by mistake I selected 2nd view and filled it with text; now I want to go to previous EditText view and on touch gain it's focus to write some text inside it.
But I am unable to do this. I can't gain focus of view and write it on click that particular view.
See the code below:
<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/wall">
<EditText
android:id="#+id/title"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:textSize="30dp"
android:focusable="true"
android:hint="#string/Title" />
<EditText
android:id="#+id/body"
android:layout_width="fill_parent"
android:layout_height="350dp"
android:textSize="25dp"
android:paddingTop="45dp"
android:gravity="top"
android:inputType="textMultiLine|textNoSuggestions"
android:ems="10"
android:focusable="true"
android:hint="#string/program" />
<TextView
android:id="#+id/CalDisplay"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:textSize="20dp"
android:layout_below="#+id/save" />
<Button
android:id="#+id/Calculate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/body"
android:layout_toRightOf="#+id/RunProgram"
android:background="#drawable/custom_button"
android:textColor="#ffffff"
android:text="#string/Calculate" />
<Button
android:id="#+id/save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/Calculate"
android:layout_alignBottom="#+id/Calculate"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="#+id/RunProgram"
android:background="#drawable/custom_button"
android:textColor="#ffffff"
android:text="#string/Save"
/>
<Button
android:id="#+id/RunProgram"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/body"
android:layout_centerHorizontal="true"
android:background="#drawable/custom_button"
android:textColor="#ffffff"
android:text="#string/Run" />
</RelativeLayout>
Try this...
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<EditText
android:id="#+id/title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:hint="Title"
android:textSize="15dp" />
<EditText
android:id="#+id/body"
android:layout_width="fill_parent"
android:layout_height="350dp"
android:layout_below="#+id/title"
android:layout_marginTop="5dp"
android:gravity="left"
android:hint="program"
android:inputType="textMultiLine|textNoSuggestions"
android:textSize="15dp" />
<TextView
android:id="#+id/CalDisplay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_below="#+id/save"
android:textSize="20dp" />
<LinearLayout
android:id="#+id/linearButtons"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/body" >
<Button
android:id="#+id/Calculate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Calculate"
android:textColor="#ffffff" />
<Button
android:id="#+id/save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Save"
android:textColor="#ffffff" />
<Button
android:id="#+id/RunProgram"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Run"
android:textColor="#ffffff" />
</LinearLayout>
</RelativeLayout>
Replace RelativeLayout with LinearLayout. Because it seems like your EditText are overlapping each other (causing the problem in getting focus), or at least add some respective aligning to them.
For example, add the following to your second EditText:
android:layout_below="#id/title"

Which layout have to use

I am new to android app development.I am developing an android app which is having a design like the following one.Which layout I have to use.If I use Linear layout I cannot place "Product Amount" Textview and Editbox in a stright line.Please help me to solve this.
you can do this using Linear Layout also
Try below code
<LinearLayout 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">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Product Amount"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="#+id/editText1"
android:layout_width="140dp"
android:layout_marginLeft="10dp"
android:layout_height="wrap_content"
>
<requestFocus />
</EditText>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
<EditText
android:id="#+id/editText2"
android:layout_width="80dp"
android:layout_marginLeft="5dp"
android:layout_height="wrap_content"
/>
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="%"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="TextView" />
<EditText
android:id="#+id/editText3"
android:layout_marginLeft="5dp"
android:layout_width="80dp"
android:layout_height="wrap_content"
/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
<EditText
android:id="#+id/editText4"
android:layout_width="80dp"
android:layout_marginLeft="5dp"
android:layout_height="wrap_content"
/>
<TextView
android:id="#+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="%"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="TextView" />
<EditText
android:id="#+id/editText6"
android:layout_marginLeft="5dp"
android:layout_width="80dp"
android:layout_height="wrap_content"
/>
</LinearLayout>
See below it's give me output like this
You will have to use more than one layout. Your xml will be something like this.
Linear Layout main (Vertical)
Linear Layout1 (Horizontal) - for first row.
Layout 1 ends
Linear Layout2 (Horizontal) - for second row.
Layout 2 ends
Linear Layout3 (Horizontal) - for third row.
Layout 3 ends
Text Sale Amt
Layout main ends
Edit:
<?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" >
<LinearLayout
android:id="#+id/l1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dip"
android:layout_marginRight="3dip"
android:layout_weight="1"
android:padding="3dip"
android:text="Name" />
<EditText
android:id="#+id/nameedt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dip"
android:layout_marginRight="3dip"
android:layout_weight="1"
android:inputType="textNoSuggestions"
android:padding="3dip" />
</LinearLayout>
<LinearLayout
android:id="#+id/l2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/pwd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dip"
android:layout_marginRight="3dip"
android:padding="3dip"
android:layout_weight="1"
android:text="Password" />
<EditText
android:id="#+id/pwdedt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dip"
android:layout_marginRight="3dip"
android:inputType="textNoSuggestions"
android:layout_weight="1"
android:padding="3dip" />
</LinearLayout>
<TextView
android:id="#+id/pwdhint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dip"
android:layout_marginRight="3dip"
android:padding="3dip"
android:layout_weight="1"
android:text="PasswordHint : HINT"
android:layout_gravity="center"/>
</LinearLayout>
You Should use TableLayout, with First Row Having four columns, use col span to extend a column for two columns, add View, where Cell isnt exist.

AutoCompleteTextView drop-down appears above the edit field instead of beneath

I have an AutoCompleteTextView, which drop-down appears above the view instead of below. Can someone help me and explain the reason of this? Can it be fixed without changing the layout too much?
Here is the part of my layout which includes mentioned AutoCompleteTextView:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:orientation="horizontal" >
<LinearLayout
android:id="#+id/LinearNewSearch"
android:layout_width="wrap_content"
android:layout_height="60dip"
android:layout_alignParentRight="true"
android:gravity="right"
android:orientation="horizontal" >
<TextView
android:id="#+id/TextView16"
android:layout_width="35dip"
android:layout_height="wrap_content"
android:gravity="center"
android:text="0.0"
android:textColor="#ffa500"
android:textSize="18sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" = "
android:textColor="#00ff00"
android:textSize="17sp"
android:textStyle="bold" />
<EditText
android:id="#+id/EditText17"
android:layout_width="45dip"
android:layout_height="fill_parent"
android:focusable="false"
android:gravity="center"
android:inputType="numberDecimal"
android:text="0.0" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" x "
android:textColor="#00ff00"
android:textSize="17sp"
android:textStyle="bold" />
<AutoCompleteTextView
android:id="#+id/NewSearch"
android:layout_width="190dip"
android:layout_height="fill_parent"
android:layout_marginRight="10dip"
android:completionThreshold="1"
android:dropDownHeight="120dp" />
</LinearLayout>
<LinearLayout
android:id="#+id/NewList"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#id/LinearNewSearch"
android:layout_marginRight="5dip"
android:layout_marginTop="-7dip"
android:gravity="top"
android:orientation="horizontal" >
<Button
android:id="#+id/AddNewSearch"
android:layout_width="50dip"
android:layout_height="50dip"
android:layout_gravity="center"
android:layout_marginBottom="25dip"
android:layout_marginRight="5px"
android:text="+"
android:textColor="#000080"
android:textSize="15sp"
android:textStyle="bold" />
<VerticalSeekBar
android:id="#+id/seekbar2"
android:layout_width="wrap_content"
android:layout_height="150dip"
android:layout_marginRight="8px"
android:max="10"
android:progress="1" />
<LinearLayout
android:id="#+id/LinearLayout80"
android:layout_width="210dip"
android:layout_height="150dip"
android:layout_marginRight="15dip"
android:background="#25FFFFFF"
android:orientation="vertical" >
<ListView
android:id="#+id/List06"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
I've seen a suggestion to add android:dropDownHeight="100dp" to AutoCompleteTextView declaration, but that didn't help.
Try adding dropDownVerticalOffset attribute to AutoCompleteTextView in your xml:
...
<AutoCompleteTextView
android:id="#+id/NewSearch"
android:layout_width="190dip"
android:layout_height="fill_parent"
...
android:dropDownVerticalOffset="50dp"
...
/>
...

Categories

Resources