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
323971b5
Commit
323971b5
authored
14 years ago
by
Tadashi G. Takaoka
Committed by
Android (Google) Code Review
14 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Follow up change of I4c6df819"
parents
adf24e2e
ed3443eb
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/latin/LatinKeyboard.java
+14
-24
14 additions, 24 deletions
java/src/com/android/inputmethod/latin/LatinKeyboard.java
with
14 additions
and
24 deletions
java/src/com/android/inputmethod/latin/LatinKeyboard.java
+
14
−
24
View file @
323971b5
...
...
@@ -158,46 +158,36 @@ public class LatinKeyboard extends BaseKeyboard {
return
key
;
}
private
static
void
resetKeyAttributes
(
Key
key
,
CharSequence
label
)
{
key
.
popupCharacters
=
null
;
key
.
popupResId
=
0
;
key
.
text
=
null
;
key
.
iconPreview
=
null
;
key
.
icon
=
null
;
key
.
label
=
label
;
}
public
void
setImeOptions
(
Resources
res
,
int
mode
,
int
options
)
{
if
(
mEnterKey
!=
null
)
{
// Reset some of the rarely used attributes.
mEnterKey
.
popupCharacters
=
null
;
mEnterKey
.
popupResId
=
0
;
mEnterKey
.
text
=
null
;
switch
(
options
&
(
EditorInfo
.
IME_MASK_ACTION
|
EditorInfo
.
IME_FLAG_NO_ENTER_ACTION
))
{
case
EditorInfo
.
IME_ACTION_GO
:
mEnterKey
.
iconPreview
=
null
;
mEnterKey
.
icon
=
null
;
mEnterKey
.
label
=
res
.
getText
(
R
.
string
.
label_go_key
);
resetKeyAttributes
(
mEnterKey
,
res
.
getText
(
R
.
string
.
label_go_key
));
break
;
case
EditorInfo
.
IME_ACTION_NEXT
:
mEnterKey
.
iconPreview
=
null
;
mEnterKey
.
icon
=
null
;
mEnterKey
.
label
=
res
.
getText
(
R
.
string
.
label_next_key
);
resetKeyAttributes
(
mEnterKey
,
res
.
getText
(
R
.
string
.
label_next_key
));
break
;
case
EditorInfo
.
IME_ACTION_DONE
:
mEnterKey
.
iconPreview
=
null
;
mEnterKey
.
icon
=
null
;
mEnterKey
.
label
=
res
.
getText
(
R
.
string
.
label_done_key
);
resetKeyAttributes
(
mEnterKey
,
res
.
getText
(
R
.
string
.
label_done_key
));
break
;
case
EditorInfo
.
IME_ACTION_SEARCH
:
resetKeyAttributes
(
mEnterKey
,
null
);
mEnterKey
.
iconPreview
=
res
.
getDrawable
(
R
.
drawable
.
sym_keyboard_feedback_search
);
mEnterKey
.
icon
=
res
.
getDrawable
(
mIsBlackSym
?
R
.
drawable
.
sym_bkeyboard_search
:
R
.
drawable
.
sym_keyboard_search
);
mEnterKey
.
label
=
null
;
break
;
case
EditorInfo
.
IME_ACTION_SEND
:
mEnterKey
.
iconPreview
=
null
;
mEnterKey
.
icon
=
null
;
mEnterKey
.
label
=
res
.
getText
(
R
.
string
.
label_send_key
);
break
;
default
:
mEnterKey
.
iconPreview
=
res
.
getDrawable
(
R
.
drawable
.
sym_keyboard_feedback_return
);
mEnterKey
.
icon
=
res
.
getDrawable
(
mIsBlackSym
?
R
.
drawable
.
sym_bkeyboard_return
:
R
.
drawable
.
sym_keyboard_return
);
mEnterKey
.
label
=
null
;
resetKeyAttributes
(
mEnterKey
,
res
.
getText
(
R
.
string
.
label_send_key
));
break
;
}
// Set the initial size of the preview icon
...
...
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