Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make edittext editable after clicking on edit button

I have a user profile screen in my android app and there i am showing user information while registering they provided and a edit button to modify their information.

like image 616
Rakshit Soni Avatar asked Aug 13 '14 13:08

Rakshit Soni


1 Answers

You can disable it in your xml

android:editable="false" 
android:inputType="none" 

And enable it programatically in the onClick() of the edit Button

EditText mEdit = (EditText) findViewById(R.id.yourid);
mEdit.setEnabled(true);
like image 79
Chris Avatar answered Oct 06 '22 19:10

Chris