0% found this document useful (0 votes)
0 views2 pages

TableLayout Program

The document contains an XML layout for an Android application using a TableLayout with multiple TableRows and TextViews displaying the text 'Time' and 'Last Name'. Additionally, it includes a MainActivity class that sets the content view to 'activity_main' during the onCreate method. This setup is typical for creating a user interface in an Android app.

Uploaded by

kokanesanket24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views2 pages

TableLayout Program

The document contains an XML layout for an Android application using a TableLayout with multiple TableRows and TextViews displaying the text 'Time' and 'Last Name'. Additionally, it includes a MainActivity class that sets the content view to 'activity_main' during the onCreate method. This setup is typical for creating a user interface in an Android app.

Uploaded by

kokanesanket24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

<TableLayout xmlns:android="http://schemas.android.

com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<TextView
android:text="Time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1" />

<TextView
android:text="Time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1" />
</TableRow>

<TableRow>

<TextView
android:text="Time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1" />

<TextView
android:text="Time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1" />
<TextView
android:text="Last Name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1" />

</TableRow>

</TableLayout>
package com.example.demo;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;

public class MainActivity extends Activity {


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}

You might also like