Merge "Remove top padding parameter from MiniKeyboardBuilder constructor"

This commit is contained in:
Tadashi G. Takaoka 2011-07-02 05:24:50 -07:00 committed by Android (Google) Code Review
commit c190da0e02
2 changed files with 83 additions and 80 deletions

View file

@ -43,7 +43,7 @@ public class MiniKeyboardBuilder {
public final int mNumColumns; public final int mNumColumns;
public final int mLeftKeys; public final int mLeftKeys;
public final int mRightKeys; // includes default key. public final int mRightKeys; // includes default key.
public final int mTopPadding; public int mTopPadding;
/** /**
* The object holding mini keyboard layout parameters. * The object holding mini keyboard layout parameters.
@ -54,17 +54,15 @@ public class MiniKeyboardBuilder {
* @param rowHeight mini keyboard row height in pixel, including vertical gap. * @param rowHeight mini keyboard row height in pixel, including vertical gap.
* @param coordXInParent coordinate x of the popup key in parent keyboard. * @param coordXInParent coordinate x of the popup key in parent keyboard.
* @param parentKeyboardWidth parent keyboard width in pixel. * @param parentKeyboardWidth parent keyboard width in pixel.
* @param topPadding top padding of mini keyboard, maybe equals to vertical gap of the
* parent keyboard. * parent keyboard.
*/ */
public MiniKeyboardLayoutParams(int numKeys, int maxColumns, int keyWidth, int rowHeight, public MiniKeyboardLayoutParams(int numKeys, int maxColumns, int keyWidth, int rowHeight,
int coordXInParent, int parentKeyboardWidth, int topPadding) { int coordXInParent, int parentKeyboardWidth) {
if (parentKeyboardWidth / keyWidth < maxColumns) if (parentKeyboardWidth / keyWidth < maxColumns)
throw new IllegalArgumentException("Keyboard is too small to hold mini keyboard: " throw new IllegalArgumentException("Keyboard is too small to hold mini keyboard: "
+ parentKeyboardWidth + " " + keyWidth + " " + maxColumns); + parentKeyboardWidth + " " + keyWidth + " " + maxColumns);
mKeyWidth = keyWidth; mKeyWidth = keyWidth;
mRowHeight = rowHeight; mRowHeight = rowHeight;
mTopPadding = topPadding;
final int numRows = (numKeys + maxColumns - 1) / maxColumns; final int numRows = (numKeys + maxColumns - 1) / maxColumns;
mNumRows = numRows; mNumRows = numRows;
@ -188,6 +186,10 @@ public class MiniKeyboardBuilder {
return rowCount == mNumRows - 1; return rowCount == mNumRows - 1;
} }
public void setTopPadding (int topPadding) {
mTopPadding = topPadding;
}
public int getKeyboardHeight() { public int getKeyboardHeight() {
return mNumRows * mRowHeight + mTopPadding; return mNumRows * mRowHeight + mTopPadding;
} }
@ -211,7 +213,8 @@ public class MiniKeyboardBuilder {
mPopupCharacters.length, parentKey.mMaxPopupColumn, mPopupCharacters.length, parentKey.mMaxPopupColumn,
keyWidth, parentKeyboard.getRowHeight(), keyWidth, parentKeyboard.getRowHeight(),
parentKey.mX + (parentKey.mWidth + parentKey.mGap) / 2 - keyWidth / 2, parentKey.mX + (parentKey.mWidth + parentKey.mGap) / 2 - keyWidth / 2,
view.getMeasuredWidth(), keyboard.getVerticalGap()); view.getMeasuredWidth());
params.setTopPadding(keyboard.getVerticalGap());
mParams = params; mParams = params;
keyboard.setRowHeight(params.mRowHeight); keyboard.setRowHeight(params.mRowHeight);

View file

@ -44,7 +44,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
MiniKeyboardLayoutParams params = null; MiniKeyboardLayoutParams params = null;
try { try {
params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS + 1, WIDTH, HEIGHT, WIDTH * 2, params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS + 1, WIDTH, HEIGHT, WIDTH * 2,
WIDTH * MAX_COLUMNS, 0); WIDTH * MAX_COLUMNS);
fail("Should throw IllegalArgumentException"); fail("Should throw IllegalArgumentException");
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
// Too small keyboard to hold mini keyboard. // Too small keyboard to hold mini keyboard.
@ -59,7 +59,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [1] // [1]
public void testLayout1KeyM0() { public void testLayout1KeyM0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(1, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(1, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_M0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
assertEquals("1 key M0 columns", 1, params.mNumColumns); assertEquals("1 key M0 columns", 1, params.mNumColumns);
assertEquals("1 key M0 rows", 1, params.mNumRows); assertEquals("1 key M0 rows", 1, params.mNumRows);
assertEquals("1 key M0 left", 0, params.mLeftKeys); assertEquals("1 key M0 left", 0, params.mLeftKeys);
@ -72,7 +72,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |[1] // |[1]
public void testLayout1KeyL0() { public void testLayout1KeyL0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(1, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(1, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
assertEquals("1 key L0 columns", 1, params.mNumColumns); assertEquals("1 key L0 columns", 1, params.mNumColumns);
assertEquals("1 key L0 rows", 1, params.mNumRows); assertEquals("1 key L0 rows", 1, params.mNumRows);
assertEquals("1 key L0 left", 0, params.mLeftKeys); assertEquals("1 key L0 left", 0, params.mLeftKeys);
@ -85,7 +85,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ [1] // |___ [1]
public void testLayout1KeyL1() { public void testLayout1KeyL1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(1, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(1, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
assertEquals("1 key L1 columns", 1, params.mNumColumns); assertEquals("1 key L1 columns", 1, params.mNumColumns);
assertEquals("1 key L1 rows", 1, params.mNumRows); assertEquals("1 key L1 rows", 1, params.mNumRows);
assertEquals("1 key L1 left", 0, params.mLeftKeys); assertEquals("1 key L1 left", 0, params.mLeftKeys);
@ -98,7 +98,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ ___ [1] // |___ ___ [1]
public void testLayout1KeyL2() { public void testLayout1KeyL2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(1, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(1, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
assertEquals("1 key L2 columns", 1, params.mNumColumns); assertEquals("1 key L2 columns", 1, params.mNumColumns);
assertEquals("1 key L2 rows", 1, params.mNumRows); assertEquals("1 key L2 rows", 1, params.mNumRows);
assertEquals("1 key L2 left", 0, params.mLeftKeys); assertEquals("1 key L2 left", 0, params.mLeftKeys);
@ -111,7 +111,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [1]| // [1]|
public void testLayout1KeyR0() { public void testLayout1KeyR0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(1, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(1, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
assertEquals("1 key R0 columns", 1, params.mNumColumns); assertEquals("1 key R0 columns", 1, params.mNumColumns);
assertEquals("1 key R0 rows", 1, params.mNumRows); assertEquals("1 key R0 rows", 1, params.mNumRows);
assertEquals("1 key R0 left", 0, params.mLeftKeys); assertEquals("1 key R0 left", 0, params.mLeftKeys);
@ -124,7 +124,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [1] ___| // [1] ___|
public void testLayout1KeyR1() { public void testLayout1KeyR1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(1, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(1, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
assertEquals("1 key R1 columns", 1, params.mNumColumns); assertEquals("1 key R1 columns", 1, params.mNumColumns);
assertEquals("1 key R1 rows", 1, params.mNumRows); assertEquals("1 key R1 rows", 1, params.mNumRows);
assertEquals("1 key R1 left", 0, params.mLeftKeys); assertEquals("1 key R1 left", 0, params.mLeftKeys);
@ -137,7 +137,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [1] ___ ___| // [1] ___ ___|
public void testLayout1KeyR2() { public void testLayout1KeyR2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(1, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(1, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
assertEquals("1 key R2 columns", 1, params.mNumColumns); assertEquals("1 key R2 columns", 1, params.mNumColumns);
assertEquals("1 key R2 rows", 1, params.mNumRows); assertEquals("1 key R2 rows", 1, params.mNumRows);
assertEquals("1 key R2 left", 0, params.mLeftKeys); assertEquals("1 key R2 left", 0, params.mLeftKeys);
@ -150,7 +150,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [1] [2] // [1] [2]
public void testLayout2KeyM0() { public void testLayout2KeyM0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(2, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(2, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_M0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
assertEquals("2 key M0 columns", 2, params.mNumColumns); assertEquals("2 key M0 columns", 2, params.mNumColumns);
assertEquals("2 key M0 rows", 1, params.mNumRows); assertEquals("2 key M0 rows", 1, params.mNumRows);
assertEquals("2 key M0 left", 0, params.mLeftKeys); assertEquals("2 key M0 left", 0, params.mLeftKeys);
@ -164,7 +164,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |[1] [2] // |[1] [2]
public void testLayout2KeyL0() { public void testLayout2KeyL0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(2, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(2, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
assertEquals("2 key L0 columns", 2, params.mNumColumns); assertEquals("2 key L0 columns", 2, params.mNumColumns);
assertEquals("2 key L0 rows", 1, params.mNumRows); assertEquals("2 key L0 rows", 1, params.mNumRows);
assertEquals("2 key L0 left", 0, params.mLeftKeys); assertEquals("2 key L0 left", 0, params.mLeftKeys);
@ -178,7 +178,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ [1] [2] // |___ [1] [2]
public void testLayout2KeyL1() { public void testLayout2KeyL1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(2, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(2, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
assertEquals("2 key L1 columns", 2, params.mNumColumns); assertEquals("2 key L1 columns", 2, params.mNumColumns);
assertEquals("2 key L1 rows", 1, params.mNumRows); assertEquals("2 key L1 rows", 1, params.mNumRows);
assertEquals("2 key L1 left", 0, params.mLeftKeys); assertEquals("2 key L1 left", 0, params.mLeftKeys);
@ -192,7 +192,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ ___ [1] [2] // |___ ___ [1] [2]
public void testLayout2KeyL2() { public void testLayout2KeyL2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(2, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(2, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
assertEquals("2 key L2 columns", 2, params.mNumColumns); assertEquals("2 key L2 columns", 2, params.mNumColumns);
assertEquals("2 key L2 rows", 1, params.mNumRows); assertEquals("2 key L2 rows", 1, params.mNumRows);
assertEquals("2 key L2 left", 0, params.mLeftKeys); assertEquals("2 key L2 left", 0, params.mLeftKeys);
@ -206,7 +206,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [2] [1]| // [2] [1]|
public void testLayout2KeyR0() { public void testLayout2KeyR0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(2, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(2, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
assertEquals("2 key R0 columns", 2, params.mNumColumns); assertEquals("2 key R0 columns", 2, params.mNumColumns);
assertEquals("2 key R0 rows", 1, params.mNumRows); assertEquals("2 key R0 rows", 1, params.mNumRows);
assertEquals("2 key R0 left", 1, params.mLeftKeys); assertEquals("2 key R0 left", 1, params.mLeftKeys);
@ -220,7 +220,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [2] [1] ___| // [2] [1] ___|
public void testLayout2KeyR1() { public void testLayout2KeyR1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(2, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(2, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
assertEquals("2 key R1 columns", 2, params.mNumColumns); assertEquals("2 key R1 columns", 2, params.mNumColumns);
assertEquals("2 key R1 rows", 1, params.mNumRows); assertEquals("2 key R1 rows", 1, params.mNumRows);
assertEquals("2 key R1 left", 1, params.mLeftKeys); assertEquals("2 key R1 left", 1, params.mLeftKeys);
@ -234,7 +234,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [1] [2] ___ ___| // [1] [2] ___ ___|
public void testLayout2KeyR2() { public void testLayout2KeyR2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(2, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(2, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
assertEquals("2 key R2 columns", 2, params.mNumColumns); assertEquals("2 key R2 columns", 2, params.mNumColumns);
assertEquals("2 key R2 rows", 1, params.mNumRows); assertEquals("2 key R2 rows", 1, params.mNumRows);
assertEquals("2 key R2 left", 0, params.mLeftKeys); assertEquals("2 key R2 left", 0, params.mLeftKeys);
@ -248,7 +248,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [3] [1] [2] // [3] [1] [2]
public void testLayout3KeyM0() { public void testLayout3KeyM0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(3, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(3, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_M0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
assertEquals("3 key columns", 3, params.mNumColumns); assertEquals("3 key columns", 3, params.mNumColumns);
assertEquals("3 key rows", 1, params.mNumRows); assertEquals("3 key rows", 1, params.mNumRows);
assertEquals("3 key left", 1, params.mLeftKeys); assertEquals("3 key left", 1, params.mLeftKeys);
@ -263,7 +263,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |[1] [2] [3] // |[1] [2] [3]
public void testLayout3KeyL0() { public void testLayout3KeyL0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(3, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(3, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
assertEquals("3 key L0 columns", 3, params.mNumColumns); assertEquals("3 key L0 columns", 3, params.mNumColumns);
assertEquals("3 key L0 rows", 1, params.mNumRows); assertEquals("3 key L0 rows", 1, params.mNumRows);
assertEquals("3 key L0 left", 0, params.mLeftKeys); assertEquals("3 key L0 left", 0, params.mLeftKeys);
@ -278,7 +278,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ [1] [2] [3] // |___ [1] [2] [3]
public void testLayout3KeyL1() { public void testLayout3KeyL1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(3, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(3, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
assertEquals("3 key L1 columns", 3, params.mNumColumns); assertEquals("3 key L1 columns", 3, params.mNumColumns);
assertEquals("3 key L1 rows", 1, params.mNumRows); assertEquals("3 key L1 rows", 1, params.mNumRows);
assertEquals("3 key L1 left", 0, params.mLeftKeys); assertEquals("3 key L1 left", 0, params.mLeftKeys);
@ -293,7 +293,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ ___ [3] [1] [2] // |___ ___ [3] [1] [2]
public void testLayout3KeyL2() { public void testLayout3KeyL2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(3, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(3, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
assertEquals("3 key L2 columns", 3, params.mNumColumns); assertEquals("3 key L2 columns", 3, params.mNumColumns);
assertEquals("3 key L2 rows", 1, params.mNumRows); assertEquals("3 key L2 rows", 1, params.mNumRows);
assertEquals("3 key L2 left", 1, params.mLeftKeys); assertEquals("3 key L2 left", 1, params.mLeftKeys);
@ -308,7 +308,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [3] [2] [1]| // [3] [2] [1]|
public void testLayout3KeyR0() { public void testLayout3KeyR0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(3, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(3, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
assertEquals("3 key R0 columns", 3, params.mNumColumns); assertEquals("3 key R0 columns", 3, params.mNumColumns);
assertEquals("3 key R0 rows", 1, params.mNumRows); assertEquals("3 key R0 rows", 1, params.mNumRows);
assertEquals("3 key R0 left", 2, params.mLeftKeys); assertEquals("3 key R0 left", 2, params.mLeftKeys);
@ -323,7 +323,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [3] [2] [1] ___| // [3] [2] [1] ___|
public void testLayout3KeyR1() { public void testLayout3KeyR1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(3, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(3, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
assertEquals("3 key R1 columns", 3, params.mNumColumns); assertEquals("3 key R1 columns", 3, params.mNumColumns);
assertEquals("3 key R1 rows", 1, params.mNumRows); assertEquals("3 key R1 rows", 1, params.mNumRows);
assertEquals("3 key R1 left", 2, params.mLeftKeys); assertEquals("3 key R1 left", 2, params.mLeftKeys);
@ -338,7 +338,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [3] [1] [2] ___ ___| // [3] [1] [2] ___ ___|
public void testLayout3KeyR2() { public void testLayout3KeyR2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(3, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(3, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
assertEquals("3 key R2 columns", 3, params.mNumColumns); assertEquals("3 key R2 columns", 3, params.mNumColumns);
assertEquals("3 key R2 rows", 1, params.mNumRows); assertEquals("3 key R2 rows", 1, params.mNumRows);
assertEquals("3 key R2 left", 1, params.mLeftKeys); assertEquals("3 key R2 left", 1, params.mLeftKeys);
@ -353,7 +353,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [3] [1] [2] [4] // [3] [1] [2] [4]
public void testLayout4KeyM0() { public void testLayout4KeyM0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(4, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(4, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_M0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
assertEquals("4 key columns", 4, params.mNumColumns); assertEquals("4 key columns", 4, params.mNumColumns);
assertEquals("4 key rows", 1, params.mNumRows); assertEquals("4 key rows", 1, params.mNumRows);
assertEquals("4 key left", 1, params.mLeftKeys); assertEquals("4 key left", 1, params.mLeftKeys);
@ -369,7 +369,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |[1] [2] [3] [4] // |[1] [2] [3] [4]
public void testLayout4KeyL0() { public void testLayout4KeyL0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(4, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(4, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
assertEquals("4 key L0 columns", 4, params.mNumColumns); assertEquals("4 key L0 columns", 4, params.mNumColumns);
assertEquals("4 key L0 rows", 1, params.mNumRows); assertEquals("4 key L0 rows", 1, params.mNumRows);
assertEquals("4 key L0 left", 0, params.mLeftKeys); assertEquals("4 key L0 left", 0, params.mLeftKeys);
@ -385,7 +385,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ [1] [2] [3] [4] // |___ [1] [2] [3] [4]
public void testLayout4KeyL1() { public void testLayout4KeyL1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(4, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(4, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
assertEquals("4 key L1 columns", 4, params.mNumColumns); assertEquals("4 key L1 columns", 4, params.mNumColumns);
assertEquals("4 key L1 rows", 1, params.mNumRows); assertEquals("4 key L1 rows", 1, params.mNumRows);
assertEquals("4 key L1 left", 0, params.mLeftKeys); assertEquals("4 key L1 left", 0, params.mLeftKeys);
@ -401,7 +401,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ ___ [3] [1] [2] [4] // |___ ___ [3] [1] [2] [4]
public void testLayout4KeyL2() { public void testLayout4KeyL2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(4, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(4, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
assertEquals("4 key L2 columns", 4, params.mNumColumns); assertEquals("4 key L2 columns", 4, params.mNumColumns);
assertEquals("4 key L2 rows", 1, params.mNumRows); assertEquals("4 key L2 rows", 1, params.mNumRows);
assertEquals("4 key L2 left", 1, params.mLeftKeys); assertEquals("4 key L2 left", 1, params.mLeftKeys);
@ -417,7 +417,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [4] [3] [2] [1]| // [4] [3] [2] [1]|
public void testLayout4KeyR0() { public void testLayout4KeyR0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(4, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(4, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
assertEquals("4 key R0 columns", 4, params.mNumColumns); assertEquals("4 key R0 columns", 4, params.mNumColumns);
assertEquals("4 key R0 rows", 1, params.mNumRows); assertEquals("4 key R0 rows", 1, params.mNumRows);
assertEquals("4 key R0 left", 3, params.mLeftKeys); assertEquals("4 key R0 left", 3, params.mLeftKeys);
@ -433,7 +433,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [4] [3] [2] [1] ___| // [4] [3] [2] [1] ___|
public void testLayout4KeyR1() { public void testLayout4KeyR1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(4, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(4, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
assertEquals("4 key R1 columns", 4, params.mNumColumns); assertEquals("4 key R1 columns", 4, params.mNumColumns);
assertEquals("4 key R1 rows", 1, params.mNumRows); assertEquals("4 key R1 rows", 1, params.mNumRows);
assertEquals("4 key R1 left", 3, params.mLeftKeys); assertEquals("4 key R1 left", 3, params.mLeftKeys);
@ -449,7 +449,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [4] [3] [1] [2] ___ ___| // [4] [3] [1] [2] ___ ___|
public void testLayout4KeyR2() { public void testLayout4KeyR2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(4, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(4, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
assertEquals("4 key R2 columns", 4, params.mNumColumns); assertEquals("4 key R2 columns", 4, params.mNumColumns);
assertEquals("4 key R2 rows", 1, params.mNumRows); assertEquals("4 key R2 rows", 1, params.mNumRows);
assertEquals("4 key R2 left", 2, params.mLeftKeys); assertEquals("4 key R2 left", 2, params.mLeftKeys);
@ -465,7 +465,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [5] [3] [1] [2] [4] // [5] [3] [1] [2] [4]
public void testLayout5KeyM0() { public void testLayout5KeyM0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(5, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(5, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_M0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
assertEquals("5 key columns", 5, params.mNumColumns); assertEquals("5 key columns", 5, params.mNumColumns);
assertEquals("5 key rows", 1, params.mNumRows); assertEquals("5 key rows", 1, params.mNumRows);
assertEquals("5 key left", 2, params.mLeftKeys); assertEquals("5 key left", 2, params.mLeftKeys);
@ -482,7 +482,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |[1] [2] [3] [4] [5] // |[1] [2] [3] [4] [5]
public void testLayout5KeyL0() { public void testLayout5KeyL0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(5, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(5, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
assertEquals("5 key L0 columns", 5, params.mNumColumns); assertEquals("5 key L0 columns", 5, params.mNumColumns);
assertEquals("5 key L0 rows", 1, params.mNumRows); assertEquals("5 key L0 rows", 1, params.mNumRows);
assertEquals("5 key L0 left", 0, params.mLeftKeys); assertEquals("5 key L0 left", 0, params.mLeftKeys);
@ -499,7 +499,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ [1] [2] [3] [4] [5] // |___ [1] [2] [3] [4] [5]
public void testLayout5KeyL1() { public void testLayout5KeyL1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(5, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(5, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
assertEquals("5 key L1 columns", 5, params.mNumColumns); assertEquals("5 key L1 columns", 5, params.mNumColumns);
assertEquals("5 key L1 rows", 1, params.mNumRows); assertEquals("5 key L1 rows", 1, params.mNumRows);
assertEquals("5 key L1 left", 0, params.mLeftKeys); assertEquals("5 key L1 left", 0, params.mLeftKeys);
@ -516,7 +516,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ ___ [3] [1] [2] [4] [5] // |___ ___ [3] [1] [2] [4] [5]
public void testLayout5KeyL2() { public void testLayout5KeyL2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(5, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(5, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
assertEquals("5 key L2 columns", 5, params.mNumColumns); assertEquals("5 key L2 columns", 5, params.mNumColumns);
assertEquals("5 key L2 rows", 1, params.mNumRows); assertEquals("5 key L2 rows", 1, params.mNumRows);
assertEquals("5 key L2 left", 1, params.mLeftKeys); assertEquals("5 key L2 left", 1, params.mLeftKeys);
@ -533,7 +533,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [5] [4] [3] [2] [1]| // [5] [4] [3] [2] [1]|
public void testLayout5KeyR0() { public void testLayout5KeyR0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(5, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(5, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
assertEquals("5 key R0 columns", 5, params.mNumColumns); assertEquals("5 key R0 columns", 5, params.mNumColumns);
assertEquals("5 key R0 rows", 1, params.mNumRows); assertEquals("5 key R0 rows", 1, params.mNumRows);
assertEquals("5 key R0 left", 4, params.mLeftKeys); assertEquals("5 key R0 left", 4, params.mLeftKeys);
@ -550,7 +550,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [5] [4] [3] [2] [1] ___| // [5] [4] [3] [2] [1] ___|
public void testLayout5KeyR1() { public void testLayout5KeyR1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(5, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(5, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
assertEquals("5 key R1 columns", 5, params.mNumColumns); assertEquals("5 key R1 columns", 5, params.mNumColumns);
assertEquals("5 key R1 rows", 1, params.mNumRows); assertEquals("5 key R1 rows", 1, params.mNumRows);
assertEquals("5 key R1 left", 4, params.mLeftKeys); assertEquals("5 key R1 left", 4, params.mLeftKeys);
@ -567,7 +567,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [5] [4] [3] [1] [2] ___ ___| // [5] [4] [3] [1] [2] ___ ___|
public void testLayout5KeyR2() { public void testLayout5KeyR2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(5, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(5, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
assertEquals("5 key R2 columns", 5, params.mNumColumns); assertEquals("5 key R2 columns", 5, params.mNumColumns);
assertEquals("5 key R2 rows", 1, params.mNumRows); assertEquals("5 key R2 rows", 1, params.mNumRows);
assertEquals("5 key R2 left", 3, params.mLeftKeys); assertEquals("5 key R2 left", 3, params.mLeftKeys);
@ -585,7 +585,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [3] [1] [2] // [3] [1] [2]
public void testLayout6KeyM0() { public void testLayout6KeyM0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(6, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(6, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_M0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
assertEquals("6 key columns", 3, params.mNumColumns); assertEquals("6 key columns", 3, params.mNumColumns);
assertEquals("6 key rows", 2, params.mNumRows); assertEquals("6 key rows", 2, params.mNumRows);
assertEquals("6 key left", 1, params.mLeftKeys); assertEquals("6 key left", 1, params.mLeftKeys);
@ -604,7 +604,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |[1] [2] [3] // |[1] [2] [3]
public void testLayout6KeyL0() { public void testLayout6KeyL0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(6, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(6, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
assertEquals("6 key L0 columns", 3, params.mNumColumns); assertEquals("6 key L0 columns", 3, params.mNumColumns);
assertEquals("6 key L0 rows", 2, params.mNumRows); assertEquals("6 key L0 rows", 2, params.mNumRows);
assertEquals("6 key L0 left", 0, params.mLeftKeys); assertEquals("6 key L0 left", 0, params.mLeftKeys);
@ -623,7 +623,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ [1] [2] [3] // |___ [1] [2] [3]
public void testLayout6KeyL1() { public void testLayout6KeyL1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(6, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(6, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
assertEquals("6 key L1 columns", 3, params.mNumColumns); assertEquals("6 key L1 columns", 3, params.mNumColumns);
assertEquals("6 key L1 rows", 2, params.mNumRows); assertEquals("6 key L1 rows", 2, params.mNumRows);
assertEquals("6 key L1 left", 0, params.mLeftKeys); assertEquals("6 key L1 left", 0, params.mLeftKeys);
@ -642,7 +642,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ ___ [3] [1] [2] // |___ ___ [3] [1] [2]
public void testLayout6KeyL2() { public void testLayout6KeyL2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(6, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(6, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
assertEquals("6 key L2 columns", 3, params.mNumColumns); assertEquals("6 key L2 columns", 3, params.mNumColumns);
assertEquals("6 key L2 rows", 2, params.mNumRows); assertEquals("6 key L2 rows", 2, params.mNumRows);
assertEquals("6 key L2 left", 1, params.mLeftKeys); assertEquals("6 key L2 left", 1, params.mLeftKeys);
@ -661,7 +661,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [3] [2] [1]| // [3] [2] [1]|
public void testLayout6KeyR0() { public void testLayout6KeyR0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(6, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(6, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
assertEquals("6 key R0 columns", 3, params.mNumColumns); assertEquals("6 key R0 columns", 3, params.mNumColumns);
assertEquals("6 key R0 rows", 2, params.mNumRows); assertEquals("6 key R0 rows", 2, params.mNumRows);
assertEquals("6 key R0 left", 2, params.mLeftKeys); assertEquals("6 key R0 left", 2, params.mLeftKeys);
@ -680,7 +680,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [3] [2] [1] ___| // [3] [2] [1] ___|
public void testLayout6KeyR1() { public void testLayout6KeyR1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(6, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(6, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
assertEquals("6 key R1 columns", 3, params.mNumColumns); assertEquals("6 key R1 columns", 3, params.mNumColumns);
assertEquals("6 key R1 rows", 2, params.mNumRows); assertEquals("6 key R1 rows", 2, params.mNumRows);
assertEquals("6 key R1 left", 2, params.mLeftKeys); assertEquals("6 key R1 left", 2, params.mLeftKeys);
@ -699,7 +699,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [3] [1] [2] ___ ___| // [3] [1] [2] ___ ___|
public void testLayout6KeyR2() { public void testLayout6KeyR2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(6, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(6, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
assertEquals("6 key R2 columns", 3, params.mNumColumns); assertEquals("6 key R2 columns", 3, params.mNumColumns);
assertEquals("6 key R2 rows", 2, params.mNumRows); assertEquals("6 key R2 rows", 2, params.mNumRows);
assertEquals("6 key R2 left", 1, params.mLeftKeys); assertEquals("6 key R2 left", 1, params.mLeftKeys);
@ -718,7 +718,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [3] [1] [2] [4] // [3] [1] [2] [4]
public void testLayout7KeyM0() { public void testLayout7KeyM0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_M0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
assertEquals("7 key columns", 4, params.mNumColumns); assertEquals("7 key columns", 4, params.mNumColumns);
assertEquals("7 key rows", 2, params.mNumRows); assertEquals("7 key rows", 2, params.mNumRows);
assertEquals("7 key left", 1, params.mLeftKeys); assertEquals("7 key left", 1, params.mLeftKeys);
@ -738,7 +738,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |[1] [2] [3] [4] // |[1] [2] [3] [4]
public void testLayout7KeyL0() { public void testLayout7KeyL0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
assertEquals("7 key L0 columns", 4, params.mNumColumns); assertEquals("7 key L0 columns", 4, params.mNumColumns);
assertEquals("7 key L0 rows", 2, params.mNumRows); assertEquals("7 key L0 rows", 2, params.mNumRows);
assertEquals("7 key L0 left", 0, params.mLeftKeys); assertEquals("7 key L0 left", 0, params.mLeftKeys);
@ -758,7 +758,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ [1] [2] [3] [4] // |___ [1] [2] [3] [4]
public void testLayout7KeyL1() { public void testLayout7KeyL1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
assertEquals("7 key L1 columns", 4, params.mNumColumns); assertEquals("7 key L1 columns", 4, params.mNumColumns);
assertEquals("7 key L1 rows", 2, params.mNumRows); assertEquals("7 key L1 rows", 2, params.mNumRows);
assertEquals("7 key L1 left", 0, params.mLeftKeys); assertEquals("7 key L1 left", 0, params.mLeftKeys);
@ -778,7 +778,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ ___ [3] [1] [2] [4] // |___ ___ [3] [1] [2] [4]
public void testLayout7KeyL2() { public void testLayout7KeyL2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
assertEquals("7 key L2 columns", 4, params.mNumColumns); assertEquals("7 key L2 columns", 4, params.mNumColumns);
assertEquals("7 key L2 rows", 2, params.mNumRows); assertEquals("7 key L2 rows", 2, params.mNumRows);
assertEquals("7 key L2 left", 1, params.mLeftKeys); assertEquals("7 key L2 left", 1, params.mLeftKeys);
@ -798,7 +798,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [4] [3] [2] [1]| // [4] [3] [2] [1]|
public void testLayout7KeyR0() { public void testLayout7KeyR0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
assertEquals("7 key R0 columns", 4, params.mNumColumns); assertEquals("7 key R0 columns", 4, params.mNumColumns);
assertEquals("7 key R0 rows", 2, params.mNumRows); assertEquals("7 key R0 rows", 2, params.mNumRows);
assertEquals("7 key R0 left", 3, params.mLeftKeys); assertEquals("7 key R0 left", 3, params.mLeftKeys);
@ -818,7 +818,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [4] [3] [2] [1] ___| // [4] [3] [2] [1] ___|
public void testLayout7KeyR1() { public void testLayout7KeyR1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
assertEquals("7 key R1 columns", 4, params.mNumColumns); assertEquals("7 key R1 columns", 4, params.mNumColumns);
assertEquals("7 key R1 rows", 2, params.mNumRows); assertEquals("7 key R1 rows", 2, params.mNumRows);
assertEquals("7 key R1 left", 3, params.mLeftKeys); assertEquals("7 key R1 left", 3, params.mLeftKeys);
@ -838,7 +838,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [4] [3] [1] [2] ___ ___| // [4] [3] [1] [2] ___ ___|
public void testLayout7KeyR2() { public void testLayout7KeyR2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
assertEquals("7 key R2 columns", 4, params.mNumColumns); assertEquals("7 key R2 columns", 4, params.mNumColumns);
assertEquals("7 key R2 rows", 2, params.mNumRows); assertEquals("7 key R2 rows", 2, params.mNumRows);
assertEquals("7 key R2 left", 2, params.mLeftKeys); assertEquals("7 key R2 left", 2, params.mLeftKeys);
@ -857,7 +857,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [7] [6] [5] [3] [1] [2] [4] ___| // [7] [6] [5] [3] [1] [2] [4] ___|
public void testLayout7KeyR3Max7() { public void testLayout7KeyR3Max7() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, 7, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(7, 7, WIDTH,
HEIGHT, XPOS_R3, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R3, KEYBOARD_WIDTH);
assertEquals("7 key R2 columns", 7, params.mNumColumns); assertEquals("7 key R2 columns", 7, params.mNumColumns);
assertEquals("7 key R2 rows", 1, params.mNumRows); assertEquals("7 key R2 rows", 1, params.mNumRows);
assertEquals("7 key R2 left", 4, params.mLeftKeys); assertEquals("7 key R2 left", 4, params.mLeftKeys);
@ -877,7 +877,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [3] [1] [2] [4] // [3] [1] [2] [4]
public void testLayout8KeyM0() { public void testLayout8KeyM0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(8, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(8, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_M0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
assertEquals("8 key M0 columns", 4, params.mNumColumns); assertEquals("8 key M0 columns", 4, params.mNumColumns);
assertEquals("8 key M0 rows", 2, params.mNumRows); assertEquals("8 key M0 rows", 2, params.mNumRows);
assertEquals("8 key M0 left", 1, params.mLeftKeys); assertEquals("8 key M0 left", 1, params.mLeftKeys);
@ -898,7 +898,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |[1] [2] [3] [4] // |[1] [2] [3] [4]
public void testLayout8KeyL0() { public void testLayout8KeyL0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(8, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(8, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
assertEquals("8 key L0 columns", 4, params.mNumColumns); assertEquals("8 key L0 columns", 4, params.mNumColumns);
assertEquals("8 key L0 rows", 2, params.mNumRows); assertEquals("8 key L0 rows", 2, params.mNumRows);
assertEquals("8 key L0 left", 0, params.mLeftKeys); assertEquals("8 key L0 left", 0, params.mLeftKeys);
@ -919,7 +919,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ [1] [2] [3] [4] // |___ [1] [2] [3] [4]
public void testLayout8KeyL1() { public void testLayout8KeyL1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(8, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(8, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
assertEquals("8 key L1 columns", 4, params.mNumColumns); assertEquals("8 key L1 columns", 4, params.mNumColumns);
assertEquals("8 key L1 rows", 2, params.mNumRows); assertEquals("8 key L1 rows", 2, params.mNumRows);
assertEquals("8 key L1 left", 0, params.mLeftKeys); assertEquals("8 key L1 left", 0, params.mLeftKeys);
@ -940,7 +940,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ ___ [3] [1] [2] [4] // |___ ___ [3] [1] [2] [4]
public void testLayout8KeyL2() { public void testLayout8KeyL2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(8, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(8, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
assertEquals("8 key L2 columns", 4, params.mNumColumns); assertEquals("8 key L2 columns", 4, params.mNumColumns);
assertEquals("8 key L2 rows", 2, params.mNumRows); assertEquals("8 key L2 rows", 2, params.mNumRows);
assertEquals("8 key L2 left", 1, params.mLeftKeys); assertEquals("8 key L2 left", 1, params.mLeftKeys);
@ -961,7 +961,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [4] [3] [2] [1]| // [4] [3] [2] [1]|
public void testLayout8KeyR0() { public void testLayout8KeyR0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(8, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(8, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
assertEquals("8 key R0 columns", 4, params.mNumColumns); assertEquals("8 key R0 columns", 4, params.mNumColumns);
assertEquals("8 key R0 rows", 2, params.mNumRows); assertEquals("8 key R0 rows", 2, params.mNumRows);
assertEquals("8 key R0 left", 3, params.mLeftKeys); assertEquals("8 key R0 left", 3, params.mLeftKeys);
@ -982,7 +982,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [4] [3] [2] [1] ___| // [4] [3] [2] [1] ___|
public void testLayout8KeyR1() { public void testLayout8KeyR1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(8, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(8, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
assertEquals("8 key R1 columns", 4, params.mNumColumns); assertEquals("8 key R1 columns", 4, params.mNumColumns);
assertEquals("8 key R1 rows", 2, params.mNumRows); assertEquals("8 key R1 rows", 2, params.mNumRows);
assertEquals("8 key R1 left", 3, params.mLeftKeys); assertEquals("8 key R1 left", 3, params.mLeftKeys);
@ -1003,7 +1003,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [4] [3] [1] [2] ___ ___| // [4] [3] [1] [2] ___ ___|
public void testLayout8KeyR2() { public void testLayout8KeyR2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(8, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(8, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
assertEquals("8 key R2 columns", 4, params.mNumColumns); assertEquals("8 key R2 columns", 4, params.mNumColumns);
assertEquals("8 key R2 rows", 2, params.mNumRows); assertEquals("8 key R2 rows", 2, params.mNumRows);
assertEquals("8 key R2 left", 2, params.mLeftKeys); assertEquals("8 key R2 left", 2, params.mLeftKeys);
@ -1024,7 +1024,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [5] [3] [1] [2] [4] // [5] [3] [1] [2] [4]
public void testLayout9KeyM0() { public void testLayout9KeyM0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(9, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(9, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_M0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
assertEquals("9 key M0 columns", 5, params.mNumColumns); assertEquals("9 key M0 columns", 5, params.mNumColumns);
assertEquals("9 key M0 rows", 2, params.mNumRows); assertEquals("9 key M0 rows", 2, params.mNumRows);
assertEquals("9 key M0 left", 2, params.mLeftKeys); assertEquals("9 key M0 left", 2, params.mLeftKeys);
@ -1046,7 +1046,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |[1] [2] [3] [4] [5] // |[1] [2] [3] [4] [5]
public void testLayout9KeyL0() { public void testLayout9KeyL0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(9, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(9, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
assertEquals("9 key L0 columns", 5, params.mNumColumns); assertEquals("9 key L0 columns", 5, params.mNumColumns);
assertEquals("9 key L0 rows", 2, params.mNumRows); assertEquals("9 key L0 rows", 2, params.mNumRows);
assertEquals("9 key L0 left", 0, params.mLeftKeys); assertEquals("9 key L0 left", 0, params.mLeftKeys);
@ -1068,7 +1068,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ [1] [2] [3] [4] [5] // |___ [1] [2] [3] [4] [5]
public void testLayout9KeyL1() { public void testLayout9KeyL1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(9, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(9, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
assertEquals("9 key L1 columns", 5, params.mNumColumns); assertEquals("9 key L1 columns", 5, params.mNumColumns);
assertEquals("9 key L1 rows", 2, params.mNumRows); assertEquals("9 key L1 rows", 2, params.mNumRows);
assertEquals("9 key L1 left", 0, params.mLeftKeys); assertEquals("9 key L1 left", 0, params.mLeftKeys);
@ -1090,7 +1090,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ ___ [3] [1] [2] [4] [5] // |___ ___ [3] [1] [2] [4] [5]
public void testLayout9KeyL2() { public void testLayout9KeyL2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(9, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(9, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
assertEquals("9 key L2 columns", 5, params.mNumColumns); assertEquals("9 key L2 columns", 5, params.mNumColumns);
assertEquals("9 key L2 rows", 2, params.mNumRows); assertEquals("9 key L2 rows", 2, params.mNumRows);
assertEquals("9 key L2 left", 1, params.mLeftKeys); assertEquals("9 key L2 left", 1, params.mLeftKeys);
@ -1112,7 +1112,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [5] [4] [3] [2] [1]| // [5] [4] [3] [2] [1]|
public void testLayout9KeyR0() { public void testLayout9KeyR0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(9, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(9, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
assertEquals("9 key R0 columns", 5, params.mNumColumns); assertEquals("9 key R0 columns", 5, params.mNumColumns);
assertEquals("9 key R0 rows", 2, params.mNumRows); assertEquals("9 key R0 rows", 2, params.mNumRows);
assertEquals("9 key R0 left", 4, params.mLeftKeys); assertEquals("9 key R0 left", 4, params.mLeftKeys);
@ -1134,7 +1134,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [5] [4] [3] [2] [1] ___| // [5] [4] [3] [2] [1] ___|
public void testLayout9KeyR1() { public void testLayout9KeyR1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(9, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(9, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
assertEquals("9 key R1 columns", 5, params.mNumColumns); assertEquals("9 key R1 columns", 5, params.mNumColumns);
assertEquals("9 key R1 rows", 2, params.mNumRows); assertEquals("9 key R1 rows", 2, params.mNumRows);
assertEquals("9 key R1 left", 4, params.mLeftKeys); assertEquals("9 key R1 left", 4, params.mLeftKeys);
@ -1156,7 +1156,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [5] [4] [3] [1] [2] ___ ___| // [5] [4] [3] [1] [2] ___ ___|
public void testLayout9KeyR2() { public void testLayout9KeyR2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(9, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(9, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
assertEquals("9 key R2 columns", 5, params.mNumColumns); assertEquals("9 key R2 columns", 5, params.mNumColumns);
assertEquals("9 key R2 rows", 2, params.mNumRows); assertEquals("9 key R2 rows", 2, params.mNumRows);
assertEquals("9 key R2 left", 3, params.mLeftKeys); assertEquals("9 key R2 left", 3, params.mLeftKeys);
@ -1178,7 +1178,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [5] [3] [1] [2] [4] // [5] [3] [1] [2] [4]
public void testLayout10KeyM0() { public void testLayout10KeyM0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_M0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
assertEquals("10 key M0 columns", 5, params.mNumColumns); assertEquals("10 key M0 columns", 5, params.mNumColumns);
assertEquals("10 key M0 rows", 2, params.mNumRows); assertEquals("10 key M0 rows", 2, params.mNumRows);
assertEquals("10 key M0 left", 2, params.mLeftKeys); assertEquals("10 key M0 left", 2, params.mLeftKeys);
@ -1201,7 +1201,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |[1] [2] [3] [4] [5] // |[1] [2] [3] [4] [5]
public void testLayout10KeyL0() { public void testLayout10KeyL0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
assertEquals("10 key L0 columns", 5, params.mNumColumns); assertEquals("10 key L0 columns", 5, params.mNumColumns);
assertEquals("10 key L0 rows", 2, params.mNumRows); assertEquals("10 key L0 rows", 2, params.mNumRows);
assertEquals("10 key L0 left", 0, params.mLeftKeys); assertEquals("10 key L0 left", 0, params.mLeftKeys);
@ -1224,7 +1224,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ [1] [2] [3] [4] [5] // |___ [1] [2] [3] [4] [5]
public void testLayout10KeyL1() { public void testLayout10KeyL1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
assertEquals("10 key L1 columns", 5, params.mNumColumns); assertEquals("10 key L1 columns", 5, params.mNumColumns);
assertEquals("10 key L1 rows", 2, params.mNumRows); assertEquals("10 key L1 rows", 2, params.mNumRows);
assertEquals("10 key L1 left", 0, params.mLeftKeys); assertEquals("10 key L1 left", 0, params.mLeftKeys);
@ -1247,7 +1247,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// |___ ___ [3] [1] [2] [4] [5] // |___ ___ [3] [1] [2] [4] [5]
public void testLayout10KeyL2() { public void testLayout10KeyL2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_L2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
assertEquals("10 key L2 columns", 5, params.mNumColumns); assertEquals("10 key L2 columns", 5, params.mNumColumns);
assertEquals("10 key L2 rows", 2, params.mNumRows); assertEquals("10 key L2 rows", 2, params.mNumRows);
assertEquals("10 key L2 left", 1, params.mLeftKeys); assertEquals("10 key L2 left", 1, params.mLeftKeys);
@ -1270,7 +1270,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [5] [4] [3] [2] [1]| // [5] [4] [3] [2] [1]|
public void testLayout10KeyR0() { public void testLayout10KeyR0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
assertEquals("10 key R0 columns", 5, params.mNumColumns); assertEquals("10 key R0 columns", 5, params.mNumColumns);
assertEquals("10 key R0 rows", 2, params.mNumRows); assertEquals("10 key R0 rows", 2, params.mNumRows);
assertEquals("10 key R0 left", 4, params.mLeftKeys); assertEquals("10 key R0 left", 4, params.mLeftKeys);
@ -1293,7 +1293,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [5] [4] [3] [2] [1] ___| // [5] [4] [3] [2] [1] ___|
public void testLayout10KeyR1() { public void testLayout10KeyR1() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R1, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
assertEquals("10 key R1 columns", 5, params.mNumColumns); assertEquals("10 key R1 columns", 5, params.mNumColumns);
assertEquals("10 key R1 rows", 2, params.mNumRows); assertEquals("10 key R1 rows", 2, params.mNumRows);
assertEquals("10 key R1 left", 4, params.mLeftKeys); assertEquals("10 key R1 left", 4, params.mLeftKeys);
@ -1316,7 +1316,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [5] [4] [3] [1] [2] ___ ___| // [5] [4] [3] [1] [2] ___ ___|
public void testLayout10KeyR2() { public void testLayout10KeyR2() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(10, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_R2, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
assertEquals("10 key R2 columns", 5, params.mNumColumns); assertEquals("10 key R2 columns", 5, params.mNumColumns);
assertEquals("10 key R2 rows", 2, params.mNumRows); assertEquals("10 key R2 rows", 2, params.mNumRows);
assertEquals("10 key R2 left", 3, params.mLeftKeys); assertEquals("10 key R2 left", 3, params.mLeftKeys);
@ -1340,7 +1340,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [3] [1] [2] [4] // [3] [1] [2] [4]
public void testLayout11KeyM0() { public void testLayout11KeyM0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(11, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(11, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_M0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
assertEquals("11 key M0 columns", 4, params.mNumColumns); assertEquals("11 key M0 columns", 4, params.mNumColumns);
assertEquals("11 key M0 rows", 3, params.mNumRows); assertEquals("11 key M0 rows", 3, params.mNumRows);
assertEquals("11 key M0 left", 1, params.mLeftKeys); assertEquals("11 key M0 left", 1, params.mLeftKeys);
@ -1365,7 +1365,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [3] [1] [2] [4] // [3] [1] [2] [4]
public void testLayout12KeyM0() { public void testLayout12KeyM0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(12, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(12, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_M0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
assertEquals("12 key M0 columns", 4, params.mNumColumns); assertEquals("12 key M0 columns", 4, params.mNumColumns);
assertEquals("12 key M0 rows", 3, params.mNumRows); assertEquals("12 key M0 rows", 3, params.mNumRows);
assertEquals("12 key M0 left", 1, params.mLeftKeys); assertEquals("12 key M0 left", 1, params.mLeftKeys);
@ -1392,7 +1392,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
// [5] [3] [1] [2] [4] // [5] [3] [1] [2] [4]
public void testLayout13KeyM0() { public void testLayout13KeyM0() {
MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(13, MAX_COLUMNS, WIDTH, MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams(13, MAX_COLUMNS, WIDTH,
HEIGHT, XPOS_M0, KEYBOARD_WIDTH, 0); HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
assertEquals("13 key M0 columns", 5, params.mNumColumns); assertEquals("13 key M0 columns", 5, params.mNumColumns);
assertEquals("13 key M0 rows", 3, params.mNumRows); assertEquals("13 key M0 rows", 3, params.mNumRows);
assertEquals("13 key M0 left", 2, params.mLeftKeys); assertEquals("13 key M0 left", 2, params.mLeftKeys);