-1

I am designing a Login Screen With Xamarin. I want my Edittext's background as translucent. I have attached screenshots.

This is how my Edittext looks now, with background #00000000

This is how I want it to look like

Ramesh sambu
  • 3,577
  • 2
  • 24
  • 39
Keyur Hardas
  • 43
  • 11

3 Answers3

0

try this android:background="#07000000" in your XML file.and for more information Refer this link

Normal1One
  • 219
  • 3
  • 11
0

add to "color.xml":

<color name="GreyTransparent">#55A0A0A0</color>

add new "background.xml" to drawable:

<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <corners android:radius="10dp"/>
    <solid android:color="@color/GreyTransparent"/>
</shape>

in your layout:

   <EditText android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:background="@drawable/background"
             android:padding="3dp"/>
IQ.feature
  • 600
  • 6
  • 16
0

Your EditText looks completely transparent due to #00000000.

Use following table to achieve transparency

100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
60% — 99
55% — 8C
50% — 80
45% — 73
40% — 66
35% — 59
30% — 4D
25% — 40
20% — 33
15% — 26
10% — 1A
5% — 0D
0% — 00

also If you need more customization, plz go to Android studio --> colors.xml click on color which looks just beside line numbers, click on that color. It will show you color Dialog. Slide bottom Opacity bar to achieve your transparency.

Pratim P
  • 169
  • 1
  • 5