2013-07-20 2 views
0

나는 하나의 텍스트 뷰 아이템을 가진리스트 뷰 액티비티를 가지고있다. 내 물품은 다음과 같습니다.목록보기를 투명하게 만드는 방법은 무엇입니까?

<TextView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/label" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:textColor="#FFFFFF" 
    android:background="#00000000" 
    android:padding="10dip" 
    android:textSize="16dip" 
    android:textStyle="bold" >  
</TextView> 

보시다시피 텍스트 색상은 흰색이고 배경은 투명합니다. 내가 원하는

<ListView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/llll" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="@drawable/s4"> 
</ListView> 

: (I는 0 ~ 100 알파를 넣어 그것을 시도 중 흰색 배경 또는 검은 색 표시) 목록보기 지금

을, 나는 "S4"라는 배경 이미지에 넣어 가지고 배경 이미지를 볼 수 있도록 목록보기 항목을 반투명하게 정렬합니다.

각 항목은 반투명이어야하며 텍스트는 흰색이어야하며 표시가 가능해야하며 목록보기의 배경이 표시되어야합니다.

제대로 표시되지 않는 것 같습니다. 단색으로 표시 할 수 있지만 고정 된 배경 이미지 위에 항목을 스크롤하고 싶습니다.

내가 뭘 잘못하고 있니?

답변

0

..........이 같은 시도 선형 레이아웃과 레이아웃 설정 배경 색상과 텍스트보기를 넣어 .......

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="280dp" 
android:layout_height="30dp" 
android:background="#F1F1F1" 
android:orientation="horizontal" > 

<TextView 
android:id="@+id/label" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:textColor="#FFFFFF" 
android:background="#00000000" 
android:padding="10dip" 
android:textSize="16dip" 
android:textStyle="bold" >  
</TextView> 

</LinearLayout> 
관련 문제