android-edittext

Android edittext is underlined when typing

耗尽温柔 提交于 2019-12-07 03:34:13
问题 I need to removed underline when type in edit text field in Android. For the first name edit text first letter should be capital so that I have given textCapSentences , but in my case I see underline in edittext fields. how to remove that? I have tried all the combination of textFilter|textNoSuggestions|textCapSentences its my first name edit text: <EditText android:id="@+id/signup_lname" android:layout_width="match_parent" android:layout_height="60dp" android:background="@color/signup_layer

Android Acccessibility: How do I change the text read out loud for an EditText View

扶醉桌前 提交于 2019-12-07 03:01:29
问题 By default, the Accessibility Services will read out the following for an EditText view If the EditText has a value entered = it will read out that value If there is not value entered = it will read out the "hint" I want it to read out something completely different in both cases. My xml snippet is <EditText android:id="@+id/my_edit_text" android:layout_height="wrap_content" android:layout_width="0dp" android:layout_weight="1" android:editable="false" android:focusable="true" android:hint="my

Android - set focus on EditText after Spinner selection

喜欢而已 提交于 2019-12-07 02:26:56
问题 I have the following items displayed on the screen: EditText Forename Spinner gender selection (Male | Female) EditText Email When the application is first launched, I want the focus to be set on the Forename EditText. Then after "Male" or "Female" has been selected in the Spinner, I want the focus to be set on the Email EditText that is located below the spinner. I have used setOnItemSelectedListener to set the requestFocus on the email EditText, but the problem is that it automatically sets

Changing the color of EditText's underline

馋奶兔 提交于 2019-12-07 02:02:44
问题 I have tried to change the underline color of my EditText with the help of this thread. I did the same thing - this is the EditText with the android:background set as @drawable/edt_bg_selector . <EditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="10" android:id="@+id/editText4" android:layout_weight="1" android:elevation="0dp" android:background="@drawable/edt_bg_selector" /> My edt_bg_selector : <?xml version="1.0" encoding="utf-8"?> <selector

How to create a Edittext in action bar in android?

假如想象 提交于 2019-12-07 01:08:00
问题 Can we use an edit text in action bar? After reading lot of resources in Google i could not find how to create an edit text in action bar. Can anyone tell me how do i do it? 回答1: You can set a custom View for the ActionBar like this: getActionBar().setCustomView(R.layout.custom_actionbar); You can then find Views from the custom View in the ActionBar like this: View actionBarView = getActionBar().getCustomView(); EditText editText = (EditText) acitonBarView.findViewById(R.id.editText); Or you

How to reset EditText after an action has been completed?

こ雲淡風輕ζ 提交于 2019-12-07 00:44:04
问题 I would like to reset my EditText back to an empty "space" or a "hint" after a button has pressed that would have completed an activity with input from the EditText field. My adventure with android thus beckons. Cheers. Thank you !! //************-------------------SEND SMS----------------*********// btnSendSMS = (Button)findViewById(R.id.sms); btnSendSMS.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub sendSMS(dispEd

How to set multiline,firstletter caps and disable suggestions on edittext

扶醉桌前 提交于 2019-12-07 00:37:04
问题 I have an edittext for reply to email. i want to give three properties for edittext like Multiline, First character caps and disable word suggestions. I gave like this in xml... android:inputType="textCapSentences|textVisiblePassword" I tried in code also... etMessage.setInputType(InputType.TYPE_TEXT_FLAG_MULTI_LINE|InputType.TYPE_TEXT_FLAG_CAP_SENTENCES); I am not able to give multiline....how can i achieve this thanks 回答1: I found solution for this problem Just set the following parameters

Android EditText Multiline with SoftInputMode adjustPan

霸气de小男生 提交于 2019-12-06 23:56:52
问题 I have an activity to edit some text with a top bar a EditText view in multiline mode inside a scrollview. At the bottom another view with 2 buttons. What I wanted to achieve is when editing the text that bottom bar would be below the softkeyboard. That is easy using android:windowSoftInputMode="adjustPan" in the manifest. The problem is if the edittext becomes big enough with several lines, when editing the topbar it disappears. This only occurs when using adjustPan mode. But the worst and I

Setting EditText imeOptions to actionNext has no effect when using digits

五迷三道 提交于 2019-12-06 22:38:30
问题 Here my edittext:- <com.os.fastlap.util.customclass.EditTextPlayRegular android:id="@+id/full_name_et" style="@style/Edittext_white_13sp" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/_5sdp" android:background="#00ffffff" android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" android:imeOptions="actionNext" android:inputType="text" android:maxLength="20" android:maxLines="1" android:nextFocusDown="@+id/last_name_et"

How to remove Android auto-suggest underlining in EditText?

☆樱花仙子☆ 提交于 2019-12-06 22:30:23
问题 I'm using an EditText to write some text. Android's auto-suggest underlines the word, until we hit space. Now, if I enter the word without the space, the resulting text has an underline. It's because I use Html.toHtml(view.getText()). Now, there are a few answers I'll be expecting such as disabling auto-suggestion or using view.getText().toString(), but I need them both. I need the auto-suggestion feature as well as the formatting of the text. An example which solves this problem is the Gmail