Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(644)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/input/HandleView.java

Issue 14100003: [Android] Moving input related files to a separate input/ directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/android/java/src/org/chromium/content/browser/input/HandleView.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/HandleView.java b/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java
similarity index 98%
rename from content/public/android/java/src/org/chromium/content/browser/HandleView.java
rename to content/public/android/java/src/org/chromium/content/browser/input/HandleView.java
index a772d5deac6e57ed85091524d9682f64846df063..a220894fd8028765a9cfdad248624891ae7a84e5 100644
--- a/content/public/android/java/src/org/chromium/content/browser/HandleView.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-package org.chromium.content.browser;
+package org.chromium.content.browser.input;
import android.content.Context;
import android.content.res.TypedArray;
@@ -27,7 +27,7 @@ import android.widget.TextView;
/**
* View that displays a selection or insertion handle for text editing.
*/
-class HandleView extends View {
+public class HandleView extends View {
private static final float FADE_DURATION = 200.f;
private Drawable mDrawable;
@@ -113,7 +113,7 @@ class HandleView extends View {
}
mDrawable = mSelectHandleLeft;
handleWidth = mDrawable.getIntrinsicWidth();
- mHotspotX = (handleWidth * 3) / 4;
+ mHotspotX = (handleWidth * 3) / 4f;
break;
}
@@ -124,7 +124,7 @@ class HandleView extends View {
}
mDrawable = mSelectHandleRight;
handleWidth = mDrawable.getIntrinsicWidth();
- mHotspotX = handleWidth / 4;
+ mHotspotX = handleWidth / 4f;
break;
}
@@ -136,7 +136,7 @@ class HandleView extends View {
}
mDrawable = mSelectHandleCenter;
handleWidth = mDrawable.getIntrinsicWidth();
- mHotspotX = handleWidth / 2;
+ mHotspotX = handleWidth / 2f;
mIsInsertionHandle = true;
break;
}
@@ -306,6 +306,9 @@ class HandleView extends View {
case MotionEvent.ACTION_CANCEL:
mIsDragging = false;
break;
+
+ default:
+ return false;
}
return true;
}

Powered by Google App Engine
This is Rietveld 408576698