Java – Android – hidden but selectable EditText
I want to see an EditText in my android app that you can't see, but you can select and enter text In other words, I hope it can be completely invisible, otherwise it is completely normal
Another option is to have an image or button on the screen that the user presses to enter text into EditText hidden behind another EditText
Thank you for your help, but it seems more likely that I have to use the second option For details, for example, I have a textview that says' welcome ' I want users to be able to click this text to call up the keyboard and edit it in the edit text field The reason for hiding the EditText field behind another is to mask the cursor and allow the user to type the text displayed on the screen
Solution
If I find you Here's how to complete your first option by setting the background to transparent and the cursor visibility to false
To check this, you must click in the center of the screen
For example, code snippet:
<EditText android:id="@+id/eT1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:background="#00000000" android:cursorVisible="false" android:ems="10" > </EditText>