I am trying to give gap between hint and below line inside TextInputLayout ,In design it is showing gap if I include paddingBottom.But after running the app that gap is not reflecting.Below is my code.
<RelativeLayout
android:id="#+id/input_password_outer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/layout_country_text_fields"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp">
<android.support.design.widget.TextInputLayout
android:id="#+id/input_password"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<EditText
android:id="#+id/input_oldpwd_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Confirm New Password"
android:inputType="textPassword"
android:paddingBottom="25dp"
android:textColor="#color/registration_login_edit_text"
android:textSize="15sp" />
</android.support.design.widget.TextInputLayout>
<LinearLayout
android:layout_width="38dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="10dp"
android:layout_weight="#dimen/password_eye_weight"
android:gravity="right|center_horizontal"
android:scaleType="fitXY">
<ToggleButton
android:id="#+id/confirm_password_toggle_button"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_alignParentRight="true"
android:layout_gravity="right"
android:background="#color/mobile_screen_background"
android:clickable="true"
android:gravity="right|center_horizontal"
android:padding="3dp"
android:textOff=""
android:textOn=""
/>
</LinearLayout>
</RelativeLayout>
You need to define specific style for TextInputLayout.
<android.support.design.widget.TextInputLayout
android:id="#+id/input_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="#style/TextInputLayoutLabel" >
<EditText
android:id="#+id/input_oldpwd_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Confirm New Password"
android:inputType="textPassword"
android:textColor="#color/registration_login_edit_text"
android:textSize="15sp" />
</android.support.design.widget.TextInputLayout>
And inside res -> values --> style.xml. This will reflect Runtime.
<style name="TextInputLayoutLabel" parent="Widget.Design.TextInputLayout">
<!-- Hint color and label color in FALSE state -->
<item name="android:textColorHint">#android:color/black</item>
<item name="android:textSize">15sp</item>
<item name="android:paddingBottom">25sp</item>
</style>
EDIT 1
Here you can see the output at Runtime on my pixel emulator.
Related
So I've been struggling centring this button in my View for about 3 hours I've gave up and came here to ask for some advice from more experienced android developers.
For now it looks like this.
I would like to look something like this
My view looks like this in code:
<RelativeLayout
android:id="#+id/receptionLineAddQuantityAndSeries"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:paddingBottom="#dimen/padding_layout">
<RelativeLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_above="#+id/layoutQntInput"
local:MvxBind="Visibility Article.SeriesType, Converter=Visibility;">
<Mvx.MvxImageView
android:id="#+id/articleSeriesImage"
android:src="#drawable/ic_list_white_48dp"
android:layout_width="wrap_content"
android:scaleType="center"
android:paddingRight="#dimen/padding_layout"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_alignParentRight="true"
android:background="#drawable/button_border"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp" />
<RelativeLayout
android:id="#+id/layoutInputSeries"
android:paddingLeft="#dimen/padding_layout"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginRight="58dp">
<TextView
android:id="#+id/suppliersSearchInputLabelCode"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_alignParentTop="true"
style="#style/ExtendProTheme.EditTextLabel"
local:MvxBind="Visibility Article.SeriesType, Converter=Visibility; Text Article.SeriesType, Converter=ArticleSeriesTypeToLabel;" />
<CC.CustomEditText
android:id="#+id/inventoryIdentifyArticleEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:theme="#style/ExtendProTheme"
android:maxLength="20"
android:layout_below="#+id/suppliersSearchInputLabelCode"
style="#style/ExtendProTheme.EditText"
local:MvxBind="Text Article.SeriesName, Mode=TwoWay; Error Errors['SeriesName']; Visibility Article.SeriesType, Converter=Visibility; Hint Article.SeriesType, Converter=ArticleSeriesTypeToHint; EnterCommand GetSeriesTotalQuantityCommand; FocusChangeCommand GetSeriesTotalQuantityCommand;" />
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
What i've tried so far is all the combination of
android:scaleType = fitXY, fitCenter, center, matrix
fixed widths for the ImageView, no results...
Any help would be nice.
I've tried all the answers below and they still didn't show as expected. I found a version that looks close to what i need .
<Mvx.MvxImageView
android:layout_width="48dp"
android:layout_height="match_parent"
android:src="#drawable/ic_list_white_48dp"
android:id="#+id/articleSeriesImage"
style="#style/ExtendProTheme.ListButtonSeriesStyle">
<style name="ExtendProTheme.ListButtonSeriesStyle">
<item name="android:scaleType">matrix</item>
<item name="android:paddingRight">#dimen/padding_layout</item>
<item name="android:layout_marginLeft">8dp</item>
<item name="android:layout_marginRight">8dp</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:background">#drawable/button_border</item>
<item name="android:layout_alignParentRight">true</item>
<item name="android:layout_gravity">center</item>
</style>
try this one :)
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:id="#+id/receptionLineAddQuantityAndSeries">
<Mvx.MvxImageView
android:id="#+id/articleSeriesImage"
android:src="#drawable/ic_list_white_48dp"
android:layout_width="60dp"
android:layout_height="match_parent"
android:scaleType="center"
android:paddingRight="#dimen/padding_layout"
android:gravity="center"
android:layout_alignParentRight="true"
android:background="#drawable/button_border"
android:layout_marginRight="15dp"
android:layout_centerVertical="true"/>
<TextView
android:id="#+id/suppliersSearchInputLabelCode"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginLeft="10dp"
style="#style/ExtendProTheme.EditTextLabel"
local:MvxBind="Visibility Article.SeriesType, Converter=Visibility; Text Article.SeriesType, Converter=ArticleSeriesTypeToLabel;" />
<CC.CustomEditText
android:id="#+id/inventoryIdentifyArticleEditText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:theme="#style/ExtendProTheme"
android:maxLength="20"
android:layout_below="#+id/suppliersSearchInputLabelCode"
android:layout_toLeftOf="#+id/articleSeriesImage"
style="#style/ExtendProTheme.EditText"
local:MvxBind="Text Article.SeriesName, Mode=TwoWay; Error Errors['SeriesName']; Visibility Article.SeriesType, Converter=Visibility; Hint Article.SeriesType, Converter=ArticleSeriesTypeToHint; EnterCommand GetSeriesTotalQuantityCommand; FocusChangeCommand GetSeriesTotalQuantityCommand;" />
</RelativeLayout>
try this ,check for syntax
<RelativeLayout>
<TextView
id=#+id/yourtxtv
/>
<ImageView
android:layout_alignBaseline
android:align_right_to="#+id/yourtxtv"
android:margin_right=xxxx(put the value u want to put)
/>
</RelativeLayout>
This is what I tried and found:
<RelativeLayout
android:id="#+id/receptionLineAddQuantityAndSeries"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<RelativeLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"/>
<ImageView
android:id="#+id/articleSeriesImage"
android:src="#drawable/ic_android"
android:background="#color/blue"
android:layout_width="wrap_content"
android:scaleType="center"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_alignParentRight="true"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp" />
<RelativeLayout
android:id="#+id/layoutInputSeries"
android:paddingLeft="64dp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginRight="58dp">
<TextView
android:id="#+id/suppliersSearchInputLabelCode"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:text="sn"
android:layout_alignParentTop="true"/>
<EditText
android:id="#+id/inventoryIdentifyArticleEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:theme="#style/ExtendProTheme"
android:maxLength="20"
android:layout_below="#+id/suppliersSearchInputLabelCode"/>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
The solution was
<Mvx.MvxImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="#drawable/ic_list_white_48dp"
android:id="#+id/articleSeriesImage"
style="#style/ExtendProTheme.ListButtonSeriesStyle">
<style name="ExtendProTheme.ListButtonSeriesStyle">
<item name="android:scaleType">matrix</item>
<item name="android:paddingRight">#dimen/padding_layout</item>
<item name="android:layout_marginLeft">8dp</item>
<item name="android:layout_marginRight">8dp</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:background">#drawable/button_border</item>
<item name="android:layout_alignParentRight">true</item>
<item name="android:layout_gravity">center</item>
</style>
It's the only way it worked . Thanks all for ideas.
I have the following layout for my custom log in dialog
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="#dimen/padding_large">
<ImageButton android:src="#drawable/ic_settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/dialog.login.settings"
android:padding="#dimen/margin_medium" />
<TextView android:text="#string/dialog.login.text.user_name"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<EditText android:id="#+id/dialog.login.user_name"
android:layout_width="match_parent"
android:gravity="center"
android:ems="20"
android:layout_height="wrap_content"
android:inputType="text"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView android:text="#string/dialog.login.text.password"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<EditText android:id="#+id/dialog.login.password"
android:layout_width="match_parent"
android:gravity="center"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:textAppearance="?android:attr/textAppearanceMedium" />
<CheckBox android:id="#+id/dialog.login.show_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="#string/dialog.login.check.show_password"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_margin="#dimen/margin_medium"
android:checked="false" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button android:id="#+id/dialog.login.cancel"
android:drawableStart="#drawable/ic_exit_black"
android:layout_width="wrap_content"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginEnd="#dimen/margin_medium"
android:text="#string/dialog.login.button.cancel" />
<Button android:id="#+id/dialog.login.connect"
android:text="#string/dialog.login.button.connect"
android:layout_width="wrap_content"
android:layout_weight="1"
android:layout_marginStart="#dimen/margin_medium"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
when I create the dialog and setcontentview the width of the dialog becomes equal to that of the image button on the first row
if I remove that , it becomes the size of the EditText (dialog.login.user_name) whose ems is 20
when I make the dialog's constructor call the base dialog constructor with a theme of R.style.Theme.Material.Dialog it does get the correct (about 3/4 of the screen) but the problem is that it ignores my primary and accent colours (which is normal)
Is there a way to have the dialog have the Theme.Material.Dialog size but still keep my own primary/accent colours?
thanks in advance for any help you can provide
After a lot of searching it seems that the solution is to actually replace the dialogTheme attribute of my main theme, so the solution was:
<style name="app.theme"
parent="android:Theme.Material.Light.NoActionBar.Fullscreen">
<item name="android:dialogTheme">#style/app.dialog</item>
......
</style>
<style name="app.dialog"
parent="android:Theme.Material.Light.Dialog">
<item name="android:colorPrimary">#color/primary</item>
<item name="android:colorPrimaryDark">#color/primary.dark</item>
<item name="android:colorAccent">#color/accent</item>
</style>
I am using an app which displays a drop down Spinner with an EditText as a child of TextInputLayout next to it.
When an underlined error is shown under the TextInputLayout, then the EditText will go up, and alignment will miss !!
See my screenshot please:
What I am trying to do is:
Here is my xml code:
<LinearLayout
android:layout_width="#dimen/edittext_width"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="bottom">
<android.support.v7.widget.AppCompatSpinner
android:id="#+id/spinner_countries"
style="#style/Widget.AppCompat.Spinner.Underlined"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="30"
android:layout_gravity="start"
android:spinnerMode="dialog" />
<android.support.design.widget.TextInputLayout
android:id="#+id/input_layout_mobile"
style="#style/TextInputLayoutTheme"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="70">
<com.cashu.app.ui.widgets.CustomEditText
android:id="#+id/et_fragment_register_step_one_mobile"
android:layout_width="#dimen/edittext_mobile_num_width"
android:layout_height="wrap_content"
android:ems="12"
android:gravity="center_vertical"
android:layout_gravity="start"
android:hint="#string/mobile_hint"
android:inputType="number"
android:textSize="#dimen/font_size_normal" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
Here is my TextInputLayout theme:
<!-- TextInputLayout Style -->
<style name="TextInputLayoutTheme" parent="Widget.Design.TextInputLayout">
<item name="android:gravity">center</item>
<item name="android:textColor">#color/white</item>
<item name="android:textColorHint">#color/colorControlActivated</item>
<item name="errorTextAppearance">#style/AppTheme.TextErrorAppearance</item>
<item name="counterTextAppearance">#style/TextAppearance.Design.Counter</item>
<item name="counterOverflowTextAppearance">#style/TextAppearance.Design.Counter.Overflow</item>
</style>
I tried searching for many keywords, terms and methods but unfortunately with no luck.
I would appreciate if anyone has a hack for this issue.
Add app:errorEnabled="true" in TextInputLayout.
This will leave space for error even if error is not displayed. This will consume more space but will help you to maintain alignment.
Make your TextInputLayout as below.
<android.support.design.widget.TextInputLayout
android:id="#+id/input_layout_mobile"
style="#style/TextInputLayoutTheme"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="70"
app:errorEnabled="true">
Later in java:
To set error text use
textInputLayout.setError("Email can not be blank");
To remove error text and set view as normal
textInputLayout.setError("");
*Note that the use of textInputLayout.setErrorEnable(false) to remove the error will take out entire text view of error from the textInputLayout which will disturb your alignment.
I figured out my problem, I set margin to my AppCompatSpinner and set top gravity to it with specific hight.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="bottom"
android:orientation="horizontal">
<android.support.v7.widget.AppCompatSpinner
android:id="#+id/spinner_countries"
style="#style/Widget.AppCompat.Spinner.Underlined"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="26dp"
android:layout_weight="30"
android:spinnerMode="dialog" />
<android.support.design.widget.TextInputLayout
android:id="#+id/input_layout_mobile"
style="#style/TextInputLayoutTheme"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="70"
app:errorEnabled="true">
<com.cashu.app.ui.widgets.CustomEditText
android:id="#+id/et_mobile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:ems="12"
android:gravity="center_vertical"
android:hint="#string/mobile_hint"
android:inputType="number"
android:textSize="#dimen/font_size_normal" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
[EDIT]
When my TextInputLayout has an error, I remove it by adding the following lines:
myTextInputLayout.setErrorEnabled(false);
myTextInputLayout.setErrorEnabled(true);
myTextInputLayout.setError(" ");
Why?
This line: myTextInputLayout.setErrorEnabled(false); will clear the error from the TextInputLayout
This line: myTextInputLayout.setErrorEnabled(true); will enable error for the TextInputLayout again
This line: myTextInputLayout.setError(" "); will prevent layout alignment disruption.
Problem now is solved.
try this,
<LinearLayout
android:layout_width="300dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="bottom">
<android.support.v7.widget.AppCompatSpinner
android:id="#+id/spinner_countries"
style="#style/Widget.AppCompat.Spinner.Underlined"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="30"
android:spinnerMode="dialog" />
<android.support.design.widget.TextInputLayout
android:id="#+id/input_layout_mobile"
style="#style/TextInputLayoutTheme"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="70">
<EditText
android:id="#+id/et_fragment_register_step_one_mobile"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:ems="12"
android:gravity="center_vertical"
android:layout_gravity="start"
android:hint="Mobile No."
android:inputType="number"
android:textSize="20sp" />
</android.support.design.widget.TextInputLayout>
Is there a way to move up a little more the Floating Labels?
My Edit Text actually has a borderline or a frame, but when the hint floats it floats over the borderline.
Can anyone help me?
Please?
Yes There is a work around of this problem. Use
android:translationY="10dp"
to your EditText
try adjusting
android:paddingTop=""
android:paddingBottom=""
property of Floating Labels
You have definitely problems with android:padding. I don't see your code, but you may put them in wrong places.
Delete them first and let me know if problem still happening:
Here is an sample code from Android Material Design Floating Labels for EditText tutorial
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="#style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="#style/ThemeOverlay.AppCompat.Light" />
</android.support.design.widget.AppBarLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingTop="60dp">
<android.support.design.widget.TextInputLayout
android:id="#+id/input_layout_name"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="#+id/input_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:hint="#string/hint_name" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="#+id/input_layout_email"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="#+id/input_email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:hint="#string/hint_email" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="#+id/input_layout_password"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="#+id/input_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:hint="#string/hint_password" />
</android.support.design.widget.TextInputLayout>
<Button android:id="#+id/btn_signup"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/btn_sign_up"
android:background="#color/colorPrimary"
android:layout_marginTop="40dp"
android:textColor="#android:color/white"/>
</LinearLayout> </android.support.design.widget.CoordinatorLayout>
Also look at another great example to learn how it should be implemented from Google Samples Github Repository
Hope it help
use this textinputlayout,
<android.support.design.widget.TextInputLayout
android:id="#+id/username_text_input_layout"
style="#style/TextLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="#+id/etUsername"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:ems="10"
android:hint="Username"
android:imeOptions="actionNext"
android:inputType="text|textNoSuggestions"
android:maxLength="255"
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
you can use this style , set font as you need , edit this as per your need .
<style name="TextLabel" parent="TextAppearance.Design.Error">
<!--//hint color And Label Color in False State-->
<!--<item name="android:textColorHint">#color/colorPrimary</item>-->
<item name="android:textSize">#dimen/font_normal_size</item>
<!--//Label color in True State And Bar Color False And True State-->
<item name="colorAccent">#color/colorAccent</item>
<!--<item name="colorControlNormal">#color/</item>
<item name="colorControlActivated">#color/Color Name</item>-->
</style>
enter code here
<android.support.design.widget.TextInputLayout
android:id="#+id/firstnameLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
<EditText
android:id="#+id/firstname_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:hint="First Name"
android:inputType="text"
android:drawableLeft="#drawable/ic_person_black_18dp"
android:drawablePadding="5dp"
android:textColorHint="#693EB4" />
</android.support.design.widget.TextInputLayout>
Try this maybe it will help you.
I have complaint from my user:
"When input text in MultiAutoCompleteTextView control -> color of text and background are same and I cannot read text!"
Actually I'm using colors provided from device.
Here is my xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#android:drawable/title_bar"
android:id="#+id/title_layout" android:padding="5dp">
<TextView
android:id="#+id/tv_label"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:paddingLeft="5dp" android:layout_toLeftOf="#+id/btn_send"
android:textColor="#android:color/primary_text_light" android:textStyle="bold"
android:text="#string/_Find" android:layout_alignBaseline="#+id/btn_send" />
<Button
android:id="#+id/btn_send" android:text="#string/Search"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_alignParentRight="true"/>
</RelativeLayout>
<MultiAutoCompleteTextView
android:id="#+id/search_city"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_marginTop="3dp" android:layout_below="#+id/title_layout"
android:completionThreshold="1"
android:hint="#string/CityResort"
android:imeOptions="actionNext"
android:nextFocusRight="#+id/search_address"
android:drawableRight="#android:drawable/ic_input_delete"
android:singleLine="true"
android:text=""
>
<requestFocus />
</MultiAutoCompleteTextView>
<MultiAutoCompleteTextView
android:id="#+id/search_address"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/search_city"
android:layout_alignParentLeft="true"
android:completionThreshold="1"
android:hint="#string/adres_or_poi_name"
android:imeOptions="actionDone"
android:paddingTop="10dp"
android:drawableRight="#android:drawable/ic_input_delete"
android:singleLine="true"
android:text=""
/>
<FrameLayout
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:layout_alignParentBottom="true" />
The problem could be because of the different theme colors.
For eg. my motorola defy has the black theme therefore if you set white or black text on different native widgets, the background could be an unexpected one(like black and you set the text color to black) and the text can't be readable..
Try to set the theme of your application and maybe this will fix your problem.