Skip to content

Instantly share code, notes, and snippets.

@xionglun
Created June 11, 2014 18:22
Show Gist options
  • Save xionglun/ed7bc5ff8cb648d7564e to your computer and use it in GitHub Desktop.
Save xionglun/ed7bc5ff8cb648d7564e to your computer and use it in GitHub Desktop.

Revisions

  1. xionglun created this gist Jun 11, 2014.
    16 changes: 16 additions & 0 deletions android_listview_transparent.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    How to make a ListView transparent in Android?

    In xml:
    ```xml
    android:background="@android:color/transparent"
    android:cacheColorHint="@android:color/transparent"
    ```

    In java:
    ```java
    list.setCacheColorHint(Color.TRANSPARENT);
    ```

    Reference:
    [stackoverflow](http://stackoverflow.com/questions/1377336/how-to-make-a-listview-transparent-in-android)