android-edittext

Android EditText Binding is broken after MvvmCross update from 4.2.3 to 4.4.0 with Linker enabled

烂漫一生 提交于 2019-12-03 15:39:21
My MvvmCross Android app which was working before now is broken because of MvvmCross update from 4.2.3 to 4.4.0 <EditText android:layout_width="match_parent" android:layout_height="match_parent" local:MvxBind="Text Login" /> public string Login { get { return _login; } set { SetProperty(ref _login, value); } } LinkerPleaseInclude if of course there: public void Include(EditText text) { text.Enabled = !text.Enabled; text.TextChanged += (sender, args) => text.Text = "" + text.Text; text.Hint = "" + text.Hint; text.Click += (s, e) => text.Visibility = text.Visibility - 1; } public void Include

Show Helper text below EditText along with the Hint

巧了我就是萌 提交于 2019-12-03 15:39:21
问题 I am trying to make something on these lines: I am able to show the hint using android:hint="Email Address" but unable to show the helper text - This will be your email username <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/et_username" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="15" android:hint="Username" app:et_helper="Username is preferably your

onEditorAction() is not called after Enter key has been pressed on Jelly Bean emulator

南楼画角 提交于 2019-12-03 14:55:10
问题 I'm having a problem with the behavior of the latest Jelly Bean emulator. I have several EditTexts in my app. An OnEditorActionListener provides special handling when a user presses the ENTER key on the keyboard. This worked up until ICS, but now on Jelly Bean the listener callback method onEditorAction() no longer gets called. Only a new line is inserted into the EditText . This can be reproduced this way: EditText testEditText = new EditText(context); testEditText.setOnEditorActionListener

how to catch 'next' button on soft keyboard of Android

陌路散爱 提交于 2019-12-03 14:32:46
I have 6 Edittexts grouped in 6 differents layouts, all in the same view. My problem is that my app is forced to landscape mode, and by pressing the 'next' button i want to automatically start to edit another editText rather than the one android set me by default. Example: i'm writing on EditText1, press next, and focus is taken by the EditText that is UNDER the 1st one. I want to edit the one that is RIGHT to it. Sorry for my bad english :( The device is a galaxy tab, with Google API8/Android 2.2 Thanks Haven't tested it, but this should work some_edittext.setOnEditorActionListener(new

How to detect emoticons in EditText in android

强颜欢笑 提交于 2019-12-03 14:17:06
I want to detect whether my EditText contains smilie (emoticons) or not. But I have no idea that how to detect them. To disable emoji characters when typing on the keyboard I using the following filter: InputFilter filter = new InputFilter() { @Override public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { for (int i = start; i < end; i++) { int type = Character.getType(source.charAt(i)); //System.out.println("Type : " + type); if (type == Character.SURROGATE || type == Character.OTHER_SYMBOL) { return ""; } } return null; } };

Why the soft keyboard shows or not when an activity starts?

懵懂的女人 提交于 2019-12-03 14:00:34
When comparing our design between developers, we found a strange behavior. After some analysis we went to this observation. When the activity starts, on some cases the keyboard appears but sometimes not. In fact, without a ScrollView , the soft keyboard does not appear by default on an EditText . <LinearLayout 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" tools:context=".TestActivity" > <EditText android:id="@+id/editText1" android:layout_width="0dp" android

How to Get Text and Smiley from Edittext into String?

我怕爱的太早我们不能终老 提交于 2019-12-03 13:42:56
问题 How to Get text and smiley from edittext into String? Using Following Code I was Add Smiley/Emojis in Edittext but how to get text/smiley from edittext into String Format. ImageGetter imageGetter = new ImageGetter() { public Drawable getDrawable(String source) { Drawable d = getResources().getDrawable( R.drawable.happy); d.setBounds(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight()); return d; } }; cs = Html.fromHtml( "<img src='" + getResources() .getDrawable(R.drawable.happy) + "'/>",

Android Edittext with auto detection of credit card type

谁都会走 提交于 2019-12-03 13:34:18
问题 I am dealing with payment option in android, By give an option to make a payment with credit card, some of the users may mistakenly choosing different credit card type for some other credit card number, so i decided to take a look for this issue to auto detect the card type based on number entered, I found Flipkart have this already in their android application, here i attach that functionality, how to do this like a animation happening while changing the card type? I know to make a text

How to change hint text size without changing the text size in EditText

爱⌒轻易说出口 提交于 2019-12-03 13:16:17
I have a EditText input field. I have added a hint in it. Now i want to change the size of hint text, but when i do this, it also effects the size of the text. Kindly guide me how to change the size of hint and text separately, and give different fonts to both the hint and the text. <EditText android:layout_width="0dp" android:layout_height="50dp" android:layout_weight="1" android:textSize="12sp" android:textColor="#ffffff" android:fontFamily="sans-serif-light" android:hint="MM/YY" android:textColorHint="@color/white" /> The hint and the text are exclusive, if one of them is visible, the other

Android - onTextChanged() called on when phone orientation is changed

拈花ヽ惹草 提交于 2019-12-03 12:59:39
I tried to implement search using EditText . whenever a text is typed in the EditText request is sent with the typed text in onTextChanged() method. When I change the orientation of the phone with the results displyed, onTextChanged() method is called again with same text. How can I avoid redundant call to onTextChanged() method on orientation change. public void onTextChanged(CharSequence s, int start, int before, int count) { final String enteredKeyword = s.toString(); if(isFragmentVisible && !enteredKeyword.equals("")) { searchTimer.cancel(); searchTimer = new Timer(); TimerTask searchTask