Showing posts with label tutorial. Show all posts
Showing posts with label tutorial. Show all posts

Android ProgessBar Example


Hi, in this tutorial you will learn how to use a ProgressBar element in your Android application. ProgessBar is a visual element that show a progress that has been made in some operation. It is known as good practice to use this element if you have any long lasting operations in your application, this way you can notify your user of how far the operation has progressed. 

Animation in Android Using XML files


In this tutorial you will learn how to create animation in Android using tween animation. Tween animation is an animation defined in XML that performs transitions such as rotating, fading, moving, and stretching on a graphic. We will be using rotate element, which is used to create rotation animations and translate element, which creates a vertical or horizontal motion animation.

Making a Phone Call in Android


In this tutorials you will learn how to make a phone call in Android.




Android Options Menu Example


Android Options Menu
In this tutorial you will learn how to create an options menu in Android. Options menu is most commonly used, this menu is presented when a user presses the Menu button on the device.  "On Android 3.0 and higher, items from the options menu are presented by the action bar as a combination of on-screen action items and overflow options. Beginning with Android 3.0, the Menu button is deprecated (some devices don't have one), so you should migrate toward using the action bar to provide access to actions and other options."

Drawing 2D objects in Android


 

In this tutorial you will learn to dynamically draw the following 2D objects: oval, rectangle, star and rectangle with rounded corner.

Android RadioButton Example


In this tutorial you will learn how to create a RadioButton, which allows user to choose one of several options. Putting multiple RadioButton elements in one container makes it impossible to choose more than one option, which means that when user toggles one button it automatically cancels the previous one. There is only two things that you will need to do to have a RadioButton element in your application: 1. Add RadioButton element to xml layout file and 2. Add onClick() event handler to your activity class.

Android Context Menu Example


           In this tutorial I will show you how to create a context menu. A context menu is a menu that appears when a user long-presses a view.
           I am assuming that you already have a list of items that you will use, but if you don't you can quickly create one following the three steps of my ListView tutorial here:

Android ListView Example


In this tutorial I will show how to create a ListView and fill it with data. 
1. Creating a row layout

             First thing that we need to do is to create a row layout that will specify the way each row of our ListView is going to look like. To do that we need to create a new xml file (ringht click on the res folder of your project New->Android xml file) and name it row. Add the following code to your new row.xml file:

 <?xml version="1.0" encoding="utf-8"?>  
 <TextView   
      xmlns:android="http://schemas.android.com/apk/res/android"  
      android:textIsSelectable="true"  
      android:id="@+id/r_text"   
      android:layout_width="fill_parent"  
      android:layout_height="fill_parent"  
      android:padding="10dip"  
      android:textColor="#ffffff"  
      android:textSize="17sp"/>  

Android Button Example


In this tutorial you will learn:
  • How to add a button element to your application layout
  • How to change button's color
  • How to react to user pressing a button.

Android Spinner


    
 In this tutorial I'll show you three things: 
  • How to add a spinner to your application layout;
  • How to populate your spinner with an array from strings.xml file;
  • How to handle user's selection.

Lets get started then:)

Android ImageButton Example

       

         The name of this element speaks for itself, ImageButton is basically just a clickable image:) There are three things that you are going to need to create an ImageButton:

1. Design your button

         To do this you can use any software that you are comfortable with, it can be Paint or Microsoft Word, or Photoshop and PagePlus for something more sophisticated:) You can also find some very nice ready to use buttons on the internet (for example http://www.iconarchive.com is a good place to take a look at), just make sure to check the licence:) I have created a very simple button, that looks like this: