Friday, February 22, 2008

Undroid: An Android Plugin for Netbeans

When do internet browsing, on java.sun.com, i found a link state that there is an android plugin for Netbeans. Its name is Undroid. Well, for you that using Netbeans as your Developer IDE, it is a great news. you can try this android plugin. If you interested just visit http://undroid.nolimit.cz/.


Read More……

Thursday, February 21, 2008

Android SDK m5-rc14 Released

New Android SDK released. There are some improvement, and changes. And some of my samples, i publish here and at learncodes.googlepages.com maybe have function that has been changed. But i think you the reader will be easily adopted.

Some of them, like there isn't onMotionEvent (MotionEvent ev) method but has been changed to OnTouchEvent(MotionEvent ev), there should be android:name on AndroidManifest.xml not id, but id, still can be use with warning.

So, hope you, the reader, will adopt it easily.


Read More……

Friday, February 8, 2008

ProgressBar: Android Simple Custom Component

It is interesting that we can create a customized component or in other word, we just say custom component in Android. From the documentation, it is permitted to build a custom component from any class / view class provided by android. Last night, i try to make a custom component, a progressbar component, just like a progress bar in VC++, BC++, or VB.

When browsing sample program ship with android SDK, there are some sample program providing with Android progress bar showing some screen. But it is not make me step backward, just want to know the feelling how can i create a custom component.

This ProgressBar simple custom component has been upload to my googlepages: Google Site you can study from that, and download the code to make your study easier.

On the reason to make you know what i say, just take a look at image below. Two image, one when the application run, and the second after simulate/stop.


First image


Second image



Do you want to learn more ?
Learning with sample code ?
Learning by Doing ?
Just Visit My Google Site
Study Contact Database Application
and there is Android UI Design at there.



Read More……

Wednesday, February 6, 2008

Sample Android Database Application

For interacting with database, i have created a simple complete application using database in android. You can take a look at this application at my Contact Application in googlepages. You are free to download the sample code.

This application contains Contact Database, and some database manipulation. Fields included in the table are Contact Name, Address, Mobile Phone Number, and Home Phone Number. You can add, edit, and delete the contact.

I'm sure it will help you much to study database application inside android.
ok, have a nice try!

Good Luck !

Do you want to learn more ?
Learning with sample code ?
Learning by Doing ?
Just Visit http://learncodes.googlepages.com
Study Contact Database Application
and there is Android UI Design at there.



Read More……

Tuesday, February 5, 2008

Changing TextView to receive user input programatically

TextView is the ancestor of EditText component. I've try to make TextView from XML design screen to receive input from user still is unsuccessful. But Programatically, i can change the TextView able to receive user input.

To do this, just create activity folder with activitycreator and modify the main activity class, say we have Sample Class below:

public class SampleTextView extends Activity
{
/** Called with the activity is first created. */
@Override
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);
LayoutParams params = new LayoutParams(
LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
TextView v = new TextView(this);
v.setLayoutParams(params);
v.setInputMethod(TextInputMethod.getInstance());
v.setMovementMethod(ArrowKeyMovementMethod.getInstance());
v.setFocusable(true);
v.setText("TEST");
v.setBackgroundColor(0x88FFFF00);
setContentView(v, params);

}
}

Things you have to note is :
  1. Set the TextView to receive focus ( setFocusable )
  2. Set the Input Method to know how method will be used ( setInputMethod )
  3. Set the Movement Method to know how to handle cursor pointer ( setMovementMethod )


Compile and run the program, you can edit the content of TextView.
Good Luck !

Do you want to learn more ?
Learning with sample code ?
Learning by Doing ?
Just Visit http://learncodes.googlepages.com/
and there is Android UI Design at there.


Read More……