Posts

Showing posts with the label ANDROID

Android Adapters

Image
                               An Adapter object acts as a bridge between an AdapterView and the underlying data for that view . The Adapter provides access to the data items. The Adapter is also responsible for making a View for each item in the data set. An AdapterView is a view whose children are determined by an Adapter. Some examples of AdapterViews are ListView, GridView, Spinner and Gallery. There are several types or sub-classes of Adapter: ListAdapter: Extended Adapter that is the bridge between a ListView and the data that backs the list. Frequently that data comes from a Cursor, but that is not required. The ListView can display any data provided that it is wrapped in a ListAdapter. ArrayAdapter: A ListAdapter that manages a ListView backed by an array of arbitrary objects. By default this class expects that the provided resource id references a single TextView. Example: package...

Validations In Android

Image
Validation on user input can be applied by   regular expressions .   It provides a concise and flexible means for matching   strings   of text, such as particular characters, words, or patterns of characters.    Step:1   Designing xml as  follows ..        main.xml <? xml version = "1.0" encoding = "utf-8" ?> < LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android"       android:orientation = "vertical"       android:layout_width = "fill_parent"       android:layout_height = "fill_parent" > < TextView         android:layout_width = "fill_parent"       android:layout_height = "wrap_content"       android:text = "@string/hello" /> < EditText android:id = "@+id/editText1"       android:layout_width = "match_parent"       android:layout_height = "wrap_...

Dalvik Virtual machine VS Java Virtual Machine:

Dalvik Virtual machine :          (DVM) is Register Architecture, designed to run on low memory, uses its own byte code and runs .Dex file (Dalvik Executable File) Java Virtual Machine :         (JVM) is Stack Architecture, uses java byte code and runs .class file having JIT. Java  source code is compiled by the Java compiler into .class files. Then the dx (dexer) tool, part of the Android SDK processes the .class files into a proprietary file format called DEX that contains Dalvik bytecode. Difference between .class and .dex file format           ● In DEX all the classes of the application are packed into one file.           ● All th e classes in the same DEX file share field, method, etc if they are same.           ● Classes from the same DEX file are l...

A Brief History of Android Versions

Image
          Android has gone through quite a number of updates since its first release. Below are the release date of each version with codename             One of the most widely used mobile OS these days is ANDROID. Android is a software bunch comprising not only operating system but also middleware and key applications. Android Inc was founded in Palo Alto of California, U.S. by Andy Rubin, Rich miner, Nick sears and Chris White in 2003. Later Android Inc. was acquired by Google in 2005.        After original release there have been number of updates in the original version of Android.   Code Name Release Date Android Version 9 February 2009 1.1 Cupcake 30 April 2009 1.5 Donut 15 September 2009 1.6 Eclair 26 October 2009 2.1 Froyo 20 May 2010 2.2 Gingerbread 6 December 2010 2.3 Honeycomb 22 Fe...