Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1K
Visualizações
How to make your TextView background transparent?

I'm creating the login page in Android Studio and I got problem with building the project.

In one tutorial, it was shown that including #1100000 hexacode will help to make Text transparent, it does, however when I build program it gives error of

error: '#1100000' is incompatible with attribute android:background (attr) reference|color.

I have checked one question which says to add @android:color/transparent , however that doesn't help. Any recommendations?

<EditText
        android:id="@+id/editText"
        android:layout_width="200dp"
        android:layout_height="50dp"
        android:layout_below="@+id/textView2"
        android:layout_centerHorizontal="true"
        android:drawableLeft="@drawable/ic_action_pass"
        android:drawableStart="@drawable/ic_action_pass"
        android:ems="10"
        android:background="#1100000"
        android:hint="@string/password"
        android:inputType="textPassword"
        android:textSize="18sp" />
over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Try this

android:background="@null"
over 4 years ago · Santiago Trujillo Relatório

0

android:background="@android:color/transparent"
over 4 years ago · Santiago Trujillo Relatório

0

You forgot a 0. #1100000 should be #11000000.

The value always begins with a pound (#) character and then followed by the Alpha-Red-Green-Blue information in one of the following formats:

  • #RGB
  • #ARGB
  • #RRGGBB
  • #AARRGGBB

https://developer.android.com/guide/topics/resources/more-resources#Color

Alpha channel represents the transparency value. Some examples:

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
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda