android-edittext

Android 4.0.1 - XML Rendering Error in EditText. Index:0, Size: 0 - Vew draw failed

两盒软妹~` 提交于 2021-01-29 13:52:09
问题 I am having an issue while adding the EditText in my Activity's XML. It's not visible correctly and when I run App it's there but by clicking on it the keyboard does not show I am unable to add any input there. First, I thought I was having this issue only in this Activity but when I tried to add EditText in any other Activity of the project this same thing is happening, but the EditText's that have been added before I have updated to the new version of Android studio 4.0.1 is working fine in

How to properly terminate an activity from a custom view class?

混江龙づ霸主 提交于 2021-01-29 12:27:13
问题 Similar to this post. Have a custom view (extends EditText ) which must have the ability to call the finish() method of the parent activity if the user presses the END key. How can I access the activity object of the host activity in order to call its finish() method from within the custom view class? public class SuppressInputEditText extends androidx.appcompat.widget.AppCompatEditText { public SuppressInputEditText(Context context) { super(context); } public SuppressInputEditText(Context

i want to implement textwatcher for dynamically generated edittexts and want to get text in those edittexts

ε祈祈猫儿з 提交于 2021-01-29 08:09:31
问题 protected void updateTable() { // TODO Auto-generated method stub final TableLayout tl = (TableLayout) findViewById(R.id.settingtable); tl.removeAllViews(); for(int i=0; i<10; i++) { final TableRow tablerow = new TableRow(this); tablerow.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); final TextView deviceedit = new TextView(this); deviceedit.setText(i+1); deviceedit.setTextColor(Color.BLACK); deviceedit.setGravity(Gravity.CENTER); deviceedit

Flutter textfield on fireOS firetv/firestick on top of textfield

左心房为你撑大大i 提交于 2021-01-29 07:07:32
问题 When calling textfield on flutter in fireOS in the fire tv devices, to do a search for example the fireOS virtual keyboard pops on top of textfield and doesnt work like on other android devices where the keyboard is on the bottom and textfield is visible. On android legacy for example i can use edittext widget and the same keyboard pops on top but whatever i type with the controller updates on the virtual keyboard itself, because the keyboard has its own textfield or edittext. So my problem

How to stop the edit text to add text,when the required format text is entered in it? [closed]

依然范特西╮ 提交于 2021-01-29 02:50:53
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . Improve this question What is my requirement is when the user enter 10 digits,a Dot and two decimal points(0123456789.00).Once the user entered this format automatically the edit text should stop adding text into it.And the user should not enter more than one dot. is it possible..

How to set EditText custom cursor-drawable?

孤者浪人 提交于 2021-01-28 08:17:44
问题 I have the following EditText <EditText android:layout_width="300dp" android:layout_height="80dp" android:inputType="textNoSuggestions" android:maxLines="1" android:layout_gravity="end" android:textCursorDrawable="@drawable/hammer_cursor" android:layout_margin="10dp" android:textIsSelectable="false" android:longClickable="false" android:textColor="#858383" android:background="@drawable/backer" android:textSize="14sp" android:id="@+id/name" android:padding="10dp" android:hint="message" android

Put a space after transforming the password text into asterisks

本小妞迷上赌 提交于 2021-01-28 07:10:53
问题 In my application, I am using the below passwordTransformationClass for showing the password in asterisk format. The problem is, I want a space after each text in the edit text, i.e. a space after every asterisk. But the overridden methods don’t take space except a single asterisk character. public class AsteriskPasswordTransformationMethod extends PasswordTransformationMethod { @Override public CharSequence getTransformation(CharSequence source, View view) { return new PasswordCharSequence

Kotlin DialogFragment editText editable always null

℡╲_俬逩灬. 提交于 2021-01-28 06:55:19
问题 So, I'm using Kotlin extensions which is straightforward, but I can't get string from edittext here is my code: override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { val v = activity.layoutInflater .inflate(R.layout.dialog_group, null) v.add_group_button.setOnClickListener(addListener) return AlertDialog.Builder(activity) .setView(v) .create() } private var addListener: View.OnClickListener = View.OnClickListener { val groupNameInput: String = view?.group_edit_text?.text.toString

setting edittext value to zero when empty and removing zero when any entry is made

邮差的信 提交于 2021-01-28 02:52:11
问题 I have two edittext fields that i am using to display results of mathematical functions. I have two problems. I want to edit text to have a value of zero in two scenarios: 1st: I want the edit text value to automatically become zero if the edit text is empty 2nd: if a user erases field values till the edit text is empty. UPDATE: The 1st problem I can sort with a setText() or android:text="0" but when trying to also solve the 2nd it becomes tricky 回答1: Try something like this: final EditText

How to set edittext preference summary and have it stick

给你一囗甜甜゛ 提交于 2021-01-27 03:39:39
问题 I have gone back and fourth on this and I just can not get it. I am setting up my settings using a preference fragment. I can get the settings to work and I can even get the "summary" to update when I make the change. But if I leave the settings screen and come back to it, the summary is back to the default text. So the question is, when using an edittext preference. How do you update the summary so it shows what the user changed the setting to and make it stick across closing the screen and