"Выбрать все" показывает прозрачное выделение в Edttext Android
В моем Edittext, когда я "Выбрать все" текст, выделенный текст виден, а выделение является прозрачным
,
раскладка
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/chat_rounded_corner">
<EditText
android:id="@+id/question"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textCursorDrawable="@null"
android:background="@null"
android:ems="10"
android:hint="Ask something...?"
android:inputType="textMultiLine"
android:minHeight="45dp"
android:paddingLeft="15dp"
android:textColor="@color/black"
android:textColorHint="@color/base"/>
</LinearLayout>
2 ответа
Решение
Определите цвета в ваших colors.xml
<color name="colorAccent">#FF4081</color>
<color name="colorPrimary">#125688</color>
<color name="colorPrimaryDark">#104d7a</color>
Используйте это в вашем AppTheme, как это
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="colorControlActivated">@color/text_highlight_green</item>
</style>
и использовать этот стиль в вашей деятельности
Просто используйте TextHightLight
Недвижимость в EditText
в режиме XML
android:textColorHighlight="#ff0000"
Это решит вашу проблему...