MY mENU


Monday 20 February 2012

User Interface in Android


User Interface in Android :-


 View and ViewGroup objects is used for user interface in andriod. View class is basic unit. Widgets class which offer fully implemented UI objects in android like button and text field etc which is the sub class of View class. Layouts class provides different kinds of layout architecture, like linear, tabular and relative which is the sub class of ViewGroup class.View is also a point of interaction for the user and the receiver of the interaction events. setContentView() method is used to  pass a reference to the root node object that is called by the Activity.
XML is used to store and transfer the data and provides layout that is readable by the human much like HTML.. View objects are leaves in the tree, ViewGroup objects are branches in the tree .



You can also draw View and ViewGroups objects in Java code, using the addView(View) methods to dynamically insert new View and ViewGroup objects.
Widgets :-  Android provides a set of fully implemented widgets, like buttons, checkboxes, and text-entry fields. It is a View object that serves as an interface for interaction with the user. date picker, a clock, and zoom controls are some other  widget. android.widget package provides several method and class for this purpose.



Layout:-Layout  is the process of planning and arranging in detail something that is human readable form.<LinearLayout> element is used to creates a Linear Layout view group and TextView  element creates a TextView. When you load a layout resource, the Android system initializes these run-time objects, corresponding to the elements in your layout.


Menus:-  Menus offers a reliable interface that reveals application functions and settings.Android will automatically create the necessary View hierarchy for the menu and draw each of your menu items in it. You do not define this structure yourself onCreateOptionsMenu() or onCreateContextMenu()  methods for your Activity and declare the items that you want to include in your menu.

Adapters:-
Adapters is used to bind your view to an external source of data. AdapterView is used for this purpose.

No comments:

Post a Comment