android-edittext

How to make an EditText to be focused but not clickable?(Xamarin.Android)

一曲冷凌霜 提交于 2020-01-06 08:36:12
问题 I have 3 EditText : <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:focusedByDefault="false" android:minWidth="25px" android:minHeight="25px" android:id="@+id/editText1" /> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:focusedByDefault="true" android:clickable="false" android:id="@+id/editText2" /> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:focusedByDefault=

No soft keyboard for the EditText inside the Dialog Box

你离开我真会死。 提交于 2020-01-06 08:33:12
问题 I'd like to create a Dialog Box where the user can insert a number; so I overrided the onCreateDialog method this way: protected Dialog onCreateDialog(int id) { EditText editNum=new EditText(this); editNum.setMaxLines(1); editNum.setRawInputType(InputType.TYPE_CLASS_NUMBER); String strVal=listViewNum.getItemAtPosition(selectedItem).toString(); strVal=strVal.substring(strVal.indexOf("=")+1,strVal.length()-1); editNum.setText(Util.formatNumber(Double.parseDouble(strVal))); editNum.selectAll();

Can't edit an edittext in a popup window without dismissing and recalling it first

馋奶兔 提交于 2020-01-06 05:41:08
问题 I am using a popup window to display some information and have an edit button that allows that information to be changed. I am loading all textviews, buttons and edittext fields and hiding/showing them as needed. The edittext fields are not letting me edit them. I have tried the below suggestion about setting focusable to true, but that isn't working. Any other suggestions? Tried this: EditText On A Popup Window EDIT: Below is part of my code. I've just included the parts for initializing the

Clipboard shows a different label

ε祈祈猫儿з 提交于 2020-01-06 05:30:08
问题 The behavior of long-pressing on an edittext is showing a Clipboard with a wrong label as shown in the picture below. instead of having the normal label Clipboard it's showing tw_clipboard_title_text . This is especially happening in samsung. What could be the issue? I'm not even dealing with ClipboardManager <EditText android:id="@+id/signup_Phone" android:layout_width="match_parent" android:layout_height="wrap_content" android:afterTextChanged="@{viewModel::onUsernameChanged}" android

Clipboard shows a different label

和自甴很熟 提交于 2020-01-06 05:30:07
问题 The behavior of long-pressing on an edittext is showing a Clipboard with a wrong label as shown in the picture below. instead of having the normal label Clipboard it's showing tw_clipboard_title_text . This is especially happening in samsung. What could be the issue? I'm not even dealing with ClipboardManager <EditText android:id="@+id/signup_Phone" android:layout_width="match_parent" android:layout_height="wrap_content" android:afterTextChanged="@{viewModel::onUsernameChanged}" android

Android EditText Validation and Regex

早过忘川 提交于 2020-01-06 03:45:14
问题 i am about to create editText Validation for android, I used if..else statement but the coding seem like not working for my apps...I want to make all the field is mandatory,if you leave one field blank you cannot proceed, and I am also curious about the validation for phone number,since I am from Malaysia the valid phone number is eg:0133999504, the "-" symbol or any letter are disallowed..only digit and "+" sign are valid..Same goes for IC number, IC number in Malaysia is like a identity

Custoom floating toolbar for text selection controls

試著忘記壹切 提交于 2020-01-06 03:40:08
问题 I want to customize the floating toolbar that appears when you select a text. This is an example of the standard floating toolbar: . Do you know how I can customize it (like adding Bold, Italic,...)? Is there an external library? The Monospace app has exactly what I want: 回答1: You’ll add an intent filter to an Activity in your manifest: <activity android:name=".ProcessTextActivity" android:label="@string/process_text_action_name"> <intent-filter> <action android:name="android.intent.action

Check if EditText has specific character

*爱你&永不变心* 提交于 2020-01-06 03:37:07
问题 I searched a while but could not find how to check for a specific character in a string that was typed in an EditText? 回答1: By using TextWatcher, you can achieve so. editText.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { } public void beforeTextChanged(CharSequence s, int start, int count, int after) { } public void onTextChanged(CharSequence s, int start, int before, int count) { Log.i(TAG, "specific character = " + s.charAt(count-1)); } }); 回答2: I am

Checking if EditText.isEmpty() not working

戏子无情 提交于 2020-01-06 02:28:11
问题 In my code, I want to check if the password field is empty . I am using the isEmpty() method to accomplish it but it does not work. Leaving the password field blank, reverts to the 2nd else-if statement and not the third. public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final EditText password = (EditText) findViewById(R.id.editText_Password); Button enter =

How to make EditText's parent clickable?

£可爱£侵袭症+ 提交于 2020-01-05 12:57:09
问题 Suppose I have this pink box: It consists of LinearLayout with its children: TextView as field name and an EditText . EditText is intentionally disabled. What I want is that, user can click wherever user wants on that pink box. By the way, please just ignore any UI/UX things that you found weird. I've tried, but user can't tap the area that EditText occupies. User have to tap in TextView or blank area on pink box so that the apps got the 'click'. But if user taps on EditText 's area, nothing