androidcolorsandroid-edittextdrawabletext-cursor

How to change EditText bubble color (under cursor) in android?


How to change the color of EditText bubble in android, I could do change the cursor drawable but I want change color of Bubble, please share idea on it.

Reference screenshot:

enter image description here

Any help would be appreciated.


Solution

  • Change the color in your res/values/styles.xml. The bubble uses colorAccent:

    <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
        <!-- Other theme overrides here -->
        <item name="colorAccent">@color/Gray2</item>
    </style>
    

    In the above <item name="colorAccent">@color/Gray2</item> is the line where you put the color you want for your bubble.