How do default widget attributes get inherited?

Viewed 34

In order to enable ripple effect, you would have to set the following two lines of code:

android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"

However, I just realized that the color of the ripple is different if I add the following line of code below which is my default theme for the entire app when you first create a brand new project:

android:theme="style/AppTheme"

I was under the assumption that my default AppTheme created in the XML would set the ripple color under the hood.

I entertained the idea that perhaps in my parent layout I was setting a different style but that is not the case. I have almost no styling done except for whatever is defined in the styles.xml

Can someone explain to me discrepancy, I have a few TextViews where I need a ripple effect and it seems odd I have to explicitly tell it to inherit the base application theme that the app uses.

0 Answers
Related