Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7572431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:55:25+00:00 2026-05-30T15:55:25+00:00

I have to have an EditText in my application with a white background. I

  • 0

I have to have an EditText in my application with a white background. I did this in my theme.xml file

<style name="myEditText" parent="@android:style/Widget.EditText">
  <item name="android:background">#ffffffff</item>
  <item name="android:textColor">#ff000000</item>
</style>

The problem now is that the cursor is still white and therefore not visible.
I did some googling and found this question here on StackOverflow:
Set EditText cursor color

The way it’s done there is the android:textCursorDrawable key. But this key does seem to be only available with a 3.2 target. But our clients wants a 3.0 target and I could not find any other solution…

Is there any way i can change the color of the blinking cursor with 3.0 as the target?

Thanks for helping 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:55:27+00:00Added an answer on May 30, 2026 at 3:55 pm

    I found the answer 🙂

    I’ve set the Theme’s editText style to:

    <item name="android:editTextStyle">@style/myEditText</item>
    

    Then I’ve used the following drawable to set the cursor:

    <style name="myEditText" parent="@android:style/Widget.Holo.Light.EditText"> 
    <item name="android:background">@android:drawable/editbox_background_normal</item> 
    <item name="android:textCursorDrawable">@android:drawable/my_cursor_drawable</item> 
    <item name="android:height">40sp</item> </style>
    

    android:textCursorDrawable is the key here.

    And also refer this one
    Vertical line using XML drawable

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have EditText in my XML as <!-- Inside RelativeLayout --> <EditText android:id=@+id/edtEmail android:layout_width=match_parent
Whenever I have an EditText field in my android application, it is highlighted with
I have 2 editText objecst in my android application. I want write to such
I have an EditText widget in my Android application with inputtype=number . It does
I have sales application. When the user click on EditText the popup calculator want
I have a bunch of EditTexts in my Android application, each with InputMethod set
I have a EditText view, <EditText android:layout_weight=1 android:id=@+id/etMiktar android:layout_width=0dp android:layout_height=wrap_content android:hint=@string/miktarHint android:focusable=false> </EditText> And
i am new to android. in my application i have a button .i put
In my Android application I need to have a black action bar and my
In my application, I have an EditText that the user only has Read access

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.