Thursday, May 9, 2013

13 Some ebooks to develope android application with some difference ways.


There are many types of Android application and of course we are have many ways to develope them. This topic is created to share some ebooks to develope Android apps with some difference ways.

Tuesday, April 2, 2013

10 How to use preferences in android

From Developer.android.com: “android.preference package provides classes that manage application preferences and implement the preferences UI. Using these ensures that all the preferences within each application are maintained in the same manner and the user experience is consistent with that of the system and other applications.
The preferences portion of an application should be ran as a separate Activity that extends the PreferenceActivity class. In the PreferenceActivity, a PreferenceScreen object should be the root element of the layout. The PreferenceScreen contains Preference elements such as a CheckBoxPreference, EditTextPreference, ListPreference, PreferenceCategory, or RingtonePreference..."


In this tutorial we want to introduce you how to use some preference elements with their tasks in a setting activity externs the PreferenceActivity class. Those are some simple tasks setting for backup data like the photo shows in below:


1. Create layout file for preference settings
To make the setting interface we create a preference.xml file in folder res/layout/xml. All xml code to make that show below:

Thursday, March 28, 2013

219 How to create custom Date Time Picker in Android

By the original SDK, you can choose the time and date for your app by using DatePicker, TimePicker and Date - TimePickerDialog but there is nothing built into Android to choose Date and Time in the same time like such a DateTimePicker. In this tutorial, i try to create a custom DateTimePicker that user can choose both date and time at the same time.
Here is a result of this tutorial:



This project is developed in Eclipse 4.2.0.
1. Make application interface:
The main layout of this app demo is very simple layout. It have one edit test, one button. When user touch on the button the DateTimePicket will show for choose the date and time, the result will be show on edit text. Here is some xml code to make main layout:

Thursday, February 28, 2013

3 The best tutorial for using layout in Android


For everybody unlucky when searching and access to my blog with a "modest title". :D I don't do any thing to make it. But i'd like to introduce to you a fantastic tutorial about how to using layout in Android - the basic  thing that every beginner have to learn. No need to speak alot. Here is the link:

http://mobile.tutsplus.com/tutorials/android/android-layout/

That's a famous page, but i hope this help to anyone haven't known about it.

Monday, January 28, 2013

346 Create a simple File Explorer in Android


Many android apps need a File browser to help users work with files in their device. In this tutorial we going to create a simple File Explorer.

Here is a result of this tutorial:
Simple File Explorer Android

This project is developed in Eclipse 4.2.0.

1. Make application interface: The main layout of this app demo is very simple layout. It have one text view, one edit text and one button.

Tuesday, January 15, 2013

39 How to create custom ExpandableListView in Android


From Developer.android.com: “A view that shows items in a vertically scrolling two-level list. This differs from the ListView by allowing two levels: groups which can individually be expanded to show its children. The items come from the ExpandableListAdapter associated with this view”

In this tutorial, we show you how to create a custom ExpandableListView with some images, texts... We want to make some groups of car and customize them with image, text and a checkbox. In each group, we will contain a few different cars, in particular each children row has to contain: an image and the name of the car.

Here is a result of this tutorial:

expandable list view example


This project is developed in Eclipse 4.2.0.

1. Make application interface: The main layout of this app demo have a text view, a button and an expandable list view.

Wednesday, January 9, 2013

16 How to create custom Listview in Android

ListView is a view group that displays a list of scrollable items. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array or database query and converts each item result into a view that's placed into the list.

In this tutorial, we show you how to create a custom list view with some images, texts... We want to make a list view to store information about a list of foobal legend, in particular each row has to contain: an image of the legend, the name, the date of birth and the image of his nationality.

Here is a result of this tutorial:

Android Custom ListView example

This project is developed in Eclipse 4.2.0.

1. Make application interface: The main layout of this app demo have one text view and one list view.

Sunday, January 6, 2013

28 How to create custom progress bar and progress dialog in Android.


Progress Bar and Progress Dialog are useful to tell user that the task is takes longer time to finish. A Progress Dialog showing a progress indicator and an optional text message or view. Only a text message or a view can be used at the same time.
In this tutorial, we show you how to display a custom progress bar and use progress dialog in Asynctask to tell user that the file download task is running.

Here is a result of this tutorial:

Android Custom ProgressBar And ProgressDialog Example


This project is developed in Eclipse 4.2.0.

1. Make main layout with some components: one button to show custom progress bars, one textview to show some infos, one button to start download image file from internet Url.

Thursday, January 3, 2013

11 How to create custom RatingBar in Android


A RatingBar is an extension of SeekBar and ProgressBar that shows a rating in stars. The user can touch/drag or use arrow keys to set the rating when using the default size RatingBar.

In this tutorial, we show you how to create custom RatingBar and use it in Android.  

Here is a result of this tutorial:

Android Custom RatingBar


This project is developed in Eclipse 4.2.0.

1. Make main layout with some components.

Wednesday, January 2, 2013

22 How to create custom Switch in Android


From Developer.android.com: “A Switch is a two-state toggle switch widget that can select between two options. The user may drag the "thumb" back and forth to choose the selected option, or simply tap to toggle as if it were a checkbox. The text property controls the text displayed in the label for the switch, whereas the off and on text controls the text on the thumb…”

In this tutorial, we show you how to customize a Switch, add a click listener and get the setOnCheckedChangeListener for this Switch. Use Switch to control with media volume and wifi on device.

Here is a result of this tutorial:

Android Custom Switch Control

This project is developed in Eclipse 4.2.0.
1. First, modify the main layout of app. Open “res/layout/main.xml” file, add two switches, few textviews and a button.

Tuesday, January 1, 2013

25 How to create custom Text Fields in Android


From Developer.android.com: “A text field allows the user to type text into your app. It can be either single line or multi-line. Touching a text field places the cursor and automatically displays the keyboard. In addition to typing, text fields allow for a variety of other activities, such as text selection (cut, copy, paste) and data look-up via auto-completion.”

In this tutorial, we show you how to customize some Text Fields. We want to introduce some Text Fields with specifying the Keyboard Type and specifying Keyboard Actions.

Here is a result of this tutorial:

Android Custom TextField - Figure 4


This project is developed in Eclipse 4.2.0.
1. Make some Text Fields by XML Layout: The main layout includes some TextViews, some EditTexts, one Custom AutoCompleteTextView and one button.