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
e060d1a5
Commit
e060d1a5
authored
12 years ago
by
Tadashi G. Takaoka
Committed by
Android (Google) Code Review
12 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Fix using keyboard layout display name in custom input style spinner"
parents
0df78d46
a245be68
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/latin/AdditionalSubtypeSettings.java
+8
-9
8 additions, 9 deletions
.../android/inputmethod/latin/AdditionalSubtypeSettings.java
with
8 additions
and
9 deletions
java/src/com/android/inputmethod/latin/AdditionalSubtypeSettings.java
+
8
−
9
View file @
e060d1a5
...
...
@@ -109,18 +109,15 @@ public class AdditionalSubtypeSettings extends PreferenceFragment {
}
static
class
KeyboardLayoutSetItem
extends
Pair
<
String
,
String
>
{
public
KeyboardLayoutSetItem
(
String
keyboardLayoutSetName
)
{
super
(
keyboardLayoutSetName
,
getDisplayName
(
keyboardLayoutSetName
));
public
KeyboardLayoutSetItem
(
InputMethodSubtype
subtype
)
{
super
(
SubtypeLocale
.
getKeyboardLayoutSetName
(
subtype
),
SubtypeLocale
.
getKeyboardLayoutSetDisplayName
(
subtype
));
}
@Override
public
String
toString
()
{
return
second
;
}
private
static
String
getDisplayName
(
String
keyboardLayoutSetName
)
{
return
keyboardLayoutSetName
.
toUpperCase
();
}
}
static
class
KeyboardLayoutSetAdapter
extends
ArrayAdapter
<
KeyboardLayoutSetItem
>
{
...
...
@@ -130,7 +127,10 @@ public class AdditionalSubtypeSettings extends PreferenceFragment {
// TODO: Should filter out already existing combinations of locale and layout.
for
(
final
String
layout
:
SubtypeLocale
.
getPredefinedKeyboardLayoutSet
())
{
add
(
new
KeyboardLayoutSetItem
(
layout
));
// This is a dummy subtype with NO_LANGUAGE, only for display.
final
InputMethodSubtype
subtype
=
AdditionalSubtype
.
createAdditionalSubtype
(
SubtypeLocale
.
NO_LANGUAGE
,
layout
,
null
);
add
(
new
KeyboardLayoutSetItem
(
subtype
));
}
}
}
...
...
@@ -196,8 +196,7 @@ public class AdditionalSubtypeSettings extends PreferenceFragment {
.
setNegativeButton
(
R
.
string
.
remove
,
this
);
final
SubtypeLocaleItem
localeItem
=
SubtypeLocaleAdapter
.
createItem
(
context
,
mSubtype
.
getLocale
());
final
KeyboardLayoutSetItem
layoutItem
=
new
KeyboardLayoutSetItem
(
SubtypeLocale
.
getKeyboardLayoutSetName
(
mSubtype
));
final
KeyboardLayoutSetItem
layoutItem
=
new
KeyboardLayoutSetItem
(
mSubtype
);
setSpinnerPosition
(
mSubtypeLocaleSpinner
,
localeItem
);
setSpinnerPosition
(
mKeyboardLayoutSetSpinner
,
layoutItem
);
}
...
...
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