/* This is First Basic Demo of Android */
main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:gravity="center" >
<TextView
android:id="@+id/tvDemo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Large Text"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
FirstDemoActivity.java
package com.firstdemo;
import android.app.Activity;
import android.os.Bundle;
public class FirstDemoActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:gravity="center" >
<TextView
android:id="@+id/tvDemo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Large Text"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
FirstDemoActivity.java
package com.firstdemo;
import android.app.Activity;
import android.os.Bundle;
public class FirstDemoActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
0 comments:
Post a Comment