I am trying to make the editText that shows the text but not as editable type. I cant use textview there because i am using same component for entering the values. How to achieve it? Any help is really appreciated and thanks in advance.
android:editable="false" should work, but it is deprecated, you should be using android:inputType="none" instead. Alternatively, if you want to do it in the code you could do this : EditText mEdit = (EditText) findViewById(R. id.
editText.setFocusable(false);
editText.setClickable(false);
the two property which turn EditText to non focusable and unclickable which leads to a non editable Edittext
Make EditText Read only.
Like this:
android:enabled="false"
Or from code:
edittext.setEnabled(false)
or edittext.setFocusable(false)
or edittext.setFocusableinTouchMode(false)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With