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
dd8c4c00
Commit
dd8c4c00
authored
14 years ago
by
satok
Committed by
Android (Google) Code Review
14 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Increased the size of GRID in Keyboard"
parents
37a0f2d5
74103ee1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/res/values/config.xml
+2
-0
2 additions, 0 deletions
java/res/values/config.xml
java/src/com/android/inputmethod/latin/BaseKeyboard.java
+11
-14
11 additions, 14 deletions
java/src/com/android/inputmethod/latin/BaseKeyboard.java
with
13 additions
and
14 deletions
java/res/values/config.xml
+
2
−
0
View file @
dd8c4c00
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
<integer
name=
"config_mini_keyboard_fadeout_anim_time"
>
100
</integer>
<integer
name=
"config_mini_keyboard_fadeout_anim_time"
>
100
</integer>
<integer
name=
"config_delay_before_key_repeat_start"
>
400
</integer>
<integer
name=
"config_delay_before_key_repeat_start"
>
400
</integer>
<integer
name=
"config_key_repeat_interval"
>
50
</integer>
<integer
name=
"config_key_repeat_interval"
>
50
</integer>
<integer
name=
"config_keyboard_grid_width"
>
32
</integer>
<integer
name=
"config_keyboard_grid_height"
>
16
</integer>
<integer
name=
"config_long_press_key_timeout"
>
400
</integer>
<integer
name=
"config_long_press_key_timeout"
>
400
</integer>
<integer
name=
"config_long_press_shift_key_timeout"
>
1200
</integer>
<integer
name=
"config_long_press_shift_key_timeout"
>
1200
</integer>
<integer
name=
"config_multi_tap_key_timeout"
>
800
</integer>
<integer
name=
"config_multi_tap_key_timeout"
>
800
</integer>
...
...
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/latin/BaseKeyboard.java
+
11
−
14
View file @
dd8c4c00
...
@@ -109,9 +109,9 @@ public class BaseKeyboard {
...
@@ -109,9 +109,9 @@ public class BaseKeyboard {
// Variables for pre-computing nearest keys.
// Variables for pre-computing nearest keys.
private
static
final
int
GRID_WIDTH
=
10
;
private
final
int
GRID_WIDTH
;
private
static
final
int
GRID_HEIGHT
=
5
;
private
final
int
GRID_HEIGHT
;
private
static
final
int
GRID_SIZE
=
GRID_WIDTH
*
GRID_HEIGHT
;
private
final
int
GRID_SIZE
;
private
int
mCellWidth
;
private
int
mCellWidth
;
private
int
mCellHeight
;
private
int
mCellHeight
;
private
int
[][]
mGridNeighbors
;
private
int
[][]
mGridNeighbors
;
...
@@ -466,6 +466,11 @@ public class BaseKeyboard {
...
@@ -466,6 +466,11 @@ public class BaseKeyboard {
* @param height sets height of keyboard
* @param height sets height of keyboard
*/
*/
public
BaseKeyboard
(
Context
context
,
int
xmlLayoutResId
,
int
modeId
,
int
width
,
int
height
)
{
public
BaseKeyboard
(
Context
context
,
int
xmlLayoutResId
,
int
modeId
,
int
width
,
int
height
)
{
Resources
res
=
context
.
getResources
();
GRID_WIDTH
=
res
.
getInteger
(
R
.
integer
.
config_keyboard_grid_width
);
GRID_HEIGHT
=
res
.
getInteger
(
R
.
integer
.
config_keyboard_grid_height
);
GRID_SIZE
=
GRID_WIDTH
*
GRID_HEIGHT
;
mDisplayWidth
=
width
;
mDisplayWidth
=
width
;
mDisplayHeight
=
height
;
mDisplayHeight
=
height
;
...
@@ -485,17 +490,9 @@ public class BaseKeyboard {
...
@@ -485,17 +490,9 @@ public class BaseKeyboard {
* @param modeId keyboard mode identifier
* @param modeId keyboard mode identifier
*/
*/
public
BaseKeyboard
(
Context
context
,
int
xmlLayoutResId
,
int
modeId
)
{
public
BaseKeyboard
(
Context
context
,
int
xmlLayoutResId
,
int
modeId
)
{
DisplayMetrics
dm
=
context
.
getResources
().
getDisplayMetrics
();
this
(
context
,
xmlLayoutResId
,
modeId
,
mDisplayWidth
=
dm
.
widthPixels
;
context
.
getResources
().
getDisplayMetrics
().
widthPixels
,
mDisplayHeight
=
dm
.
heightPixels
;
context
.
getResources
().
getDisplayMetrics
().
heightPixels
);
//Log.v(TAG, "keyboard's display metrics:" + dm);
mDefaultHorizontalGap
=
0
;
setKeyWidth
(
mDisplayWidth
/
10
);
mDefaultVerticalGap
=
0
;
mDefaultHeight
=
mDefaultWidth
;
mKeyboardMode
=
modeId
;
loadKeyboard
(
context
,
xmlLayoutResId
);
}
}
/**
/**
...
...
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