android-edittext

EditText with an helpper tooltip

被刻印的时光 ゝ 提交于 2019-12-20 03:53:26
问题 I have this app on iphone and I want to make it for android,on iphone when start edit text in a EditText a tooltip with a message is showing in the top of display,i want to make it work for android too,but i didn't find anything that help,here is a link with iphone printscreen http://www.codemyworld.com/edi/Android/IMG_0022.PNG 回答1: @Override public void onTextChanged(CharSequence cs, int arg1, int arg2, int arg3) { //your code here //showtooltip(); } @Override public void beforeTextChanged

edittext visible means how can i check the if condition in android

孤人 提交于 2019-12-20 03:28:06
问题 I have checked my edittext is visible or invisible in android. Now i have to check the condition is., If my edittext is visible means how can i insert the data. If my edittext is gone means how can i insert on another data. This is my code for if i have to check the checkbox means the edittext is invisible otherwise the edittext is visible .: chkIos = (CheckBox) findViewById(R.id.addresscheckbox); chkIos.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if ((

Android custom ListView: adding search function

情到浓时终转凉″ 提交于 2019-12-20 02:31:04
问题 i've a problem, i want an EditText above my ListView that performs a search in that ListView. Is it possible to do? This is the Activity code: public static class BirreChiareListView extends Main implements AdapterView.OnItemClickListener { ListView list; String [] birrechiare; int [] images={R.drawable.ichnusa, R.drawable.ichnusa_speciale, R.drawable.ichnusa_cruda}; private MyAdapter adapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

Android - Want to restrict some charaters to the edittext

落花浮王杯 提交于 2019-12-20 02:26:07
问题 I got stuck up with the following scenario. I have an edit text and its a Password field. And I want to restrict some characters like (a-z, A-Z, 1-0 and some special chars). I set the inputType of this edittext as "textPassword" and used Numberkeylistner to restrict the characters. It works fine in Motorola xoom tablet. But I am getting suggestions while entering the Password in ASUS tablet. The problem is when I comment the following set of lines then its working fine that means its not

How to create a empty bullet paragraph by BulletSpan?

為{幸葍}努か 提交于 2019-12-20 02:22:06
问题 I wanted to create a empty bullet paragraph, but it didn't work. This is my code: EditText contentET = (EditText) findViewById(R.id.content); contentET.setText("abc\n123\n"); Spannable s = contentET.getText(); s.setSpan(new BulletSpan(), 0, 1, Spannable.SPAN_INCLUSIVE_INCLUSIVE); s.setSpan(new BulletSpan(), 4, 5, Spannable.SPAN_INCLUSIVE_INCLUSIVE); s.setSpan(new BulletSpan(), 7, 8, Spannable.SPAN_INCLUSIVE_INCLUSIVE); contentET.setText(s); When i ran above code, it seemed this line doesn't

scrollview can't scroll when focus textinput react native

我的未来我决定 提交于 2019-12-20 01:59:08
问题 I have a TextInput inside a ScrollView. The scroll isn't working when the TextInput is on focus. This problem is only affecting Android. 回答1: setting <ScrollView keyboardShouldPersistTaps="always" in combination with the textInout component below (custom component that i created for text inputs to solve this issue) solved my problem: <TouchableOpacity activeOpacity={1} onPress={()=>this.input.focus()}> <View pointerEvents="none" <TextInput ref = {(input) => this.input = input} /> </View> <

EditText custom string formatting

牧云@^-^@ 提交于 2019-12-20 00:41:38
问题 I searched every question similar to my problem but didn't get it working. My problem is this: I want to format a string in EditText while typing. The format is this ( it's always a 19 digit number ): 012345 01 0123456789 0 As you can see I want to add spaces when they are needed while the user is typing. I know that I have to use the TextWatcher but everything I do I don't get what i want. Edit : Here is the code of my last try: @Override public void afterTextChanged(Editable s) { if(s

Xamarin EditText InputType Password

拈花ヽ惹草 提交于 2019-12-19 19:04:53
问题 I got some EditText fields that are created from a JSON file, so I cannot change the XML files. But I want some EditText fields to have input type "password". I'm working in Xamarin Studio with C#. I got something like this but that doesn't work: editText.InputType = InputTypes.TextVariationPassword; 回答1: Try this: editText.InputType = Android.Text.InputTypes.TextVariationPassword | Android.Text.InputTypes.ClassText; Edit: There are still some interest (i.e. votes) in this answer now after 2

Xamarin EditText InputType Password

放肆的年华 提交于 2019-12-19 19:04:08
问题 I got some EditText fields that are created from a JSON file, so I cannot change the XML files. But I want some EditText fields to have input type "password". I'm working in Xamarin Studio with C#. I got something like this but that doesn't work: editText.InputType = InputTypes.TextVariationPassword; 回答1: Try this: editText.InputType = Android.Text.InputTypes.TextVariationPassword | Android.Text.InputTypes.ClassText; Edit: There are still some interest (i.e. votes) in this answer now after 2

Android How to get selected word in Edittext?

↘锁芯ラ 提交于 2019-12-19 17:52:07
问题 I am developing an app like Notepad in which I want to change the selected text formatting dynamically (colors, changing font styles, bold, italic, underline etc.) How can I format a specific word? 回答1: You can get the selected word using getSelectionStart() and getSelectionEnd() method : EditText etx=(EditText)findViewById(R.id.editext); int startSelection=etx.getSelectionStart(); int endSelection=etx.getSelectionEnd(); String selectedText = etx.getText().substring(startSelection,