2011-12-05 27 views
1

私はアンドロイドで透明なリストビューを作りたいと思います。そして私は多くのコードを使用しましたが、これらは機能しません。私のコードは以下の通りです。アンドロイドで透明なリストビューを作成するにはどうすればよいですか?

<ListView 
    android:id="@+id/list" 
    android:cacheColorHint="#00000000" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:layout_weight="1"/> 

私のプロジェクトのリストビューコードです。このコードは動作していますが、透明なリストビューは表示されません。だから私に提案してください。

+0

コードを投稿してください。 – Ian

答えて

1

ただ、私はそれが私はそれはあなたを助けることを願っています正確にwork.Butですwheather知らない

android:background="@android:color/transparent" 

または

android:background="#00000000" 
android:cacheColorHint="#00000000" 
+0

こんにちは、両方とも働いていません。このタイプの活動をしたいです。 http://media1.android-apps.com/images/pname/d/com.aman.LPSkinsPack/image2.png。オヤキですので、私にお勧めします。 – dikshantrawal

+0

@androidを使用してみませんか?2番目のオプションでは#00000000の代わりにcolor/transparentですか? – ademar111190

0

、これを試してみてください。

<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/root_frame" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="@android:color/transparent"> 
<ListView 
       android:id="@android:id/list" 
       android:orientation="vertical" 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content" 
       android:gravity="center" 
       android:divider="#fff" 
       android:dividerHeight="0sp" 
       android:cacheColorHint="#00000000" 
       android:descendantFocusability="afterDescendants" 
       android:paddingTop="@dimen/padding_10px" 
      /> 
</RelativeLayout> 
+1

umesh私はこのコードを使っていましたが、working.ok spではない別の提案を示唆しています。 – dikshantrawal

関連する問題