Friday, August 5, 2011

A laundry list

In this morning's run through of the app, I noticed a few things that warrant some TLC.
First, when installing there's not splash screen. It's just black for a few seconds, then the initial display and the download dialog appear simultaneously.

Secondly, the verb to go, iku, has two correct pronunciations which both appear in the same list of possible answers much of the time. I will be putting in some code to avoid that.

Third, if you click "next question", the media continues playing until you answer the next question. That can be confusing.

4. As part of the same issue, when click next to go to the next level, the sound is truncated. I guess when I'm playing, I'll just have to wait until I year the pronunciation before going to the next question.

5. Also, the download dialog needs to be non-cancelable. It also looks as if the extract dialog terminated early. I'll check to see if all the sound files got downloaded.

6. The draft of the app for JLPT 4 needs to be reloaded to the android marketplace, as I'm getting a "app not managed" error when I attempt to install.

7. I also will do some more testing for the crash coming back into QuestionActivity after killing the app.

8. Also, at this level some of the first letters are capitalized, which is inconsistent. I'll convert them all to lower case (in the code, that is).

9. A lot of the words at some of the levels have multiple meanings in English. To keep the scrolls from getting to wordy, I cut it off at 2, but it seems as if it's cutting off at one. I'll look into that.

10. The title is changing from JLPT Vocabulary Quiz to JLPT Vocabulary Quiz Level 5 at some point, so I just will make that consistent.

It doesn't take long for these lists to pile up.

So, let's do the low-hanging fruit first. On canceling the media play-back, it just has to be done on the next question instead of the answer.

First lets find where it's canceled...

Here it is..


// We don't have sound files yet for 1, 2 and 3
if (appState.jlptLevel > 3) {

mPlaySoundUtil.stopPlay();


Ok, so, I just need to take this stopPlay button and insert it into the next play button code.

Here we go..

private void advanceQuestion() {

mPlaySoundUtil.stopPlay();
makeEnglishInvisible();
checkIncrementQuestion();

}

Let's check it out.

Ok, that works.


Ok, now lets put the answer in lower case.

mDisplayEnglish.setText(shortenedDef);

This (found on daniweb) like it would do the trick:

shortenedDef = Character.toLowerCase(shortenedDef.charAt(0)) + shortenedDef.substring(1);


I also threw in a fix for number 9, it looks like I was breaking out of the loop one iteration too soon. I'll have to test that later.

Ok, that seems to working. I'm keen on seeing if the other change worked, lest it fall through the cracks. But to do it, I'll have to create another "shell" project and upload it.

Ok, I set the cancelable to be false on the two dialogs.

Let's tackle this title issue.

Actually, it has 3 different titles. In the initial, launch activity, is "JLPT 5 Quiz".

On the start activity, it's JLPT Vocabulary Quiz.

And on the question activity, it's "Jlpt 5 Japanese Vocabulary Quiz Game". That's a searchable title if I've ever seen one. It should be the name of the app on the marketplace.

But, not on the title.

Ok, let's tackle these one at a time. Btw, the JLP5 5 quiz is also the string that appears under the icon.

So, here's the string from the shell project:



JLPT 5 Quiz
JLPT 5 Japanese Vocabulary Quiz Game
5


And part of the the manifest:

android:clearTaskOnLaunch="true" android:icon="@drawable/ic_icon"
android:label="@string/app_name">
android:screenOrientation="portrait">






It's a bit confusing. In both the case of the application and the activity, it's using "android:label". However, both the text under the icon and the launch activity title *display* the string from @string/app_label, yet the application specifies the much longer app name!

Here's what the docs say about the application label.

android:label
A user-readable label for the application as a whole, and a default label for each of the application's components. See the individual label attributes for , , , , and elements.
The label should be set as a reference to a string resource, so that it can be localized like other strings in the user interface. However, as a convenience while you're developing the application, it can also be set as a raw string.

You would think just swap them, but let's look at activity label:

android:label

A user-readable label for the activity. The label is displayed on-screen when the activity must be represented to the user. It's often displayed along with the activity icon.

If this attribute is not set, the label set for the application as a whole is used instead (see the element's label attribute).

The activity's label — whether set here or by the element — is also the default label for all the activity's intent filters (see the element's label attribute).

The label should be set as a reference to a string resource, so that it can be localized like other strings in the user interface. However, as a convenience while you're developing the application, it can also be set as a raw string.


So, this text:

"It's often displayed along with the activity icon."

May explain why it works as the icon text for the app.

So, if my theory is correct, then we need to set the title in the code so we can maintain the icon text.

setTitle(R.string.app_name);

And let it default to app_name in all the other displays.

Let's try it...

Yup. But it's pretty confusing. I think I'll change the name from "app_name" to "app_title".

Ok. Any other easy ones?

Just for the heck of it, I'm going to add an simple layout to the shell project and see if it works.

Ok, actually I just added the startActivity layout, and set the JLPT level. They cant' get at it, anyway, because the download dialog is non-cancelable. We'll see how it works out.

Ok, aside from testing for the crash on question activity, and the special processing for 行く, we've caught most of them. We'll pick up the remainders after lunch.

No comments:

Post a Comment