In this example creating a tab layout to show different screen for each tab. Creating three tabs and setting different images and screens for each tab.
- To Create Tab and Tab change listner Extend TabActivity and implements OnTabChangeListener. - Create tabhost object to create tabs. - Create three tabs name FOOD , GAME , SPORT and set background images. - Create three activities add these tabs. - Add Tabs to tabhost.
In this example creating a basic layout then a login screen.
In Android, TableLayout let you arranges components in rows and columns, just like the standard table layout in HTML, <tr> and <td>.
In this tutorial, we show you how to use TableLayout to arrange button, textview and edittext in rows and columns format, and also demonstrates the use of “android:layout_span” to span view in 2 cells, and “android:layout_column” to display the view in specified column.
In this example we learn how to create a RELATIVE LAYOUT and how it will adjust components.
1. Creating a Login screen.
The RelativeLayout is very flexible. RelativeLayout give flexbility to position your component base on the relative or sibling component’s position. It’s the most flexible layout, that allow you to position your component to display in anywhere you want.
In this example we will learn about LINEAR LAYOUT.
1. How to create Linear Layout. 2. Created example to place comonents vertical and horizontal order. 3. Created one example ( Login form ) to use both vertical and horizontal orientation property of LINEAR LAYOUT.