Tuesday, 12 August 2014

Android Sample Coding-PART 6:


1.Fragment:


            Fragment class in Android is used to build dynamic User Interfaces. Fragments should be used within the Activity. A greatest advantage of fragments is that it simplifies the task of creating UI for multiple screen sizes. A activity can contain any number of fragments.



Screenshot :

          






  Download Code Here

             Fragment

          

            

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2.Sliding Navigation Drawer:


            Sliding Navigation Drawer which is revealed when you swipe across the screen from left edge , which would be hidden rest of time.


Screenshot :

          








  Download Code Here

             Sliding Navigation Drawer

          

            

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3.Drag and Drop:


            Drag Drop  can be used to drag data from a view and drop it in another view.


Screenshot :

          






  Download Code Here

             DragnDrop

          

            

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4.Text Watcher:


            Text Watcher   can be used to watch a input text field and you can instantly update data on other views. It can be useful for counting the number of characters entered in the text field instantly and measuring password strength on entering etc .


Screenshot :

          








  Download Code Here

             TextWatcher

          

            

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Monday, 11 August 2014

Android Sample Coding-PART 5:


1.Progress Bar:


            Progress Bar  are used to show progress of a task. For example. When you are uploading or downloading something from the internet, it is better to show the progress of download/upload to the user.
 <ProgressBar
     style="@android:style/Widget.ProgressBar.Horizontal"
     ... />

Other progress bar styles provided by the system include:

  1. Widget.ProgressBar.Horizontal
  2. Widget.ProgressBar.Small
  3. Widget.ProgressBar.Large
  4. Widget.ProgressBar.Inverse
  5. Widget.ProgressBar.Small.Inverse
  6. Widget.ProgressBar.Large.Inverse  

Screenshot :

          1.1. Progress Bar:



   



          1.2.ProgressBar Dialog:





  Download Code Here

             Progress Bar

            ProgressBar Dialog

            

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2.Spinner:


            Spinner  are  not nothing but the dropdownlist seen in other programming languages. It provides a easy way to select  value from  list. Clicking spinner will display a dropdownlist with the available values.

Screenshot :

          




  Download Code Here

             Spinner

          

            

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


3.Toggle Button:


            Toggle   button allows the user to change a setting between two states.


You can add a basic toggle button to your layout with the Toggle Button object.


Screenshot :

          





  Download Code Here

             Toggle

         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Tuesday, 5 August 2014

Android Sample Coding-PART 4:


1.Grid View:


            Grid View is a ViewGroup that displays items in a two-dimensional, scrollable grid. The grid items are automatically inserted to the layout using a ListAdapter.


   Screenshot :

          1.1. Normal Gridview:


     



          1.2.Custom Gridview:

 


  Download Code Here

             Normal GridView

            Custom GridView



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Friday, 1 August 2014

Android Sample Coding-PART 3:


1.Toast:


            Toast is a notification message that pop up, display a certain amount of time, and automatically fades in and out, most people just use it for debugging purpose.

//display in short period of time
Toast.makeText(getApplicationContext(), "msg msg", Toast.LENGTH_SHORT).show();
 
//display in long period of time
Toast.makeText(getApplicationContext(), "msg msg", Toast.LENGTH_LONG).show();


   Screenshot :

          1.1. Normal Toast :

       



          1.2.Custom Toast:

 

  Download Code Here

             Normal Toast

            Custom Toast




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


2.Alert Dialog:


            Alert Dialog class can be used,where a message and one,two or three buttons are displayed in a popup window.

AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
    context);


   Screenshot :

    



  Download Code Here

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3.Custom Dialog:


            Custom Dialog is usually a small window that appears in  front of the current Activity. The underlying Activity loses focus and the dialog accepts all user interaction. Dialogs are normally used for  notifications that should interrupt the user and to perform short tasks that directly relate to the application in progress (such as a progress bar or a login prompt).

 AlertDialog.Builder builder = new AlertDialog.Builder(this);

   Screenshot :

        





  Download Code Here

     

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4.List View:


            List View  arranges components in a vertical scroll able list.

   Screenshot :

         




  Download Code Here            

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4.1. Custom ListView:


            Custom ListView    is explained how to design listview with your custom styles and colors instead of using default listview style.

   Screenshot :

         




  Download Code Here            

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4.2. Expandable List View:


            Expandable List View  is used to group list data by categories. It has the capability of expanding and collapsing the groups when user touches header.

   Screenshot :

         




  Download Code Here            

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4.3. Search In List View:


            Adding search functionality to listview   will filters the list data with a matching string, hence provides user an easy way to find the information he needs.

   Screenshot :

         


  Download Code Here            

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

5.Scroll View:


            Scroll View  Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display. A ScrollView is a FrameLayout, meaning you should place one child in it containing the entire contents to scroll; this child may itself be a layout manager with a complex hierarchy of objects.

   Screenshot :

         





  Download Code Here            

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

6. Horizontal Scroll View:


            Horizontal Scroll View  Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display. A ScrollView is a FrameLayout, meaning you should place one child in it containing the entire contents to scroll; this child may itself be a layout manager with a complex hierarchy of objects.

   Screenshot :

         





  Download Code Here            

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~