OSDN Git Service

Text insertion cursor is now defined by a Drawable.
authorGilles Debunne <debunne@google.com>
Fri, 11 Feb 2011 00:09:53 +0000 (16:09 -0800)
committerGilles Debunne <debunne@google.com>
Tue, 15 Feb 2011 02:29:39 +0000 (18:29 -0800)
commitf75c97e023af7d4ad9a8c129d4ea282b1c3b8f94
treed4ac3ae302c36877af7b8e169bc185bed1ee8133
parent302b9884b3f0ecc96cc618643835d415e474cac3
Text insertion cursor is now defined by a Drawable.

Bug 3261766

If defined, the drawable is used instead of directly drawing a 1 pixel
line. This makes the cursor more fancy and more visible.

The drawable is currently clipped by the TextView's limits, which is
currently visible on the left when the cursor is at the first position.
To solve this issue properly, we would need to propagate a do-not-clip
up in the hierarchy.

Change-Id: I99f6001048eed14104994acf6bab942dda8eb38e
core/java/android/text/Layout.java
core/java/android/widget/TextView.java
core/res/res/drawable-mdpi/text_cursor_holo_dark.9.png [new file with mode: 0644]
core/res/res/drawable-mdpi/text_cursor_holo_light.9.png [new file with mode: 0644]
core/res/res/values/attrs.xml
core/res/res/values/public.xml
core/res/res/values/styles.xml
core/res/res/values/themes.xml