如何解决如何在Android适用于Android Oreo及更高版本的Android Material EditText中更改气泡光标的颜色?
我想将EditText上光标的气泡颜色从蓝色更改为绿色。
我使用了下面的代码
in style.xml
<style name="TextInputLayoutAppearance" parent="Widget.Design.TextInputLayout">
<item name="colorControlNormal">@color/brand_color</item>
<item name="colorControlActivated">@color/brand_color</item>
<item name="colorControlHighlight">@color/brand_color</item>
</style>
这是我的片段中的TextInputLayout及其editText
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/email_login_textInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:theme="@style/TextInputLayoutAppearance"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView_back_button">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/email_textView_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:hint="@string/email"
android:inputType="textEmailAddress" />
</com.google.android.material.textfield.TextInputLayout>
我正在使用我的gradle中的材料支持设计
implementation 'com.google.android.material:material:1.2.1'
我可以在Android Lollipop设备(API 21,三星)中成功将颜色从蓝色更改为绿色,但是我仍然无法为Android 10(API 29,Redmi Note 7)更改气泡颜色
事实上,我什至不知道这种蓝色的来源。我的color.xml中没有蓝色
我该怎么办?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。