table

Android Layout Background Color

In android, we can set the layout background color using background property in layout.
Example for Layout Background Color :-
[sourcecode language="xml"]
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="#0000ff" />
[/sourcecode]
The output will looks like

Android Textview Border

We cannot set border to textview directly because there is no property to set border for textview.

But we can give background color to Tablelayout & Textview.

Android TableLayout

TableLayout:

By seeing the word ‘Table’ itself we know that Table Layout is used to show views in a table format with rows & columns.

How to add rows in a table layout?

  • TableRow is used to add rows in a table layout.
  • TableRow is a layout. It will arrange its children horizontally.
Syndicate content