summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2011-07-20 09:12:41 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-20 09:12:41 -0700
commitcaed51bcc23303182ffffb8b2db04647845bc1f5 (patch)
tree4ed946ad6d5737574a646d9e455d72dac222598d
parent4dcd82be66283c30af89aad044b5d211ff91a6bf (diff)
parent3784a7f6f8483e6bc9e8624d454f8e90d20ed8ad (diff)
downloadframeworks_base-caed51bcc23303182ffffb8b2db04647845bc1f5.zip
frameworks_base-caed51bcc23303182ffffb8b2db04647845bc1f5.tar.gz
frameworks_base-caed51bcc23303182ffffb8b2db04647845bc1f5.tar.bz2
Merge "Insertion handles fades out after being positionned"
-rw-r--r--core/java/android/widget/TextView.java34
1 files changed, 18 insertions, 16 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index c88b922..b116f0f 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -117,12 +117,12 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
-import android.view.ViewRootImpl;
import android.view.ViewConfiguration;
import android.view.ViewDebug;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewParent;
+import android.view.ViewRootImpl;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
@@ -3424,7 +3424,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
return mHint;
}
- private boolean isMultilineInputType(int type) {
+ private static boolean isMultilineInputType(int type) {
return (type & (EditorInfo.TYPE_MASK_CLASS | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE)) ==
(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE);
}
@@ -3500,7 +3500,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
return mTransformation instanceof PasswordTransformationMethod;
}
- private boolean isPasswordInputType(int inputType) {
+ private static boolean isPasswordInputType(int inputType) {
final int variation =
inputType & (EditorInfo.TYPE_MASK_CLASS | EditorInfo.TYPE_MASK_VARIATION);
return variation
@@ -3511,7 +3511,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
== (EditorInfo.TYPE_CLASS_NUMBER | EditorInfo.TYPE_NUMBER_VARIATION_PASSWORD);
}
- private boolean isVisiblePasswordInputType(int inputType) {
+ private static boolean isVisiblePasswordInputType(int inputType) {
final int variation =
inputType & (EditorInfo.TYPE_MASK_CLASS | EditorInfo.TYPE_MASK_VARIATION);
return variation
@@ -5084,6 +5084,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* @hide
* @param offsetRequired
*/
+ @Override
protected int getFadeHeight(boolean offsetRequired) {
return mLayout != null ? mLayout.getHeight() : 0;
}
@@ -7618,7 +7619,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// mode (if any) as soon as this TextView is recycled.
stopSelectionActionMode();
}
-
+
@Override
public void onFinishTemporaryDetach() {
super.onFinishTemporaryDetach();
@@ -7626,7 +7627,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// usually because this instance is an editable field in a list
if (!mDispatchTemporaryDetach) mTemporaryDetach = false;
}
-
+
@Override
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
if (mTemporaryDetach) {
@@ -9200,16 +9201,17 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* Paste actions, depending on what this View supports.
*
* A custom implementation can add new entries in the default menu in its
- * {@link ActionMode.Callback#onPrepareActionMode(ActionMode, Menu)} method. The default actions
- * can also be removed from the menu using {@link Menu#removeItem(int)} and passing
- * {@link android.R.id#selectAll}, {@link android.R.id#cut}, {@link android.R.id#copy} or
- * {@link android.R.id#paste} ids as parameters.
+ * {@link android.view.ActionMode.Callback#onPrepareActionMode(ActionMode, Menu)} method. The
+ * default actions can also be removed from the menu using {@link Menu#removeItem(int)} and
+ * passing {@link android.R.id#selectAll}, {@link android.R.id#cut}, {@link android.R.id#copy}
+ * or {@link android.R.id#paste} ids as parameters.
*
- * Returning false from {@link ActionMode.Callback#onCreateActionMode(ActionMode, Menu)} will
- * prevent the action mode from being started.
+ * Returning false from
+ * {@link android.view.ActionMode.Callback#onCreateActionMode(ActionMode, Menu)} will prevent
+ * the action mode from being started.
*
* Action click events should be handled by the custom implementation of
- * {@link ActionMode.Callback#onActionItemClicked(ActionMode, MenuItem)}.
+ * {@link android.view.ActionMode.Callback#onActionItemClicked(ActionMode, MenuItem)}.
*
* Note that text selection mode is not started when a TextView receives focus and the
* {@link android.R.attr#selectAllOnFocus} flag has been set. The content is highlighted in
@@ -9765,9 +9767,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
mLastParentX = mTempCoords[0];
mLastParentY = mTempCoords[1];
}
- }
- onHandleMoved();
+ onHandleMoved();
+ }
if (isPositionVisible()) {
mContainer.update(mContainerPositionX, mContainerPositionY,
@@ -10210,7 +10212,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
mPreviousTapPositionX = x;
mPreviousTapPositionY = y;
-
break;
case MotionEvent.ACTION_POINTER_DOWN:
@@ -10526,6 +10527,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
mTextDir = TextDirectionHeuristics.RTL;
break;
}
+
}
/**