summaryrefslogtreecommitdiff
path: root/java/src/com/android/inputmethod/keyboard/KeyboardTheme.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-04-14 17:09:12 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-04-14 17:10:11 +0900
commitd6aa94e6b5fd7abc25a8d21857211ffd0852b33a (patch)
tree653dd63dac57d2165e4162d83d05939b1cd4b7b1 /java/src/com/android/inputmethod/keyboard/KeyboardTheme.java
parentda498229f41b828209765774a6f7f8f1ad5f30c3 (diff)
Refactor KeyboardTheme as top-level class
This CL should be checked in together with I63e33388f9. Bug: 14042743 Change-Id: I13f0a45bac6f19e006bf1280a36173e52d6d7160
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/KeyboardTheme.java')
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardTheme.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardTheme.java b/java/src/com/android/inputmethod/keyboard/KeyboardTheme.java
new file mode 100644
index 000000000..d15942728
--- /dev/null
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardTheme.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2014 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;
+
+import com.android.inputmethod.latin.R;
+
+public final class KeyboardTheme {
+ public static final int THEME_INDEX_ICS = 0;
+ public static final int THEME_INDEX_GB = 1;
+ public static final int THEME_INDEX_KLP = 2;
+ public static final int DEFAULT_THEME_INDEX = THEME_INDEX_KLP;
+
+ public static final KeyboardTheme[] KEYBOARD_THEMES = {
+ new KeyboardTheme(THEME_INDEX_ICS, R.style.KeyboardTheme_ICS),
+ new KeyboardTheme(THEME_INDEX_GB, R.style.KeyboardTheme_GB),
+ new KeyboardTheme(THEME_INDEX_KLP, R.style.KeyboardTheme_KLP),
+ };
+
+ public final int mThemeId;
+ public final int mStyleId;
+
+ // Note: The themeId should be aligned with "themeId" attribute of Keyboard style
+ // in values/style.xml.
+ public KeyboardTheme(final int themeId, final int styleId) {
+ mThemeId = themeId;
+ mStyleId = styleId;
+ }
+}