summaryrefslogtreecommitdiffstats
path: root/docs/html/guide/topics/ui/index.jd
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-05-29 19:12:34 +0900
committerJean Chalard <jchalard@google.com>2012-05-29 19:41:02 +0900
commit405bc51c5dc73846a4abdc325cd234eb2d37469f (patch)
treed1fed7b33e246fb4d57c43a73e89f462e6d2077a /docs/html/guide/topics/ui/index.jd
parentc3a5cf9aab3d409445accb2a93c09e6b4140d196 (diff)
downloadframeworks_base-405bc51c5dc73846a4abdc325cd234eb2d37469f.zip
frameworks_base-405bc51c5dc73846a4abdc325cd234eb2d37469f.tar.gz
frameworks_base-405bc51c5dc73846a4abdc325cd234eb2d37469f.tar.bz2
Add/refine comments to reflect key event policies
Make clearer how the platform is handling key events following some unfortunate uses by third party applications. Also highlight the changes in Jelly Bean default keyboard. Bug: 6566711 Change-Id: Ibcdaf54c6d629fd0733529bfe2fffc82f555f084
Diffstat (limited to 'docs/html/guide/topics/ui/index.jd')
-rw-r--r--docs/html/guide/topics/ui/index.jd4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/html/guide/topics/ui/index.jd b/docs/html/guide/topics/ui/index.jd
index 45c9ac9..be07249 100644
--- a/docs/html/guide/topics/ui/index.jd
+++ b/docs/html/guide/topics/ui/index.jd
@@ -148,7 +148,7 @@ this is how you'll listen for events. The View class contains a collection of ne
On<em>&lt;something></em>Listener, each with a callback method called <code>On<em>&lt;something></em>()</code>.
For example, {@link android.view.View.OnClickListener} (for handling "clicks" on a View),
{@link android.view.View.OnTouchListener} (for handling touch screen events in a View), and
-{@link android.view.View.OnKeyListener} (for handling device key presses within a View). So if you want your View
+{@link android.view.View.OnKeyListener} if you want to handle hardware key presses within a View. So if you want your View
to be notified when it is "clicked" (such as when a button is selected), implement OnClickListener and define
its <code>onClick()</code> callback method (where you perform the action upon click), and register it
to the View with <code>{@link android.view.View#setOnClickListener(View.OnClickListener) setOnClickListener()}</code>.
@@ -158,7 +158,7 @@ what you should do when you've implemented your own View class and want to liste
that occur within it. Example events you can handle include when the
screen is touched (<code>{@link android.view.View#onTouchEvent(MotionEvent) onTouchEvent()}</code>), when
the trackball is moved (<code>{@link android.view.View#onTrackballEvent(MotionEvent) onTrackballEvent()}</code>),
-or when a key on the device is pressed (<code>{@link android.view.View#onKeyDown(int, KeyEvent)
+or when a <em>hardware</em> key on the device is pressed (<code>{@link android.view.View#onKeyDown(int, KeyEvent)
onKeyDown()}</code>). This allows you to define the default behavior for each event inside your custom View and determine
whether the event should be passed on to some other child View. Again, these are callbacks to the View class,
so your only chance to define them is when you