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

修改前:

 

 

 

 

修改后:

 

 

 

 

步骤:

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

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

 

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

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

 

posted @ 2022-01-25 15:00  野生野鸡码农  阅读(254)  评论(0编辑  收藏  举报