Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
82674ca8
Commit
82674ca8
authored
10 years ago
by
Tadashi G. Takaoka
Browse files
Options
Downloads
Patches
Plain Diff
Fix to clear on hover visual cue
Bug: 12491371 Change-Id: Ib7ca91ae73aa40e45ea5f6d4e53348a261a4b823
parent
fa9b9578
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java
+17
-13
17 additions, 13 deletions
...utmethod/accessibility/KeyboardAccessibilityDelegate.java
with
17 additions
and
13 deletions
java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java
+
17
−
13
View file @
82674ca8
...
...
@@ -39,7 +39,7 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView>
protected
final
KeyDetector
mKeyDetector
;
private
Keyboard
mKeyboard
;
private
KeyboardAccessibilityNodeProvider
mAccessibilityNodeProvider
;
private
Key
m
Curren
tHoverKey
;
private
Key
m
Las
tHoverKey
;
public
KeyboardAccessibilityDelegate
(
final
KV
keyboardView
,
final
KeyDetector
keyDetector
)
{
super
();
...
...
@@ -71,12 +71,12 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView>
return
mKeyboard
;
}
protected
final
void
set
Curren
tHoverKey
(
final
Key
key
)
{
m
Curren
tHoverKey
=
key
;
protected
final
void
set
Las
tHoverKey
(
final
Key
key
)
{
m
Las
tHoverKey
=
key
;
}
protected
final
Key
get
Curren
tHoverKey
()
{
return
m
Curren
tHoverKey
;
protected
final
Key
get
Las
tHoverKey
()
{
return
m
Las
tHoverKey
;
}
/**
...
...
@@ -142,7 +142,7 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView>
* @param event The hover event.
* @return key The key that the <code>event</code> is on.
*/
protected
final
Key
getHoverKey
(
final
MotionEvent
event
)
{
protected
final
Key
getHoverKey
Of
(
final
MotionEvent
event
)
{
final
int
actionIndex
=
event
.
getActionIndex
();
final
int
x
=
(
int
)
event
.
getX
(
actionIndex
);
final
int
y
=
(
int
)
event
.
getY
(
actionIndex
);
...
...
@@ -179,11 +179,11 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView>
* @param event A hover enter event.
*/
protected
void
onHoverEnter
(
final
MotionEvent
event
)
{
final
Key
key
=
getHoverKey
(
event
);
final
Key
key
=
getHoverKey
Of
(
event
);
if
(
key
!=
null
)
{
onHoverEnterKey
(
key
);
}
set
Curren
tHoverKey
(
key
);
set
Las
tHoverKey
(
key
);
}
/**
...
...
@@ -192,8 +192,8 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView>
* @param event A hover move event.
*/
protected
void
onHoverMove
(
final
MotionEvent
event
)
{
final
Key
previousKey
=
get
Curren
tHoverKey
();
final
Key
key
=
getHoverKey
(
event
);
final
Key
previousKey
=
get
Las
tHoverKey
();
final
Key
key
=
getHoverKey
Of
(
event
);
if
(
key
!=
previousKey
)
{
if
(
previousKey
!=
null
)
{
onHoverExitKey
(
previousKey
);
...
...
@@ -205,7 +205,7 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView>
if
(
key
!=
null
)
{
onHoverMoveKey
(
key
);
}
set
Curren
tHoverKey
(
key
);
set
Las
tHoverKey
(
key
);
}
/**
...
...
@@ -214,7 +214,11 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView>
* @param event A hover exit event.
*/
protected
void
onHoverExit
(
final
MotionEvent
event
)
{
final
Key
key
=
getHoverKey
(
event
);
final
Key
lastKey
=
getLastHoverKey
();
if
(
lastKey
!=
null
)
{
onHoverExitKey
(
lastKey
);
}
final
Key
key
=
getHoverKeyOf
(
event
);
// Make sure we're not getting an EXIT event because the user slid
// off the keyboard area, then force a key press.
if
(
key
!=
null
)
{
...
...
@@ -222,7 +226,7 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView>
simulateTouchEvent
(
MotionEvent
.
ACTION_UP
,
event
);
onHoverExitKey
(
key
);
}
set
Curren
tHoverKey
(
null
);
set
Las
tHoverKey
(
null
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment