OSDN Git Service

またimport/exportの出力先を変更(/sdcard/OpenWnn -> /sdcard/nicoWnn)
authorHiromitsu Shioya <hiroshica@gmail.com>
Thu, 3 Dec 2009 19:03:18 +0000 (04:03 +0900)
committerHiromitsu Shioya <hiroshica@gmail.com>
Thu, 3 Dec 2009 19:03:18 +0000 (04:03 +0900)
予測変換系の表示を1行表示に変更

src/com/hiroshica/android/input/nicownn2/JAJP/DefaultSoftKeyboardJAJP.java
src/com/hiroshica/android/input/nicownn2/TextCandidatesViewManager.java
src/com/hiroshica/android/input/nicownn2/UserDicImportExport.java

index bafa98a..475e67a 100644 (file)
@@ -1445,7 +1445,7 @@ public class DefaultSoftKeyboardJAJP extends DefaultSoftKeyboard {
                }
 
                if (mCurrentKeyMode == KEYMODE_JA_FULL_NIKO) {
-                       if (true == onKeyNiko(primaryCode, keyCodes)) {
+                       if (true == onKeyNico(primaryCode, keyCodes)) {
                                /* update shift key's state */
                                if (!mCapsLock && (primaryCode != DefaultSoftKeyboard.KEYCODE_QWERTY_SHIFT)) {
                                        setShiftByEditorInfo();
@@ -1667,7 +1667,7 @@ public class DefaultSoftKeyboardJAJP extends DefaultSoftKeyboard {
        /*****************************************
         * onkey nikotouch
         */
-       private boolean onKeyNiko(int primaryCode, int[] keyCodes) {
+       private boolean onKeyNico(int primaryCode, int[] keyCodes) {
                Keyboard newKeyboard = null;
                boolean retcode = false;
 
@@ -1792,6 +1792,9 @@ public class DefaultSoftKeyboardJAJP extends DefaultSoftKeyboard {
                        break;
 
                case KEYCODE_JP12_ASTER:
+                       if (mNikoFirst == true) {
+                               resetNikoKeyboard();
+                       }
                        if (mNikoFirst == false && !mNoInput) {
                                /* Processing to toggle Dakuten, Handakuten, and capital */
                                HashMap replaceTable = getReplaceTable();
@@ -1842,7 +1845,7 @@ public class DefaultSoftKeyboardJAJP extends DefaultSoftKeyboard {
                        break;
                }
                return retcode;
-       } // onKeyNiko
+       } // onKeyNico
        /*
         * reset nikotouch keyboard
         */
index 1f39161..11cbae4 100644 (file)
@@ -60,7 +60,7 @@ public class TextCandidatesViewManager implements CandidatesViewManager, Gesture
     /** Height of a line */
     public static final int LINE_HEIGHT = 34;
     /** Number of lines to display (Portrait) */
-    public static final int LINE_NUM_PORTRAIT       = 2;
+    public static final int LINE_NUM_PORTRAIT       = 1;
     /** Number of lines to display (Landscape) */
     public static final int LINE_NUM_LANDSCAPE      = 1;
 
@@ -425,7 +425,8 @@ public class TextCandidatesViewManager implements CandidatesViewManager, Gesture
         mViewCandidateList1st.setOnClickListener(mCandidateOnClick);
 
         int line = getMaxLine();
-        int width = mViewWidth;
+        int width = mViewWidth / getCandidateMinimumWidth();
+        //int width = FULL_VIEW_DIV + 1;
         for (int i = 0; i < line; i++) {
             LinearLayout lineView = new LinearLayout(mViewBodyScroll.getContext());
             lineView.setOrientation(LinearLayout.HORIZONTAL);
@@ -433,7 +434,7 @@ public class TextCandidatesViewManager implements CandidatesViewManager, Gesture
                 new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
                                               ViewGroup.LayoutParams.WRAP_CONTENT);
             lineView.setLayoutParams(layoutParams);
-            for (int j = 0; j < (width / getCandidateMinimumWidth()); j++) {
+            for (int j = 0; j < width; j++) {
                 TextView tv = createCandidateView();
                 lineView.addView(tv);
             }
index 672c317..a9b3364 100644 (file)
@@ -74,7 +74,7 @@ public class UserDicImportExport extends AsyncTask<String, String, String[]>{
                File fileBase = null;
                if (fileSdCard != null) {
                        //fileBase = new File(fileSdCard, mActivity.getPackageName());
-                       fileBase = new File(fileSdCard, "OpenWnn");
+                       fileBase = new File(fileSdCard, "nicoWnn");
                        if (!fileBase.exists()) {
                                return false;
                        }
@@ -152,7 +152,7 @@ public class UserDicImportExport extends AsyncTask<String, String, String[]>{
                File fileBase = null;
                if (fileSdCard != null) {
                        //fileBase = new File(fileSdCard, mActivity.getPackageName());
-                       fileBase = new File(fileSdCard, "OpenWnn");
+                       fileBase = new File(fileSdCard, "nicoWnn");
                        if (!fileBase.exists()) {
                                if (!fileBase.mkdir()) {
                                        resultString[0] = "false";