From 79d74e6d8d3a6564bf7241ec2b93772610d7a6cc Mon Sep 17 00:00:00 2001 From: Pikamander2 Date: Fri, 16 Jan 2015 03:50:15 -0500 Subject: [PATCH] Improved dakuten/handakuten separation from normal characters --- AndroidManifest.xml | 4 +- Screenshot-6.png | Bin 0 -> 24797 bytes res/values/strings.xml | 2 +- .../japanesequiz/MainActivity.java | 2 +- .../pikamander2/japanesequiz/Question.java | 170 ++++++++++-------- .../japanesequiz/QuestionAdapter.java | 15 +- .../japanesequiz/QuizActivity.java | 16 +- 7 files changed, 121 insertions(+), 88 deletions(-) create mode 100644 Screenshot-6.png diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 5d116aa..5cdf350 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="6" + android:versionName="1.0.5" > (H%g#jcCS&%T~3~x*J`QlF5ysRF{K9rtmy^OO9i%}67r2&^5J@bois*ZnZ*K$FcO75rIb&fFbzuHu zcRS>pVPU;-l9!Rxd~dX!CT`1Y?%Tca;lopXJITclOWIlAAKp%6)eT$K&ia;6`}gAW zs{m~>jt~=bWHBd!S*Gbw_X9IEhU5=FX6Kw%cfK905{C)i{rf}t(Ba|J`mc_Xi|s)N zwBltMCx0$|R@0K*)00n3BR~Hc6g}u)^H}9;JsaQ~y1z49f6(oB*-d#GfQ8F|6~J)! z{?2@JQ8?khuAkriihe#5q%VnuL-OdM1j^+$z62JIB`D>{&BE9kbVKiOyVW1*k^w8w1n<8;f`}vu%VHby# z#9M*i-{aCf?ib^4+#6|M;)u{GgSs+tcn!8bFKgv#YH~cA>I;+$cYl7;pQ^xNwCfU? zoSe)d-sE&v-*;Yi^~&#XwyCZt6Fo1$g?A^Q0{>^9q5~&aYkiZqv&YJK?^02OY_&rAdl_?^5|h7Yd_Dq8G3U&i}SMTCBJOGOp*u=PCqOs52q&@GIJa`=c4 znfKSE$2lT>ZV^vmZdM>fkWc^kXJ6$(!dltS1Z1n25y@}a%#(;CYe68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0fIFJ7-jbH2!$&E))1IVE!_aN`e77|Tf)XBGpGaKkvhz~|2PI1osZp#Z)m*pI{5!qXKCbm z^k3f~!FT*LF8Sa;3m>GqOuMf2&vnLr;s9O*_3>lf=lU%zD$@0Ify^u*%&hGB&ZDn; zD1&O^J5c-h{z;ZehQNArWiy=jCkJdY{hz8W#I)f3Rp4|DZ3_{zwk$lsf(k9vcIU0T zEAjv4`NJ!tLaJrJF_B|W7o^d)M?V06{p_aDF0Ty(tpp2*b90Nm6SRo=Ru6T(#oktS zIYf>Q)TV9q5P66H{%=BBo5KHO_@^`Df1l0&?xrxJ2Z?^5a7T?+-+4}2 zVxUV>^dDL)@SloL#KtGQF_lt9;3qrivH&**YD}}p(T@N@wZ;Q(j`TFP-3kJ)sIyJ? z8BIkuz5`p5+!g_%+Bv*d2R$mmtXqgN5swBtJ3z3-@BT~m=a(p-eS~;eBkjRekYBUW z%yKP3d^L2B9MEN{4BPf-T=3cnFjn(H+hpQjL&ptzM_mMT>=s#xnp%|tMr;XGac&N2 z>8sl8j0EZ~8}xbGGX6+RsvjtS+WTxiBRn5r2Naa{URn=U0e*75zbF13djbjw%zvA) zAVpoil>s#L8uhtJkVaz+O|(3A)op^ILQlRn0LNgwZ9KgKXK@T zFn9~mZR3~9=$?y%(A)lPpTN?AeK**^y0jqHX4{Z^C9scHzDvJN%>RjhtrP8k;$Q1x g`~Uy-|Kw9%Xt-0_P0#{=Nw7m(OYdxfhSlx=0a7BOPXGV_ literal 0 HcmV?d00001 diff --git a/res/values/strings.xml b/res/values/strings.xml index dc2de51..b70a9f7 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -19,7 +19,7 @@ Katakana Kanji Mixture - Version 1.0.4 + Version 1.0.5 Flip questions diff --git a/src/com/pikamander2/japanesequiz/MainActivity.java b/src/com/pikamander2/japanesequiz/MainActivity.java index 2dbacca..8ba3f3a 100644 --- a/src/com/pikamander2/japanesequiz/MainActivity.java +++ b/src/com/pikamander2/japanesequiz/MainActivity.java @@ -92,4 +92,4 @@ public boolean onOptionsItemSelected(MenuItem item) return super.onOptionsItemSelected(item); } -} +} \ No newline at end of file diff --git a/src/com/pikamander2/japanesequiz/Question.java b/src/com/pikamander2/japanesequiz/Question.java index ea0a13d..0782376 100644 --- a/src/com/pikamander2/japanesequiz/Question.java +++ b/src/com/pikamander2/japanesequiz/Question.java @@ -6,52 +6,57 @@ import java.util.Random; public class Question -{ +{ private Random random = new Random(); + private int currentAnswer; + private ArrayList listToUse; private int listId; - - private static String[][] tempHiraganaList = {{"あ", "a"},{"い", "i"},{"う", "u"},{"え", "e"},{"お", "o"}, - {"か", "ka"},{"き", "ki"},{"く", "ku"},{"け", "ke"},{"こ", "ko"}, - {"さ", "sa"},{"し", "shi"},{"す", "su"},{"せ", "se"},{"そ", "so"}, - {"た", "ta"},{"ち", "chi"},{"つ", "tsu"},{"て", "te"},{"と", "to"}, - {"な", "na"},{"に", "ni"},{"ぬ", "nu"},{"ね", "ne"},{"の", "no"}, - {"は", "ha"},{"ひ", "hi"},{"ふ", "fu"},{"へ", "he"},{"ほ", "ho"}, - {"ま", "ma"},{"み", "mi"},{"む", "mu"},{"め", "me"},{"も", "mo"}, - {"や", "ya"},{"ゆ", "yu"},{"よ", "yo"}, - {"ら", "ra"},{"り", "ri"},{"る", "ru"},{"れ", "re"},{"ろ", "ro"}, - {"わ", "wa"},{"を", "wo"}, - {"ん", "n"}, - {"が", "ga"},{"ぎ", "gi"},{"ぐ", "gu"},{"げ", "ge"},{"ご", "go"}, - {"ざ", "za"},{"じ", "ji"},{"ず", "zu"},{"ぜ", "ze"},{"ぞ", "zo"}, - {"だ", "da"},{"ぢ", "ji"},{"づ", "zu"},{"で", "de"},{"ど", "do"}, - {"ば", "ba"},{"び", "bi"},{"ぶ", "bu"},{"べ", "be"},{"ぼ", "bo"}, - {"ぱ", "pa"},{"ぴ", "pi"},{"ぷ", "pu"},{"ぺ", "pe"},{"ぽ", "po"} - }; - - private static ArrayList hiraganaList = new ArrayList(Arrays.asList(tempHiraganaList)); - - private static String[][] tempKatakanaList = {{"ア", "a"},{"イ", "i"},{"ウ", "u"},{"エ", "e"},{"オ", "o"}, - {"カ", "ka"},{"キ", "ki"},{"ク", "ku"},{"ケ", "ke"},{"コ", "ko"}, - {"サ", "sa"},{"シ", "shi"},{"ス", "su"},{"セ", "se"},{"ソ", "so"}, - {"タ", "ta"},{"チ", "chi"},{"ツ", "tsu"},{"テ", "te"},{"ト", "to"}, - {"ナ", "na"},{"ニ", "ni"},{"ヌ", "nu"},{"ネ", "ne"},{"ノ", "no"}, - {"ハ", "ha"},{"ヒ", "hi"},{"フ", "fu"},{"ヘ", "he"},{"ホ", "ho"}, - {"マ", "ma"},{"ミ", "mi"},{"ム", "mu"},{"メ", "me"},{"モ", "mo"}, - {"ヤ", "ya"},{"ユ", "yu"},{"ヨ", "yo"}, - {"ラ", "ra"},{"リ", "ri"},{"ル", "ru"},{"レ", "re"},{"ロ", "ro"}, - {"ワ", "wa"},{"ヲ", "wo"}, - {"ン", "n"}, - {"ガ", "ga"},{"ギ", "gi"},{"グ", "gu"},{"ゲ", "ge"},{"ゴ", "go"}, - {"ザ", "za"},{"ジ", "ji"},{"ズ", "zu"},{"ゼ", "ze"},{"ゾ", "zo"}, - {"ダ", "da"},{"ヂ", "ji"},{"ヅ", "zu"},{"デ", "de"},{"ド", "do"}, - {"バ", "ba"},{"ビ", "bi"},{"ブ", "bu"},{"ベ", "be"},{"ボ", "bo"}, - {"パ", "pa"},{"ピ", "pi"},{"プ", "pu"},{"ペ", "pe"},{"ポ", "po"} - }; - - private static ArrayList katakanaList = new ArrayList(Arrays.asList(tempKatakanaList)); + + private boolean romajiFirst = true; + + private static ArrayList plainHiragana = new ArrayList(Arrays.asList(new String[][]{{"あ", "a"},{"い", "i"},{"う", "u"},{"え", "e"},{"お", "o"}, + {"か", "ka"},{"き", "ki"},{"く", "ku"},{"け", "ke"},{"こ", "ko"}, + {"さ", "sa"},{"し", "shi"},{"す", "su"},{"せ", "se"},{"そ", "so"}, + {"た", "ta"},{"ち", "chi"},{"つ", "tsu"},{"て", "te"},{"と", "to"}, + {"な", "na"},{"に", "ni"},{"ぬ", "nu"},{"ね", "ne"},{"の", "no"}, + {"は", "ha"},{"ひ", "hi"},{"ふ", "fu"},{"へ", "he"},{"ほ", "ho"}, + {"ま", "ma"},{"み", "mi"},{"む", "mu"},{"め", "me"},{"も", "mo"}, + {"や", "ya"},{"ゆ", "yu"},{"よ", "yo"}, + {"ら", "ra"},{"り", "ri"},{"る", "ru"},{"れ", "re"},{"ろ", "ro"}, + {"わ", "wa"},{"を", "wo"}, + {"ん", "n"}})); + + private static ArrayList dakutenHiragana = new ArrayList(Arrays.asList(new String[][]{ + {"が", "ga"},{"ぎ", "gi"},{"ぐ", "gu"},{"げ", "ge"},{"ご", "go"}, + {"ざ", "za"},{"じ", "ji"},{"ず", "zu"},{"ぜ", "ze"},{"ぞ", "zo"}, + {"だ", "da"},{"ぢ", "ji"},{"づ", "zu"},{"で", "de"},{"ど", "do"}, + {"ば", "ba"},{"び", "bi"},{"ぶ", "bu"},{"べ", "be"},{"ぼ", "bo"}, + {"ぱ", "pa"},{"ぴ", "pi"},{"ぷ", "pu"},{"ぺ", "pe"},{"ぽ", "po"} + })); + + private static ArrayList plainKatakana = new ArrayList(Arrays.asList(new String[][]{{"ア", "a"},{"イ", "i"},{"ウ", "u"},{"エ", "e"},{"オ", "o"}, + {"カ", "ka"},{"キ", "ki"},{"ク", "ku"},{"ケ", "ke"},{"コ", "ko"}, + {"サ", "sa"},{"シ", "shi"},{"ス", "su"},{"セ", "se"},{"ソ", "so"}, + {"タ", "ta"},{"チ", "chi"},{"ツ", "tsu"},{"テ", "te"},{"ト", "to"}, + {"ナ", "na"},{"ニ", "ni"},{"ヌ", "nu"},{"ネ", "ne"},{"ノ", "no"}, + {"ハ", "ha"},{"ヒ", "hi"},{"フ", "fu"},{"ヘ", "he"},{"ホ", "ho"}, + {"マ", "ma"},{"ミ", "mi"},{"ム", "mu"},{"メ", "me"},{"モ", "mo"}, + {"ヤ", "ya"},{"ユ", "yu"},{"ヨ", "yo"}, + {"ラ", "ra"},{"リ", "ri"},{"ル", "ru"},{"レ", "re"},{"ロ", "ro"}, + {"ワ", "wa"},{"ヲ", "wo"}, + {"ン", "n"} + })); + + private static ArrayList dakutenKatakana = new ArrayList(Arrays.asList(new String[][]{ + {"ガ", "ga"},{"ギ", "gi"},{"グ", "gu"},{"ゲ", "ge"},{"ゴ", "go"}, + {"ザ", "za"},{"ジ", "ji"},{"ズ", "zu"},{"ゼ", "ze"},{"ゾ", "zo"}, + {"ダ", "da"},{"ヂ", "ji"},{"ヅ", "zu"},{"デ", "de"},{"ド", "do"}, + {"バ", "ba"},{"ビ", "bi"},{"ブ", "bu"},{"ベ", "be"},{"ボ", "bo"}, + {"パ", "pa"},{"ピ", "pi"},{"プ", "pu"},{"ペ", "pe"},{"ポ", "po"} + })); public Question(int tempListId) { @@ -59,18 +64,22 @@ public Question(int tempListId) setList(tempListId); } - public void shuffleQuestions() + public void switchRomajiFirst() { - if (listId == 4) - { - setList(4); - } + romajiFirst = !romajiFirst; + } + + public void shuffleQuestions() + { + setList(listId); Collections.shuffle(listToUse); } - + public void setList(int tempListId) { + int randNum; + if (tempListId == 4) { tempListId = random.nextInt(2) + 1; @@ -78,38 +87,59 @@ public void setList(int tempListId) switch(tempListId) { - case 1: - listToUse = hiraganaList; + case 1: //Hiragana + randNum = random.nextInt(plainHiragana.size() + dakutenHiragana.size()); + + if (randNum < plainHiragana.size()) + { + listToUse = plainHiragana; + } + + else + { + listToUse = dakutenHiragana; + } + break; - case 2: - listToUse = katakanaList; + case 2: //Katakana + randNum = random.nextInt(plainKatakana.size() + dakutenKatakana.size()); + + if (randNum < plainKatakana.size()) + { + listToUse = plainKatakana; + } + + else + { + listToUse = dakutenKatakana; + } + break; } } - public String getAnswer(int charID, boolean romajiFirst) + public String getAnswer(int charID) { - if (romajiFirst) - { - return listToUse.get(charID)[0]; - } + return listToUse.get(charID)[romajiFirst ? 0 : 1]; + } - else - { - return listToUse.get(charID)[1]; - } + public void setCurrentAnswer(int answer) + { + this.currentAnswer = answer; } - public String getQuestion(int charID, boolean romajiFirst) + public String getCurrentAnswer() { - if (romajiFirst) - { - return listToUse.get(charID)[1]; - } + return listToUse.get(currentAnswer)[romajiFirst ? 0 : 1]; + } - else - { - return listToUse.get(charID)[0]; - } + public String getQuestion(int charID) + { + return listToUse.get(charID)[romajiFirst ? 1 : 0]; + } + + public ArrayList getUsedList() + { + return listToUse; } -} +} \ No newline at end of file diff --git a/src/com/pikamander2/japanesequiz/QuestionAdapter.java b/src/com/pikamander2/japanesequiz/QuestionAdapter.java index 7ca394c..247e969 100644 --- a/src/com/pikamander2/japanesequiz/QuestionAdapter.java +++ b/src/com/pikamander2/japanesequiz/QuestionAdapter.java @@ -29,14 +29,14 @@ public QuestionAdapter(Context c, Question q) question = q; } - public void changeAnswers(boolean romajiFirst) + public void changeAnswers() { - buttons.get(0).setText(question.getAnswer(0, romajiFirst)); - buttons.get(1).setText(question.getAnswer(1, romajiFirst)); - buttons.get(2).setText(question.getAnswer(2, romajiFirst)); - buttons.get(3).setText(question.getAnswer(3, romajiFirst)); + buttons.get(0).setText(question.getAnswer(0)); + buttons.get(1).setText(question.getAnswer(1)); + buttons.get(2).setText(question.getAnswer(2)); + buttons.get(3).setText(question.getAnswer(3)); } - + public void makeButtons() { for (int i = 0; i < 4; i++) @@ -45,9 +45,10 @@ public void makeButtons() newButton.setOnClickListener(mContext.answerOnClick); buttons.add(newButton); newButton.setTextSize(TypedValue.COMPLEX_UNIT_SP,mContext.getResources().getDimension(R.dimen.button_font_size)); - newButton.setText(question.getAnswer(i, true)); newButton.setTextColor(Color.rgb(255,255,255)); } + + changeAnswers(); } public int getCount() diff --git a/src/com/pikamander2/japanesequiz/QuizActivity.java b/src/com/pikamander2/japanesequiz/QuizActivity.java index d2c7724..2f7708c 100644 --- a/src/com/pikamander2/japanesequiz/QuizActivity.java +++ b/src/com/pikamander2/japanesequiz/QuizActivity.java @@ -25,8 +25,6 @@ public class QuizActivity extends Activity int numWrong = 0; int quizID; int numAnswerChoices = 4; - boolean romajiFirst = true; //0 = romaji as the question, symbol as the answer. 1 = symbol as the question, romaji as the answer. - DecimalFormat df = new DecimalFormat("#"); Random random = new Random(); ExpandableHeightGridView gridViewQuestions; @@ -88,7 +86,7 @@ public void onClick(View view) { public void onClick(View view) { - romajiFirst = !romajiFirst; + question.switchRomajiFirst(); switchQuestionAndAnswers(); } }; @@ -96,7 +94,7 @@ public void onClick(View view) public void switchQuestionAndAnswers() { switchQuestion(); - questionAdapter.changeAnswers(romajiFirst); + questionAdapter.changeAnswers(); questionAdapter.notifyDataSetChanged(); } @@ -130,6 +128,7 @@ private String getPercentCorrect() return "0"; } + DecimalFormat df = new DecimalFormat("#"); return df.format((100.0 / (numCorrect + numWrong)) * numCorrect); } @@ -143,8 +142,11 @@ public void switchQuestion() question.shuffleQuestions(); int randNum = random.nextInt(4); - currentQuestion = question.getQuestion(randNum, romajiFirst); - currentAnswer = question.getAnswer(randNum, romajiFirst); + currentQuestion = question.getQuestion(randNum); + currentAnswer = question.getAnswer(randNum); + + question.setCurrentAnswer(randNum); + textViewRomaji.setText(currentQuestion); } @@ -169,4 +171,4 @@ public boolean onOptionsItemSelected(MenuItem item) } return super.onOptionsItemSelected(item); } -} +} \ No newline at end of file