Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a View be focused and invisible at the same time?

I want to have an EditText in focus so it is edited, but also invisible. In other words, all the user will see is the keyboard.

Is that possible?

like image 280
EyalBellisha Avatar asked Mar 16 '13 17:03

EyalBellisha


People also ask

How do you focus on a view?

Android | iOSStart a meeting as the host or co-host. Tap More . Tap Focus Mode . Tap Start to confirm.

What does findViewById return?

findViewById returns an instance of View , which is then cast to the target class. All good so far. To setup the view, findViewById constructs an AttributeSet from the parameters in the associated XML declaration which it passes to the constructor of View . We then cast the View instance to Button .


1 Answers

AFAIK, an invisibility Edittext cannot have a view( I have never tried) so the workaround for you is

You can set a transaparent background for edittext to achieve this.

youredittext.setBackgroundResource(android.R.color.transparent);

or you can directly set the attribute in XML like this

android:background="@null"
like image 165
Pragnani Avatar answered Sep 28 '22 18:09

Pragnani