Professional Documents
Culture Documents
Layouts in Android: The Most Commonly Used Layouts Are - Linearlayout - Tablelayout - Relativelayout - Framelayout
Layouts in Android: The Most Commonly Used Layouts Are - Linearlayout - Tablelayout - Relativelayout - Framelayout
The most commonly used Layouts are LinearLayout TableLayout RelativeLayout Framelayout
LinearLayout
Aligns all children in a single direction vertically or horizontally Can be defined by orientation attribute
TableLayout
Positions its children into rows and columns do not display border lines for their rows, columns, or cells
RelativeLayout
lets child views specify their position relative to the parent view or to each other (specified by ID)
FrameLayout
Layout that acts as a view frame to display a single object.
b1.setOnClickListener(new View.OnClickListener(){ public void onClick(View v) { // TODO Auto-generated method stub if(ck.isChecked()) { String s="THANKS"; tv.setText(s); }
else { String s1="Please check the checkbox"; tv.setText(s1); } } });
Output of LinearLayout
We can look the hierarchyof the table layout in the outline window