Android java how to make a edit text transparent but the text still visible?
How can i make a EditText box invisiable but the text still visiable
<E开发者_运维知识库ditText android:layout_height="wrap_content" android:visibility="invisible" android:text="TestttttttttttttttttTTTTTTTTTTTTTTTTTTTTTTTT" android:layout_width="wrap_content" android:id="@+id/editText1" android:layout_above="@+id/trait1" android:layout_alignParentLeft="true" android:layout_marginBottom="78dp">
<requestFocus></requestFocus>
</EditText>
is my code but android:visibility="invisible"
makes it all invisible
Instead of below code
android:visibility="invisible"
use this code
android:background="#00ffffff"
android:background="@null"
or
android:background="@android:color/transparent"
if you want to make a view semi-transparent then use this code
android:background="#80ffffff"
try it..
write it on onCreate();
EditText.setBackgroundColor(Color.TRANSPARENT);
精彩评论