New cursor controller in TextViews.

Editable TextView now display a cursor controller under the insertion
point so that it can be precisely moved.

Change-Id: Ia2e6ddc57d249647ff6683e10e4226db3df27223
This commit is contained in:
Gilles Debunne
2010-06-23 10:30:27 -07:00
parent a6935ab009
commit cc3ec6cdb2
10 changed files with 489 additions and 55 deletions

View File

@@ -126,6 +126,7 @@ public class Canvas {
*
* @deprecated This constructor is not supported and should not be invoked.
*/
@Deprecated
public Canvas(GL gl) {
mNativeCanvas = initGL();
mGL = gl;
@@ -151,6 +152,7 @@ public class Canvas {
*
* @deprecated This method is not supported and should not be invoked.
*/
@Deprecated
public GL getGL() {
return mGL;
}
@@ -162,6 +164,7 @@ public class Canvas {
*
* @deprecated This method is not supported and should not be invoked.
*/
@Deprecated
public static void freeGlCaches() {
freeCaches();
}
@@ -198,6 +201,7 @@ public class Canvas {
*
* @deprecated This method is not supported and should not be invoked.
*/
@Deprecated
public void setViewport(int width, int height) {
if (mGL != null) {
nativeSetViewport(mNativeCanvas, width, height);
@@ -415,8 +419,8 @@ public class Canvas {
*
* @param sx The amount to scale in X
* @param sy The amount to scale in Y
* @param px The x-coord for the pivot point (unchanged by the rotation)
* @param py The y-coord for the pivot point (unchanged by the rotation)
* @param px The x-coord for the pivot point (unchanged by the scale)
* @param py The y-coord for the pivot point (unchanged by the scale)
*/
public final void scale(float sx, float sy, float px, float py) {
translate(px, py);
@@ -1585,6 +1589,7 @@ public class Canvas {
restore();
}
@Override
protected void finalize() throws Throwable {
super.finalize();
// If the constructor threw an exception before setting mNativeCanvas, the native finalizer

View File

@@ -75,6 +75,7 @@ public final class Rect implements Parcelable {
bottom = r.bottom;
}
@Override
public boolean equals(Object obj) {
Rect r = (Rect) obj;
if (r != null) {
@@ -84,6 +85,7 @@ public final class Rect implements Parcelable {
return false;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder(32);
sb.append("Rect("); sb.append(left); sb.append(", ");
@@ -351,7 +353,7 @@ public final class Rect implements Parcelable {
* rectangle, return true and set this rectangle to that intersection,
* otherwise return false and do not change this rectangle. No check is
* performed to see if either rectangle is empty. Note: To just test for
* intersection, use intersects()
* intersection, use {@link #intersects(Rect, Rect)}.
*
* @param left The left side of the rectangle being intersected with this
* rectangle
@@ -445,7 +447,7 @@ public final class Rect implements Parcelable {
/**
* Returns true iff the two specified rectangles intersect. In no event are
* either of the rectangles modified. To record the intersection,
* use intersect() or setIntersect().
* use {@link #intersect(Rect)} or {@link #setIntersect(Rect, Rect)}.
*
* @param a The first rectangle being tested for intersection
* @param b The second rectangle being tested for intersection