I want to make a listview with translucent cells (something like blue with an opacity of 25%).
The list is created correctly, but when I perform a scroll movement (I click and drag up or up), the list seems to activate some sort of selection mechanism that applies a black and opaque background to the list.
Any idea how I can get rid of this?
Below is the code and two screens:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="@drawable/background"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/my_health_title"> </ImageView> <ListView android:id="@+id/health" android:layout_width="wrap_content" android:layout_height="wrap_content"> </ListView>
<TextView android:id="@+id/health_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#46727c" android:textSize="14sp" android:textStyle="bold" android:layout_marginTop="20dp" android:layout_marginLeft="30px" android:text="Blood presure Profile"> </TextView> <LinearLayout android:id="@+id/health_gauge" android:layout_width="250dp" android:layout_height="35dp" android:layout_centerVertical="true" android:layout_marginLeft="20dp"> </LinearLayout> <TextView android:id="@+id/health_description" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#46727c" android:textSize="12sp" android:textStyle="normal" android:layout_marginTop="150px" android:layout_marginLeft="30px" android:text="Looks Goood"> </TextView> <ImageView android:id="@+id/health_details" android:background="@drawable/home_arrow_icon_margin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true"> </ImageView>
regular list
selected efect
android android-listview
Sorin Mar 31 2018-11-11T00: 00Z
source share