diff options
Diffstat (limited to 'src/com/android/launcher2/BubbleTextView.java')
-rw-r--r-- | src/com/android/launcher2/BubbleTextView.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java index 146485489..703b3a8cb 100644 --- a/src/com/android/launcher2/BubbleTextView.java +++ b/src/com/android/launcher2/BubbleTextView.java @@ -29,6 +29,7 @@ import android.graphics.Region; import android.graphics.Region.Op; import android.graphics.drawable.Drawable; import android.util.AttributeSet; +import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.widget.TextView; @@ -87,8 +88,6 @@ public class BubbleTextView extends TextView implements VisibilityChangedBroadca private void init() { mBackground = getBackground(); - setFocusable(true); - setBackgroundDrawable(null); final Resources res = getContext().getResources(); int bubbleColor = res.getColor(R.color.bubble_dark_background); @@ -330,4 +329,16 @@ public class BubbleTextView extends TextView implements VisibilityChangedBroadca } return true; } + + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + return FocusHelper.handleBubbleTextViewKeyEvent(this, keyCode, event) + || super.onKeyDown(keyCode, event); + } + + @Override + public boolean onKeyUp(int keyCode, KeyEvent event) { + return FocusHelper.handleBubbleTextViewKeyEvent(this, keyCode, event) + || super.onKeyUp(keyCode, event); + } } |