Questions tagged as 'edittext'

2
answers

how to put monetary mask for EditText in an Android application?

How to put monetary mask for EditText in an Android application only with numeric values without the R $, that is, to print in EditText 2.99? If you have an example.     
asked by 14.11.2017 / 12:46
2
answers

onClick on edittext that can not be editable

How to make an event click on an edittext, enabled="false"? (I could not do without focus being in edittext, enabled="true") Or, an event clicks on an edittext that can not be edited. Code below: .... <android.support.design....
asked by 09.11.2016 / 15:11
1
answer

Problem with If and Else when validating EditText fields in the android application

I'm kind of confused to do a field validation here in my people directory. The following error is appearing: Else without if on line 84. I do not have much experience and I appreciate the understanding of everyone who can help. import android...
asked by 29.12.2015 / 19:50
1
answer

Create an AlertDialog with an EditText of type "number" - Android

Good morning Guys, I have a problem with my Alert: In it I have an EditText, but I can not declare the EditText with type numbers (android: inputType="number"). Any ideas? Here is the alert code: public void exibirMensagemEdt(String titulo, S...
asked by 18.03.2015 / 04:43
2
answers

The application for when the editText is not filled

Hello! I would like to ask for help. I'm new to Android studio and I'm trying to create an application for my physics students to calculate motion equations. One of the methods is to calculate the equation "V = v0 + at", when the editTexts are p...
asked by 08.06.2018 / 02:58
1
answer

Treatment of decimal places EditText

I need to set a number of decimal places for EditText on Android. For this I used InputFilter as I show below: public NumeroFormatado(int digitsBeforeZero,int digitsAfterZero) { mPattern=Pattern.compile("[0-9]{0," + (digitsB...
asked by 27.02.2018 / 12:37
2
answers

Background EditText Alpha (transparency)

I'd like to know how to make the EditText background transparent, like this: Itriedthefollowingways,butwithoutsuccess:edt.xml<?xmlversion="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"...
asked by 07.02.2018 / 12:10
1
answer

Prepend on an EditText using TextWatcher

How to make a prepend on Android? I currently do some append , but did not see how to do a prepend in the onTextChanged event. The reason is to put a ( before the first 2 digits of a phone, to get the (xx) x xxxx - xx...
asked by 30.05.2017 / 20:37
1
answer

Error adding fields to Text Edit using OnFocusChangeListener

I'm trying to get my application to calculate the fields% cos_de% cost price plus profit percentage and when clicking on the sale price field the result will appear, however instead of appearing the result the following message appears in edit t...
asked by 18.01.2016 / 19:26
1
answer

Textbox with editing

I have a textbox and wanted to be able to edit the text in it. For example, I wanted the site to write the following text in the textbox: "This is a test!" And what you could do, by clicking buttons, for example, the following edition:...
asked by 16.07.2015 / 12:24