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
9dc1200b
Commit
9dc1200b
authored
12 years ago
by
Tadashi G. Takaoka
Browse files
Options
Downloads
Patches
Plain Diff
Fix key preview when shifted hint letter is activated
Change-Id: I70d2627318d21eb612c3c3fee2ce8e80555dba12
parent
5f1d71fb
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
java/src/com/android/inputmethod/keyboard/KeyboardView.java
+4
-3
4 additions, 3 deletions
java/src/com/android/inputmethod/keyboard/KeyboardView.java
with
4 additions
and
3 deletions
java/src/com/android/inputmethod/keyboard/KeyboardView.java
+
4
−
3
View file @
9dc1200b
...
...
@@ -880,18 +880,19 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy {
final
KeyPreviewDrawParams
params
=
mKeyPreviewDrawParams
;
final
int
keyDrawX
=
key
.
mX
+
key
.
mVisualInsetsLeft
;
final
int
keyDrawWidth
=
key
.
mWidth
-
key
.
mVisualInsetsLeft
-
key
.
mVisualInsetsRight
;
final
String
label
=
key
.
isShiftedLetterActivated
()
?
key
.
mHintLabel
:
key
.
mLabel
;
// What we show as preview should match what we show on a key top in onBufferDraw().
if
(
key
.
mL
abel
!=
null
)
{
if
(
l
abel
!=
null
)
{
// TODO Should take care of temporaryShiftLabel here.
previewText
.
setCompoundDrawables
(
null
,
null
,
null
,
null
);
if
(
StringUtils
.
codePointCount
(
key
.
mL
abel
)
>
1
)
{
if
(
StringUtils
.
codePointCount
(
l
abel
)
>
1
)
{
previewText
.
setTextSize
(
TypedValue
.
COMPLEX_UNIT_PX
,
params
.
mKeyLetterSize
);
previewText
.
setTypeface
(
Typeface
.
DEFAULT_BOLD
);
}
else
{
previewText
.
setTextSize
(
TypedValue
.
COMPLEX_UNIT_PX
,
params
.
mPreviewTextSize
);
previewText
.
setTypeface
(
params
.
mKeyTextStyle
);
}
previewText
.
setText
(
key
.
mL
abel
);
previewText
.
setText
(
l
abel
);
}
else
{
previewText
.
setCompoundDrawables
(
null
,
null
,
null
,
key
.
getPreviewIcon
(
mKeyboard
.
mIconsSet
));
...
...
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