Reputation: 5356
I am developing an Android application with numerous clickable elements positioned on the main screen.
I have used the following for each of my clickable screen UI elements
android:background="?attr/selectableItemBackgroundBorderless"
My main screen has an entirely black background which is preventing the borderless "Ripple" from being seen.
If I change my background to
android:background="@android:color/transparent"
I can clearly see the required "Ripple".
How do I make the "Ripple" visible over a black background?
My theme is defined as follows:-
<resources>
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@android:color/white</item>
<item name="colorPrimaryDark">@android:color/white</item>
<item name="colorAccent">#c9e0bb</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:textColor">@android:color/white</item>
<item name="android:textColorHint">@android:color/white</item>
</style>
</resources>
Upvotes: 1
Views: 504
Reputation: 1223
Try this in UI element android:foreground="?attr/selectableItemBackgroundBorderless"
Upvotes: 1