Skip to main content

Posts

Showing posts from October, 2013

Android TimePickerDialog

In this tutorial I want to explain about creating a  TimePickerDialog like,



In this I am having One Button and One EditText. On this example first it will load the current time to the EditText, While Tap on the button it will display the TimePickerDialog with the current time after tap on Done button TimePickerDialog it will update in the EditText.


activity_main.xml

This is a Layout of main page. This layout contain One Button and one EditText.



<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="top|center"
    android:orientation="vertical"
    tools:context=".MainActivity" >

    <Button
        android:id="@+id/BtnSelectTime"
        android:layout_width="wrap_content"
        android:layout_height="wrap_co…

Android DatePickerDialog

In this tutorial I want to explain about creating a  DatePickerDialog like,



In this I am having One Button and One EditText. On this example first it will load the current date to the EditText, While Tap on the button it will display the DatePickerDialog after tap on Done button DatePickerDialog it will update in the EditText.


activity_main.xml

This is a Layout of main page. This layout contain One Button and one EditText.



<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="top|center"
    android:orientation="vertical"
    tools:context=".MainActivity" >

    <Button
        android:id="@+id/BtnSelectDate"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        andro…

Importing Image From Camera

In this tutorial I want to explain how to take a picture in camera ans import that picture to am imageview,

In this I am having One Button and One ImageView. While Tap on the button it will open Camera. After that the user can take photo After taking photo it will ask for save image. If the user save the image then it will display on the Imageview.

activity_main.xml

This is a Layout of main page. This layout contain One Button and one Imageview.



<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="top|center"
    android:orientation="vertical"
    tools:context=".MainActivity" >

    <Button
        android:id="@+id/BtnSelectImg"
        android:layout_width="wrap_content"
        android:layout_height="wrap_con…

custom listview with separate headers

Here is the  custom listview with separate headers Blog. This Blog will help you to create seperate header for a list link,

Create Android Application

After installing Eclipse and all the components required for android development (You can use This Tutorial for to knew How to start Android Development). Now you can create your first Hello World Android Application.

Create Hello World Application.

You can create your Android application through two ways.

1. In Eclipse File menu -> New -> Android Application Project

2.  Right click on your Package Explorer -> New ->Android Application Project

Enter the Application Name, Project Name, Package Name, Minimum Required SDK, Target SDK, Compile with, Theme for the new android application on the Window.

Application name is the name of the application Project name is the name of the project directory which is displayed on the project explorer and also the folder name of your application created in your android workspace.
Package name is the namespace of your application. which is unique for all the packages installed on your android system.
Minimum Required SDK is the lowest versio…