2011年7月29日金曜日

Add cricket game

I added one more game, cricket.

This game may not be popular in the hard darts game, but major one in the digital darts.


But one option remains, the mark handy-cap is new feature.  It will be supported in the next version.

2011年7月14日木曜日

Small banner in the application detail page

When you browse the application detail page with Android browser, there is a small banner in left-top.

That banner is specified as a small promotion icon in the developer console.

I didn't set the promotion icon because it was option.  But it is necessary to show the application detail page better.

2011年7月12日火曜日

kidz darts counter version 1.0 released

I released my first application, "kidz darts counter" version 1.0 on Android market.

https://market.android.com/details?id=jp.kidz.dartscounter

initial focus in views

The description "requestFocus" is prepared for Android layout file.  But button view cannot focused by only that description.  You need to set the "focusableInTouchMode" attribute true.


<Button
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:text="Start Zero-One"
android:id="@+id/startZo"
android:focusableInTouchMode="true">
<requestFocus/>
</Button>

Add one more game

I could add one more game, zero-one game on the application.  It's the most major game of darts.

Relatively, coding zero-one game is easy, with using the module of count-up game.


So now, I decide to upload my application on the Android market.

Now I'm building it with sign, preparing the promotion icon and note, and testing more.

2011年7月11日月曜日

avoiding an exception with the back key

When the back key is pushed at the activity called by startActivityForResult(), the application will be stopped with an exception.  Then you need to override onBackPressed() and call setResult() in it.

Like this;


@Override
public void onBackPressed(){
Intent result = new Intent();
Spinner rounds = (Spinner)this.findViewById(R.id.CuNumRound);
result.putExtra("ROUNDS", Integer.parseInt((String)rounds.getSelectedItem()));
CheckBox bonus = (CheckBox)this.findViewById(R.id.CuBullBonus);
result.putExtra("BULLBONUS", bonus.isChecked());
setResult(RESULT_OK, result);
super.onBackPressed();
}

Dialog activity

Android can create two types of dialog.

Dialog can be created temporary in the code.

One more, dialog can be created as an activity.
Like this in AndroidManifest.xml;

        <activity android:name=".SetupCuActivity"
                  android:label="@string/app_name"
                  android:theme="@android:style/Theme.Dialog">
        </activity>

2011年7月10日日曜日

Complete all items for one game

I completed the darts counter for count-up game.

There were some problems to complete.  One was the dialog feature.  Considering class resources is needed.

Java programming has some redundant and temporary description, I think.

Anyway, I got it.  Next, I will add more games on this application.

2011年7月7日木曜日

At least, recovering.

The program is recovered behaving the same as it was, with new design.

Next I need to study sending result between activities.


2011年7月4日月曜日

Redesign

Yes, I got completed a scoring application for the count-up game.

But it is not better algorithm, just a training case for me. I could confirm the usage of Android UI and java classes.

Then I start re-designing the scoring algorithm.

To use the same system for some games, I revise the Dart class.

2011年7月3日日曜日

Dart class

Sunday, I got a lot progress.

I had modified some java programs at work, but I have never designed a java program.

So I wanted to confirm my class design.

In darts game, one dart points a number and a multiple.  Then I designed "Dart class" for scoring one dart.

Now Dart class works well and it makes displaying scores easy.

2011年7月2日土曜日

Application design : darts counter

I will program a darts counter for Android as a first application.

Android is designed as the event driven style, which I'm not good at...

So at first, we should design the activities and the transition.


The title screen, users can choose the game.  (At first, only one game there.)

The setup screen, users can setup the game options.  (At first, no option there.)

The scoring screen, the main page of the application.


Now I program the layout files with some image files.  The layouts and images are not completed design.  Only to define the objects for programming.


I think the layout by the text coding is easier than that by the graphical tools.

And I want more property information.  It's difficult to find the correct parameters.

I'll start android programming

I'm an engineer, then I just start android programming as a self-development.

I have some knowledge about android programming, and I have experienced the android programming a little at my office.  But it took a time to ready programming at home.

I personally use a notebook PC at home.  With this PC, the emulator AVD doesn't work well.  It takes time to start, the start screen doesn't disappear...

So I decide to use my smartphone directly, without an emulator.


Now no one knows this blog.  It is just a memo.

But some one will access here after I release my application.