1

I have a white EditText and in Android 3.1 and above the cursor doesn't show (because it's also white). For info, I use

android:background="@android:drawable/editbox_background_normal"

I read on this post Set EditText cursor color that the solution was to set the textCursorDrawable attribute to "@null" which I have tried, but I can't use it because it says that the attribute is unknown.

I have my SDKs set in the AndroidManifest.xml as follows:

<uses-sdk android:minSdkVersion="14"
          android:targetSdkVersion="14"/>

but it still won't recognise android:textCursorDrawable

Any ideas?

Community
  • 1
  • 1
Mark__C
  • 825
  • 1
  • 13
  • 24

1 Answers1

5

Maybe you have not changed the build target for your application. That is why eclipse is not detecting android:textCursorDrawable

Right click on project -> Properties-> Android -> Build Target -> select api level 12 or greater

nandeesh
  • 24,740
  • 6
  • 69
  • 79
  • Thanks, this worked perfectly. Apologies for the delay in responding but other priorities took over. I don't use Eclipse, I use Intellij Idea. For the record, the same solution can be applied under Intellij Idea: File -> Project Structure and set the Module SDK under the dependencies tab. – Mark__C Sep 30 '12 at 15:36