?android:attr/selectableItemBackground not working on white windowBackground -


i use

?android:attr/selectableitembackground 

for items of recyclerview. unfortunately not working. have line in styles.xml file:

<item name="android:windowbackground">@color/white</item> 

without line can see ripple means background os not working because of whilte windowbackground. how can force ripppe effect appear on white background?

here layout recyclerview items:

<?xml version="1.0" encoding="utf-8"?> <linearlayout android:id="@+id/brand_row" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="?android:attr/listpreferreditemheight" android:background="?android:attr/selectableitembackground" android:orientation="vertical">  <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"               android:layout_width="match_parent"               android:layout_height="0dp"               android:layout_marginleft="@dimen/activity_horizontal_margin"               android:layout_weight="1"               android:gravity="center_vertical"               android:orientation="vertical">      <textview         android:id="@+id/name"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:ellipsize="marquee"         android:singleline="true"         android:textcolor="@color/modeltitelcolor"         android:textstyle="bold"/>      <textview         android:id="@+id/numbers"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:ellipsize="marquee"         android:singleline="true"         android:textcolor="@color/cardview_background"         android:textstyle="normal"/> </linearlayout>   <view     android:layout_width="match_parent"     android:layout_height="1dp"     android:background="@color/divider"/> </linearlayout> 

my minsdkversion 14

in styles.xml using

theme.appcompat.noactionbar  

as parent theme. changing

style name="custommaterialtheme" parent="theme.appcompat.light.noactionbar" 

solves problem. can see effect.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -