Android更改文字选中后左侧水滴及文字背景色


修改前:

修改后:

步骤:

1,定义style:在工程的res/values/styles.xml中添加??下面配置

<style name="zhuTextStyle" parent="AppTheme.NoActionBar">
        <item name="android:colorControlActivated">#33A4A6item>
        <item name="colorAccent">@color/blueitem>
style>

2,Activity中使用:清单文件中配置样式

<activity
            android:name=".activity.ArticalDetailActivity"
            android:exported="true"
            android:screenOrientation="portrait"
            android:theme="@style/zhuTextStyle">
            
activity>