Questions tagged [android-edittext]

1

votes
1

answer
406

Views

[Android]: java.lang.NoSuchFieldError: No field error_color_material

I am getting the following error when trying to show an error message on the UI's TextInputLayout: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.blablabla.appname, PID: 23691 java.lang.NoSuchFieldError: No field error_color_material of type I in class Landroid/support/v7/appcompat/R$color; or...
Alaa Elrifaie
1

votes
3

answer
48

Views

EditText's height does not expand to its parent's height

I placed an edit text within a scroll view with height = match_parent and expected its height to be equal to the scroll view but it's not. Its height behaves like wrap_content which means if there are no text in the EditText, I will have to point the cursor at the first 'line' for the soft keyboard...
EagerToLearn
3

votes
4

answer
99

Views

How to create a “type along” style interface?

I'm talking about something like this: The image is just an example, I simply need the user to type a certain text letter by letter. I tried it with an overlaying TextViewon an EditText, but it looks really ugly: My next attempt would be to use Spannables to turn the overlaying text the same colo...
Big_Chair
1

votes
5

answer
1.8k

Views

how to give simple test editing facility (bold,italic,underline) while typing text in an EditText?

the user should be able to create something like the following while typing inside the edittext itself. 'this text is Bold and this is italics .' I don't want the whole text to be in any one format(ie. bold/italics/underline). thank you.
sisir
1

votes
2

answer
348

Views

Cursor and Underline missing in EditText

I am using an EditText inside a Toolbar, no matter what I do, cursor and underline doesn't appear xml code kotlin code editText?.visibility = View.VISIBLE editText?.requestFocus() editText?.isCursorVisible = true editText.setRawInputType(InputType.TYPE_CLASS_TEXT); editText.setTextIsSelectable(true)...
MrRobot9
1

votes
3

answer
14.2k

Views

Android add edittext field on click of (+) button and remove by click of (-)

I am creating a add contact activity. There will be only one edit text and a button (+), when click on button then another edit text should be added and previous button should change into (-). By this method i want to add and remove edit text fields.Some thing like this. I am doing like this but not...
Sandeep
1

votes
1

answer
34

Views

Stroke not getting applied to rectangle to xml drawable used as edittext backgroun in android

I have a corner rounded rectangle drawale in my app which I use as a background for edittext. When I try to add stroke to the rectangle it is not getting applied. Isn't it the correct way to do it?
Ankit Gaur
1

votes
0

answer
45

Views

Stretched Animated EditText

