android – Viewpager Relex Circle指示灯颜色

android – Viewpager Relex Circle指示灯颜色,第1张

概述viewpager指示器的默认颜色为白色. 在 github中的relex viewpager指示器中, 它不包括如何更改指标的颜色. 可能吗? <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"> <m vIEwpager指示器的默认颜色为白色.
在 github中的relex vIEwpager指示器中,
它不包括如何更改指标的颜色.
可能吗?
<linearLayout            androID:layout_wIDth="match_parent"            androID:layout_height="match_parent">            <me.relex.circleindicator.CircleIndicator                androID:ID="@+ID/pagerIndicator"                app:ci_wIDth="10dp"                app:ci_height="10dp"                androID:layout_wIDth="match_parent"                androID:layout_height="36dp"                androID:layout_gravity="bottom"                androID:layout_marginBottom="8dp" />        </linearLayout>
解决方法
<me.relex.circleindicator.CircleIndicator        androID:ID="@+ID/pagerIndicator"        app:ci_wIDth="10dp"        app:ci_height="10dp"        app:ci_drawable="@drawable/circleindicator_round"        androID:layout_wIDth="match_parent"        androID:layout_height="36dp"        androID:layout_gravity="bottom"        androID:layout_marginBottom="8dp" />

我不在乎你做什么填充或保证金

但创建一个可绘制的XML文件并添加这些代码

<?xml version="1.0" enCoding="utf-8"?>  <shape xmlns:androID="http://schemas.androID.com/apk/res/androID">    <solID androID:color="@color/colorAccent"/>    <corners androID:radius="10dp"/>  </shape>

把它称之为你想要的
但是用

`app:ci_drawable="@drawable/circleindicator_round"`

为我工作

总结

以上是内存溢出为你收集整理的android – Viewpager Relex Circle指示灯颜色全部内容,希望文章能够帮你解决android – Viewpager Relex Circle指示灯颜色所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1134800.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存