selectableItemBackgroundBorderless for textview

前端 未结 2 1886
暖寄归人
暖寄归人 2021-02-14 10:26

I have a TextView which is use as a button. I want to add attribute selectableItemBackgroundBorderless to have circle ripple effect when pressing. The

2条回答
  •  花落未央
    2021-02-14 10:44

    You have to use ?android:attr/selectableItemBackground to keep the ripple effect inside the View boundaries.

    ?android:attr/selectableItemBackgroundBorderless allows the effect to go outside of the View.

提交回复
热议问题