I have a Editext that animated form both sides to expand out word. Doing so it is stretched and looks a little off (text is larger, radius of corners change to a higher value and you don't see the first 3.5 characters typed) Im wondering if there is a way around this with another animation file or a...
EquiWare
1

votes
0

answer
21

Views

EditText text edit (typing , deleting) is propagated to layouts under the top layout instead to own layout

I have the following layout which is displayed above all other apps using window manager. Where the AppCompatEditText part is commented by: text edit (typing , deleting) is propagated to layouts under the layout which contains the EditText instead to own layout. The question is: How to propagate t...
redrom
1

votes
0

answer
113

Views

Displaying long text in EditText

I use EditText to display long text that can be 600 000 characters long and longer. For that I set: android:maxLength='10000000' From time to time I select text programmatically using EditText.setSelection(int start, int end) which works and if the selection range is outside the visible window it wi...
ka3ak
1

votes
1

answer
78

Views

Custom Edit Text, listen for Delete Key not working

I am currently working in a custom EditText to look like the image below, the idea is to always start writing on the left if empty, and work your way to the right jumping from one EditText to the next, but I'm having problems when I try to go back to the previous box, if the current box is empty and...
RonEskinder
1

votes
2

answer
639

Views

How to disable the SwiftKey (third-party keyboard) behavior in EditText?

I'm using the standard EditText control in my Android app. The input for this EditText should be inserted only from the built-in Keypad of the app. When SwiftKey (third-party keyboard app) is installed on the device, it causing to strange behavior like a jumpy cursor, and underline below some text....
Ben
0

votes
0

answer
4

Views

How to display data on xamarin.android edit text using web api

I'm trying to display the data from SQL server using web API, get method on edit text in xamarin.android. The data will display on the edit text once the button is clicked. I've followed all the steps(exactly) as in the Youtube tutorial but unfortunately, the data did not show up on the edit text...
Yonce
1

votes
1

answer
61

Views

Android - EditText loses content after clicking on layout

Hi i have FrameLayout with RelativeLayout in it. EditText is placed in RelativeLayout. Thing is that when i click on the EditText and type some text in it and then click on layout, keyboard dissappears(assume i did not hit the another EditText but the RelativeLayout) the content of EditText dissappe...
MarkyMark
1

votes
1

answer
248

Views

Disable backspace in edittext

I am creating an application which takes website address as input from user in Edittext. And I am setting http:// in Edittext in XML file. But the problem is that I want to disable backspacing in Edittext when only http:// present in it. I tried this but it's not working, etLink.addTextChangedListen...
1

votes
0

answer
31

Views

EditText error disappearing with invalid key on numeric keyboard

I have a simple EditText with a TextWatcher where a validation is performed. In the TextWatcher the error is set correctly and the pop-up and message is appearing has expected. I am doing a Range validation. The EditText type is set to number and has expected, the keyboard shown is only digit. But...
Maurice
1

votes
1

answer
147

Views

How to optimize custom EditText for large amount of text (code)?

I'm writing a text editor similar to QuickEdit and Turbo Editor. However, I faced the problem that when my EditText deals with a large amount of code lines, it becomes slower and lagging. From this question I found out that in my case I should create a custom EditText, then from this and this I sug...
Sinomine
1

votes
1

answer
43

Views

how do i get the text from edittext in in inflated layout

I have a Button that, when click on it, displays 6 TextEdits. This happens trhough a inflated layout, that contains the TextEdits. That means, that everytime you click on the Button you get 6 new TextEdit. Now, how can i collect the Values of all of them? Inflated Layout XML: Here int the activity,...
Angi Rassino
1

votes
1

answer
42

Views

Cannot disable EditText and score variable not updating

I'm learning to build apps for Android by making a trivia app with 3 questions: 1 using radio buttons, 1 free text field, 1 with checkboxes. The logic is that once a user chooses or enters an answer, the radio buttons, checkboxes and EditText will be grayed out, then the user will click on the score...
Hola
1

votes
0

answer
16

Views

Highlighting key words in edittext

I want to highlight a specific words on an edittext while the user is typing I got the words highlighted but if I add any text before the highlighted word it changes back. @Override public void afterTextChanged(Editable p1) { // TODO: Implement this method if(highlightSearchKey(p1.toString())!=null)...
Terhaka
1

votes
1

answer
30

Views

How to get value INPUT.Text in one xaml and refer to it in another xaml?

I have an EditText in my MainActivity.cs: reqinput = FindViewById(Resource.Id.rinput); string r = rinput.Text What I want is that in my other page, Page1.cs, I can refer to r (the text in rinput). How do I do that? Thanks.
Sarah
1

votes
1

answer
63

Views

Firebase: Add to Authenticated User

Please help, Can I add values to my authenticated user? I have a createUser class where I have created my authenticated user. public class CreateUserAccount extends AppCompatActivity { private EditText inputEmail, inputPassword; private Button btnSignUp; private FirebaseAuth auth; @Override protecte...
extragum
1

votes
3

answer
591

Views

get selected item from recyclerview on alert dialog , and display it into edittext

I just create a dialog with a recycle view on it. Then how to get value from selected recycle view and set it into editext on the same acticity this is the dialog and the value from recycle view and this is the value will be set My code for calling the dialog, and set addOnItemTouchListener for recy...
Lisda Wijayanti
1

votes
1

answer
34

Views

Getting Values from two Inflatable Edittext arrayLists and Calculating Values

I am currently working on a program where I can take two inflatable edittexts and do calculations with them. So I'm trying to get each value, put them into the designated arraylist and calculate values according to the corresponding array, But I am having trouble as I am getting an indexoutofbounds...
Junseok Joon Kang
1

votes
1

answer
64

Views

How to change EditText cursor z position?

I have an EditText and set placeholder. I think this look is weird because of the cursor is under the text. (see below picture) How can I control this cursor z-position or gravity? Code: // in Layout // in Activity binding.editContainer.setContentHintText(Html.fromHtml(myHint));
illusionJJ
1

votes
1

answer
68

Views

Custom editText clear button

I have a custom editText where I want to instanciate a drawable that acts as a clear button, when the user writes on the editText the clear icon appears and if it clicks on it, it clears the text on the editText. But if the user clicks on the editText when the icon is not instanciated it throws a nu...
Sergio
1

votes
1

answer
59

Views

ListView inside / with spinner

Experts,I been struggling to solve the below issue. Have got code which basically searching the data using edittext to spinner which is working fine. But issue is i am unable to open the spinner to see the inside contents.Used AdapterView.OnItemSelectedListener but no use. Your most welcome to modif...
Leace
1

votes
1

answer
49

Views

Keyboard is covering the EditTexts during editing in a dialog

In My App I have Button will open a Dialog to allow the user to enter some data. The dialog layout contains a parent ScrollView and inside it few EditTexts children. the problem is the Keyboard is covering the EditTexts during user edit, so the the user basically can not see what he is typing... I a...
Ahmed Afifi
1

votes
1

answer
230

Views

InputType in EditText inside RecyclerView

In my RecyclerrView some items have EditText(Inside cardView).It works fine without defining InputType in EditText but when I define InputType it causes the recyclerview to scroll to position zero when EditText comes into focus(When touched on editText to enter values). This is a default EditText th...
SAurabh
1

votes
1

answer
50

Views

Implementing a callback to change EditText in MainActivity from custom WebViewClient

75% of the Android Web Browser examples don't use an EditText to allow the user to change Urls. In that last 25% which give you a sample EditText to change the Url they stop short and don't clue you in on how to keep that Url EditText updated after the page finishes loading. There are many times whe...
PPL
1

votes
1

answer
297

Views

editext not getting focus constraint layout

I have added xml for my layout edit text is not getting focus, only selects first one then cannot selects another edittext I am afraid that somehow focus is not getting or is messed up but could not resolve it anyway. maybe constraintlayout is culprit but no idea. This shows that I am using scrollvi...
geniushkg
1

votes
1

answer
81

Views

App crashing after clicking on EditText in AlertDialog

I am getting the following error after clicking on EditText in AlertDialog. java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.getDrawingRect(android.graphics.Rect)' on a null object reference at android.support.v4.widget.NestedScrollView.scrollToChild(NestedScr...
asdfkjasdfjk
1

votes
0

answer
39

Views

editText getting focus when opening the extra Option list and i also want to know how to clear focus when KeyBoard get down like in Google Keep app

this is my arrow Pressed State View. this is my normal view When I click on arrow textView, then my editText get focus but I want to expand the extra option list, not to focus editText and it does not lose focus by itself, even when I click on any textView in the extra Option list. I want to have e...
Mayank Doda
1

votes
1

answer
87

Views

TextInputLayout does not animate when inside RecycleView

There was a question which was exactly this then got marked as a duplicate. But the proposed 'duplicate' does not solve the issue. When inside a recycleview, I'm using it like (viewholder file): Tried setting it dynamically too. The hint displays but the animation does not work when clicking into th...
breakline
1

votes
0

answer
212

Views

How to access clipboard's 'image content'

In Android samsung s5 device, when I long click on edittext, 'Clipboard' option is available to paste content(image+text) from clipboard. I want that my user can paste image from clipboard.But when I click on clipboard, all clipboard's images are strike off(not accessible) while text is accessible.D...
Annu Rani
1

votes
0

answer
68

Views

Android Studio's logcat shows “Error inflating class EditText” on running the app in Gionee P5W having Lollipop(5.1)

Here is the XML code for the EditText widget which is causing the error. I think the error is due to my phone's Android version (Lollipop 5.1). Below is the code for the launcher activity of the app which is a login activity. Here is the complete xml file: This is the launcher activity of the app. T...
Shivam Kumar
1

votes
0

answer
144

Views

EditText scrolling issue inside RecyclerView

I have a multiline EditText like this I am able to scroll this EditText in adapter by TouchEvent like et_msg.setOnTouchListener { p0, p1-> p0!!.parent.requestDisallowInterceptTouchEvent(true) when (p1!!.action and MotionEvent.ACTION_MASK) { MotionEvent.ACTION_UP -> p0.parent.requestDisallowIntercept...
1

votes
0

answer
24

Views

Why does change the height of an EditText when modifying its background?

I have an editText in the following way: I modified your backGround in the following way: private void habilitarControles(boolean estado){ Drawable fondo = null; if (true == estado){ fondo = (Drawable) getResources().getDrawable(R.drawable.edit_text_redondeado); } else{ fondo = (Drawable) getR...
Fabián Romo
1

votes
3

answer
215

Views

EditText with Specific Pattern

I am trying to code an EditText field to have a specific pattern. The pattern is: P20_ _ / _ _ / _ _ _ _ What I would like is that when the user starts to type the characters take place of the underscores but the forward slashes remain. I am a beginner but this seems to be quite challenging. Here...
Aaron
1

votes
1

answer
271

Views

How to adjust size of BottomSheet with Edittext and button below it?

I want to build a BottomSheet to display a view with button and edit text. If I click on the Edittext the Keyboard shows up but it hides the button which is below the edit text. These pics should show my problems 1)BottomSheet in normal view-First Image 2)BottomSheet hides the button- Second Image...

View additional questions