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
80a4b7c9
Commit
80a4b7c9
authored
11 years ago
by
Keisuke Kuroynagi
Committed by
Android (Google) Code Review
11 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Extend center point vertically for bottom keys on a keyboard."
parents
564ad492
77ec8713
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
native/jni/src/suggest/core/layout/proximity_info.cpp
+14
-6
14 additions, 6 deletions
native/jni/src/suggest/core/layout/proximity_info.cpp
with
14 additions
and
6 deletions
native/jni/src/suggest/core/layout/proximity_info.cpp
+
14
−
6
View file @
80a4b7c9
...
@@ -215,22 +215,30 @@ int ProximityInfo::getKeyCenterXOfKeyIdG(
...
@@ -215,22 +215,30 @@ int ProximityInfo::getKeyCenterXOfKeyIdG(
return
centerX
;
return
centerX
;
}
}
// referencePointY is currently not used because we don't specially handle keys higher than the
// When the referencePointY is NOT_A_COORDINATE, this method calculates the return value without
// most common key height. When the referencePointY is NOT_A_COORDINATE, this method should
// using the line segment.
// calculate the return value without using the line segment.
int
ProximityInfo
::
getKeyCenterYOfKeyIdG
(
int
ProximityInfo
::
getKeyCenterYOfKeyIdG
(
const
int
keyId
,
const
int
referencePointY
,
const
bool
isGeometric
)
const
{
const
int
keyId
,
const
int
referencePointY
,
const
bool
isGeometric
)
const
{
// TODO: Remove "isGeometric" and have separate "proximity_info"s for gesture and typing.
// TODO: Remove "isGeometric" and have separate "proximity_info"s for gesture and typing.
if
(
keyId
<
0
)
{
if
(
keyId
<
0
)
{
return
0
;
return
0
;
}
}
int
centerY
;
if
(
!
hasTouchPositionCorrectionData
())
{
if
(
!
hasTouchPositionCorrectionData
())
{
return
mCenterYsG
[
keyId
];
centerY
=
mCenterYsG
[
keyId
];
}
else
if
(
isGeometric
)
{
}
else
if
(
isGeometric
)
{
return
static_cast
<
int
>
(
mSweetSpotCenterYsG
[
keyId
]);
centerY
=
static_cast
<
int
>
(
mSweetSpotCenterYsG
[
keyId
]);
}
else
{
}
else
{
return
static_cast
<
int
>
(
mSweetSpotCenterYs
[
keyId
]);
centerY
=
static_cast
<
int
>
(
mSweetSpotCenterYs
[
keyId
]);
}
}
if
(
referencePointY
!=
NOT_A_COORDINATE
&&
centerY
+
mKeyHeights
[
keyId
]
>
KEYBOARD_HEIGHT
&&
centerY
<
referencePointY
)
{
// When the distance between center point and bottom edge of the keyboard is shorter than
// the key height, we assume the key is located at the bottom row of the keyboard.
// The center point is extended to the bottom edge for such keys.
return
referencePointY
;
}
return
centerY
;
}
}
int
ProximityInfo
::
getKeyKeyDistanceG
(
const
int
keyId0
,
const
int
keyId1
)
const
{
int
ProximityInfo
::
getKeyKeyDistanceG
(
const
int
keyId0
,
const
int
keyId1
)
const
{
...
...
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