diff options
| author | Tadashi G. Takaoka <takaoka@google.com> | 2011-09-02 17:38:59 +0900 |
|---|---|---|
| committer | Tadashi G. Takaoka <takaoka@google.com> | 2011-09-02 17:51:27 +0900 |
| commit | d4d9b33c394e767db8e852187745ce3f7a01c314 (patch) | |
| tree | 1e127457eef4e34aaeb85df18549380b21cfa6db /java/src/com/android/inputmethod/keyboard/internal/Row.java | |
| parent | 08e64e187490881bdd85f4a5d5301ee1e1c21a10 (diff) | |
Move Row class into KeyboardBuilder
This is a followup of I5929e656.
Bug: 5245837
Change-Id: I06bc2774f77a2c5ddf0b6fe1b3ee70e9b3a7dd23
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/internal/Row.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/internal/Row.java | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/internal/Row.java b/java/src/com/android/inputmethod/keyboard/internal/Row.java deleted file mode 100644 index d81881d77..000000000 --- a/java/src/com/android/inputmethod/keyboard/internal/Row.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -package com.android.inputmethod.keyboard.internal; - -import android.content.res.Resources; -import android.content.res.TypedArray; -import android.content.res.XmlResourceParser; -import android.util.Xml; - -import com.android.inputmethod.keyboard.Keyboard; -import com.android.inputmethod.latin.R; - -/** - * Container for keys in the keyboard. All keys in a row are at the same Y-coordinate. - * Some of the key size defaults can be overridden per row from what the {@link Keyboard} - * defines. - */ -public class Row { - /** Default width of a key in this row. */ - public final float mDefaultKeyWidth; - /** Default height of a key in this row. */ - public final int mRowHeight; - - public final int mCurrentY; - // Will be updated by {@link Key}'s constructor. - public float mCurrentX; - - public Row(Resources res, KeyboardParams params, XmlResourceParser parser, int y) { - final int keyboardWidth = params.mWidth; - final int keyboardHeight = params.mHeight; - TypedArray a = res.obtainAttributes(Xml.asAttributeSet(parser), - R.styleable.Keyboard); - mDefaultKeyWidth = KeyboardBuilder.getDimensionOrFraction(a, - R.styleable.Keyboard_keyWidth, keyboardWidth, params.mDefaultKeyWidth); - mRowHeight = (int)KeyboardBuilder.getDimensionOrFraction(a, - R.styleable.Keyboard_rowHeight, keyboardHeight, params.mDefaultRowHeight); - a.recycle(); - - mCurrentY = y; - mCurrentX = 0.0f; - } -} |
