How can I get the style effect of listView?

1

I have a layout and I want to display the data in this ListView but I need it to be white background without stripes and no click enabled when it is played. Can I do it this way ??

    
asked by anonymous 31.01.2017 / 03:17

1 answer

3

To remove the "stripe" from your ListView you just set divider to @null . See below:

<ListView 
  android:id="@+id/list"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:divider="@null" 
  android:dividerHeight="0dp"/>

And for it to have no effect at the time of click , you just set listSelector to transparent .

<ListView 
      android:id="@+id/list"
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:divider="@null" 
      android:dividerHeight="0dp"
      android:listSelector="@android:color/transparent"/>
    
31.01.2017 / 03:24