Buat Project Android baru dengan cara :
package projek.andro.profileku;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.MotionEvent;
public class Splash extends Activity {
protected boolean _active = true;
protected int _splashTime = 4000;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
setContentView(R.layout.splash);
// thread for displaying the SplashScreen
Thread splashTread = new Thread() {
@Override
public void run() {
try {
int waited = 0;
while(_active && (waited < _splashTime)) {
sleep(100);
if(_active) {
waited += 100;
}
}
} catch(InterruptedException e) {
// do nothing
} finally {
finish();
Intent newIntent=new Intent(Splash.this,wellcome.class);
startActivityForResult(newIntent,0);
}
}
};
splashTread.start();
}
@Override
public boolean onTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
_active = false;
}
return true;
}
}
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgroud1" >
<Gallery
android:id="@+id/gallery1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="116dp"
android:background="@drawable/welcome" />
<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/gallery1"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp" />
</RelativeLayout>
========================================================================
package projek.andro.profileku;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.app.ProgressDialog;
public class wellcome extends Activity {
protected Button masuk1;
protected ProgressDialog pd1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
pd1 = ProgressDialog.show(wellcome.this, "Sabar Bro..", "Loading Nih..");
new Thread(){
public void run(){
try{
sleep(2500);
}
catch (Exception e){
Log.e("tag", e.getMessage());
}
pd1.dismiss();
}
} .start();
setContentView(R.layout.wellcome);
masuk1 = (Button)findViewById(R.id.masuk);
masuk1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
gantihalaman2();
}
});
}
public void gantihalaman2(){
Intent gh2 = new Intent(this, menu.class);
startActivity(gh2);
}
}
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgroud1" >
<Gallery
android:id="@+id/gallery4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/gallery3"
android:layout_alignParentLeft="true"
android:layout_marginBottom="18dp"
android:background="@drawable/balon2" />
<Gallery
android:id="@+id/gallery3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="21dp"
android:background="@drawable/narutolol" />
<Button
android:background="@drawable/masuk1"
android:id="@+id/masuk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/gallery4"
android:layout_centerHorizontal="true" />
<Gallery
android:id="@+id/gallery1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/masuk"
android:layout_centerHorizontal="true"
android:layout_marginBottom="22dp"
android:background="@drawable/welcome" />
</RelativeLayout>
========================================================================
package projek.andro.profileku;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class menu extends Activity {
protected Button kembali1;
protected Button biodata;
protected Button planing;
protected Button contact;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.menu);
kembali1 = (Button)findViewById(R.id.kembali1);
kembali1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v){
// TODO Auto-generated method stub
gantihalaman1();
}
});
biodata = (Button)findViewById(R.id.biodata);
biodata.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
gantihalaman3();
}
});
planing = (Button)findViewById(R.id.planing);
planing.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
gantihalaman4();
}
});
contact = (Button)findViewById(R.id.contact);
contact.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
gantihalaman5();
}
});
}
public void gantihalaman1(){
Intent gh1 = new Intent(this, wellcome.class);
startActivity(gh1);
}
public void gantihalaman3(){
Intent gh3 = new Intent(this, biodata.class);
startActivity(gh3);
}
public void gantihalaman4(){
Intent gh4 = new Intent(this, planing.class);
startActivity(gh4);
}
public void gantihalaman5(){
Intent gh5 = new Intent(this, contact.class);
startActivity(gh5);
} }
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/backgroud1" >
<Button
android:id="@+id/keluar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="36dp"
android:layout_marginRight="46dp"
android:background="@drawable/keluar1"
android:clickable="true" />
<Button
android:id="@+id/kembali1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/keluar"
android:layout_alignBottom="@+id/keluar"
android:layout_alignParentLeft="true"
android:layout_marginLeft="48dp"
android:background="@drawable/kembali1"
android:clickable="true"
android:onClick="@layout/wellcome" />
<Button
android:id="@+id/biodata"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/kembali1"
android:layout_alignParentTop="true"
android:layout_marginTop="80dp"
android:background="@drawable/icon1" />
<Button
android:id="@+id/planing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/biodata"
android:layout_alignBottom="@+id/biodata"
android:layout_alignRight="@+id/keluar"
android:background="@drawable/icon2" />
<Button
android:id="@+id/contact"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/biodata"
android:layout_marginTop="46dp"
android:layout_toRightOf="@+id/kembali1"
android:background="@drawable/contact" />
</RelativeLayout>
========================================================================
package projek.andro.profileku;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class biodata extends Activity {
protected Button kembali1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.biodata);
kembali1 = (Button)findViewById(R.id.kembali1);
kembali1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
gantihalaman1();
}
});
}
public void gantihalaman1(){
Intent gh1 = new Intent(this, menu.class);
startActivity(gh1);
}
}
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/backgroud1">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="700dp" >
<Gallery
android:id="@+id/gallery1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="83dp"
android:background="@drawable/foto1" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/gallery1"
android:layout_marginLeft="32dp"
android:layout_marginTop="41dp"
android:text="Nama :"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView1"
android:layout_alignBottom="@+id/textView1"
android:layout_toRightOf="@+id/textView1"
android:text="M.Islam Al-Fatih"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView1"
android:layout_below="@+id/textView1"
android:text="NPM :"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/TextView01"
android:layout_alignBottom="@+id/TextView01"
android:layout_alignLeft="@+id/TextView03"
android:text="10215410732"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView04"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/TextView01"
android:layout_below="@+id/TextView01"
android:text="Alamat :"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView05"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/TextView04"
android:layout_alignBottom="@+id/TextView04"
android:layout_alignLeft="@+id/TextView02"
android:layout_alignRight="@+id/TextView03"
android:text="Jl. Kranji Ujung No. 17 Perum Budi Agung,Bogor"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView06"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/TextView05"
android:layout_alignRight="@+id/TextView05"
android:layout_below="@+id/TextView05"
android:layout_marginTop="75dp"
android:text="Sepak Bola, Games, Baca Komik"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/gallery1"
android:layout_below="@+id/TextView06"
android:layout_marginTop="44dp"
android:background="@drawable/keluar1"/>
<Button
android:id="@+id/kembali1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button1"
android:layout_alignLeft="@+id/gallery1"
android:background="@drawable/kembali1" />
<TextView
android:id="@+id/TextView07"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/TextView06"
android:layout_alignBottom="@+id/TextView06"
android:layout_alignLeft="@+id/TextView04"
android:text="Hobi :"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView08"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="42dp"
android:text="PROFILE"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="30dp"
android:textStyle="bold" />
</RelativeLayout>
</ScrollView>
FUTURE PLANING
package projek.andro.profileku;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class planing extends Activity {
protected Button kembali1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.planing);
kembali1 = (Button)findViewById(R.id.kembali1);
kembali1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
gantihalaman1();
}
});
}
public void gantihalaman1(){
Intent gh1 = new Intent(this, menu.class);
startActivity(gh1);
}
}
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgroud1" >
<Button
android:id="@+id/keluar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="36dp"
android:layout_marginRight="46dp"
android:background="@drawable/keluar1" />
<Button
android:id="@+id/kembali1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/keluar"
android:layout_alignBottom="@+id/keluar"
android:layout_alignParentLeft="true"
android:layout_marginLeft="48dp"
android:background="@drawable/kembali1" />
<TextView
android:id="@+id/TextView08"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="37dp"
android:text="FUTURE PLANING"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="30dp"
android:textStyle="bold" />
<Gallery
android:id="@+id/gallery1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/TextView08"
android:layout_centerHorizontal="true"
android:layout_marginTop="15dp"
android:background="@drawable/planing" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/TextView08"
android:layout_alignRight="@+id/TextView08"
android:layout_below="@+id/gallery1"
android:text="Membahagiakan keluarga besar, Lulus kuliah, Mendapatkan penghasilan yang cukup, Melamar Lulu Siti Lubada Binti Ramdhan, Menunaikan ibadah Haji Bersama Istri Tercinta "
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="16.9dp"
android:textStyle="bold" />
</RelativeLayout>
=================================================================
package projek.andro.profileku;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class contact extends Activity {
protected Button kembali1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.contact);
kembali1 = (Button)findViewById(R.id.kembali1);
kembali1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
gantihalaman1();
}
});
}
public void gantihalaman1(){
Intent gh1 = new Intent(this, menu.class);
startActivity(gh1);
}
}
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgroud1" >
<Button
android:id="@+id/keluar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="36dp"
android:layout_marginRight="46dp"
android:background="@drawable/keluar1" />
<Button
android:id="@+id/kembali1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/keluar"
android:layout_alignBottom="@+id/keluar"
android:layout_alignParentLeft="true"
android:layout_marginLeft="48dp"
android:background="@drawable/kembali1" />
<TextView
android:id="@+id/TextView08"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="37dp"
android:text="CONTACT"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="30dp"
android:textStyle="bold" />
<Gallery
android:id="@+id/gallery1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/TextView08"
android:layout_centerHorizontal="true"
android:layout_marginTop="15dp"
android:background="@drawable/contact2" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/gallery1"
android:layout_marginLeft="24dp"
android:text="Nomor HP :"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView1"
android:layout_alignBottom="@+id/textView1"
android:layout_toRightOf="@+id/textView1"
android:clickable="true"
android:text="087770978974"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView1"
android:layout_below="@+id/textView1"
android:text="Email :"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/TextView02"
android:layout_alignBottom="@+id/TextView02"
android:layout_alignRight="@+id/TextView01"
android:layout_toRightOf="@+id/TextView02"
android:autoLink="email"
android:clickable="true"
android:text="islamalfatihsitanggang@ymail.com"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
</RelativeLayout>
File > New > Android Project
- Isi nama projectnya, misal Profileku
- Piliih build target dengan android 2.3
- Isi Package name sesuai keinginan anda, misal projek.andro.profileku
- Klik Next 3x
- Isi Activity name dan Layout name sesuai keinginan, misal wellcom
- Klik Finish
Pada folder src> projek.andro.profileku, buat 5 class java lagi seperti :
- biodata
- contact
- planing
- Splash
- menu
pada folder res>layout, buat 5 Layoutnya lagi seperti :
- biodata
- contact
- planing
- Splash
- menu
========================================================================
SPLASH SCREEN
*Splash.java
package projek.andro.profileku;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.MotionEvent;
public class Splash extends Activity {
protected boolean _active = true;
protected int _splashTime = 4000;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
setContentView(R.layout.splash);
// thread for displaying the SplashScreen
Thread splashTread = new Thread() {
@Override
public void run() {
try {
int waited = 0;
while(_active && (waited < _splashTime)) {
sleep(100);
if(_active) {
waited += 100;
}
}
} catch(InterruptedException e) {
// do nothing
} finally {
finish();
Intent newIntent=new Intent(Splash.this,wellcome.class);
startActivityForResult(newIntent,0);
}
}
};
splashTread.start();
}
@Override
public boolean onTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
_active = false;
}
return true;
}
}
*splash.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgroud1" >
<Gallery
android:id="@+id/gallery1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="116dp"
android:background="@drawable/welcome" />
<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/gallery1"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp" />
</RelativeLayout>
Tampilan Plash Screen
========================================================================
WELLCOME
*wellcome.java
package projek.andro.profileku;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.app.ProgressDialog;
public class wellcome extends Activity {
protected Button masuk1;
protected ProgressDialog pd1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
pd1 = ProgressDialog.show(wellcome.this, "Sabar Bro..", "Loading Nih..");
new Thread(){
public void run(){
try{
sleep(2500);
}
catch (Exception e){
Log.e("tag", e.getMessage());
}
pd1.dismiss();
}
} .start();
setContentView(R.layout.wellcome);
masuk1 = (Button)findViewById(R.id.masuk);
masuk1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
gantihalaman2();
}
});
}
public void gantihalaman2(){
Intent gh2 = new Intent(this, menu.class);
startActivity(gh2);
}
}
*wellcome.xml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgroud1" >
<Gallery
android:id="@+id/gallery4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/gallery3"
android:layout_alignParentLeft="true"
android:layout_marginBottom="18dp"
android:background="@drawable/balon2" />
<Gallery
android:id="@+id/gallery3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="21dp"
android:background="@drawable/narutolol" />
<Button
android:background="@drawable/masuk1"
android:id="@+id/masuk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/gallery4"
android:layout_centerHorizontal="true" />
<Gallery
android:id="@+id/gallery1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/masuk"
android:layout_centerHorizontal="true"
android:layout_marginBottom="22dp"
android:background="@drawable/welcome" />
</RelativeLayout>
Tampilan wellcome
Tampilan loading
========================================================================
MENU
*menu.java
package projek.andro.profileku;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class menu extends Activity {
protected Button kembali1;
protected Button biodata;
protected Button planing;
protected Button contact;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.menu);
kembali1 = (Button)findViewById(R.id.kembali1);
kembali1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v){
// TODO Auto-generated method stub
gantihalaman1();
}
});
biodata = (Button)findViewById(R.id.biodata);
biodata.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
gantihalaman3();
}
});
planing = (Button)findViewById(R.id.planing);
planing.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
gantihalaman4();
}
});
contact = (Button)findViewById(R.id.contact);
contact.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
gantihalaman5();
}
});
}
public void gantihalaman1(){
Intent gh1 = new Intent(this, wellcome.class);
startActivity(gh1);
}
public void gantihalaman3(){
Intent gh3 = new Intent(this, biodata.class);
startActivity(gh3);
}
public void gantihalaman4(){
Intent gh4 = new Intent(this, planing.class);
startActivity(gh4);
}
public void gantihalaman5(){
Intent gh5 = new Intent(this, contact.class);
startActivity(gh5);
} }
*menu.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/backgroud1" >
<Button
android:id="@+id/keluar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="36dp"
android:layout_marginRight="46dp"
android:background="@drawable/keluar1"
android:clickable="true" />
<Button
android:id="@+id/kembali1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/keluar"
android:layout_alignBottom="@+id/keluar"
android:layout_alignParentLeft="true"
android:layout_marginLeft="48dp"
android:background="@drawable/kembali1"
android:clickable="true"
android:onClick="@layout/wellcome" />
<Button
android:id="@+id/biodata"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/kembali1"
android:layout_alignParentTop="true"
android:layout_marginTop="80dp"
android:background="@drawable/icon1" />
<Button
android:id="@+id/planing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/biodata"
android:layout_alignBottom="@+id/biodata"
android:layout_alignRight="@+id/keluar"
android:background="@drawable/icon2" />
<Button
android:id="@+id/contact"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/biodata"
android:layout_marginTop="46dp"
android:layout_toRightOf="@+id/kembali1"
android:background="@drawable/contact" />
</RelativeLayout>
Tampilan menu
========================================================================
BIODATA
*biodata.java
package projek.andro.profileku;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class biodata extends Activity {
protected Button kembali1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.biodata);
kembali1 = (Button)findViewById(R.id.kembali1);
kembali1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
gantihalaman1();
}
});
}
public void gantihalaman1(){
Intent gh1 = new Intent(this, menu.class);
startActivity(gh1);
}
}
*biodata.xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/backgroud1">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="700dp" >
<Gallery
android:id="@+id/gallery1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="83dp"
android:background="@drawable/foto1" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/gallery1"
android:layout_marginLeft="32dp"
android:layout_marginTop="41dp"
android:text="Nama :"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView1"
android:layout_alignBottom="@+id/textView1"
android:layout_toRightOf="@+id/textView1"
android:text="M.Islam Al-Fatih"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView1"
android:layout_below="@+id/textView1"
android:text="NPM :"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/TextView01"
android:layout_alignBottom="@+id/TextView01"
android:layout_alignLeft="@+id/TextView03"
android:text="10215410732"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView04"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/TextView01"
android:layout_below="@+id/TextView01"
android:text="Alamat :"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView05"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/TextView04"
android:layout_alignBottom="@+id/TextView04"
android:layout_alignLeft="@+id/TextView02"
android:layout_alignRight="@+id/TextView03"
android:text="Jl. Kranji Ujung No. 17 Perum Budi Agung,Bogor"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView06"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/TextView05"
android:layout_alignRight="@+id/TextView05"
android:layout_below="@+id/TextView05"
android:layout_marginTop="75dp"
android:text="Sepak Bola, Games, Baca Komik"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/gallery1"
android:layout_below="@+id/TextView06"
android:layout_marginTop="44dp"
android:background="@drawable/keluar1"/>
<Button
android:id="@+id/kembali1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button1"
android:layout_alignLeft="@+id/gallery1"
android:background="@drawable/kembali1" />
<TextView
android:id="@+id/TextView07"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/TextView06"
android:layout_alignBottom="@+id/TextView06"
android:layout_alignLeft="@+id/TextView04"
android:text="Hobi :"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView08"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="42dp"
android:text="PROFILE"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="30dp"
android:textStyle="bold" />
</RelativeLayout>
</ScrollView>
=================================================================
*planing.java
package projek.andro.profileku;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class planing extends Activity {
protected Button kembali1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.planing);
kembali1 = (Button)findViewById(R.id.kembali1);
kembali1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
gantihalaman1();
}
});
}
public void gantihalaman1(){
Intent gh1 = new Intent(this, menu.class);
startActivity(gh1);
}
}
*planing.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgroud1" >
<Button
android:id="@+id/keluar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="36dp"
android:layout_marginRight="46dp"
android:background="@drawable/keluar1" />
<Button
android:id="@+id/kembali1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/keluar"
android:layout_alignBottom="@+id/keluar"
android:layout_alignParentLeft="true"
android:layout_marginLeft="48dp"
android:background="@drawable/kembali1" />
<TextView
android:id="@+id/TextView08"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="37dp"
android:text="FUTURE PLANING"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="30dp"
android:textStyle="bold" />
<Gallery
android:id="@+id/gallery1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/TextView08"
android:layout_centerHorizontal="true"
android:layout_marginTop="15dp"
android:background="@drawable/planing" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/TextView08"
android:layout_alignRight="@+id/TextView08"
android:layout_below="@+id/gallery1"
android:text="Membahagiakan keluarga besar, Lulus kuliah, Mendapatkan penghasilan yang cukup, Melamar Lulu Siti Lubada Binti Ramdhan, Menunaikan ibadah Haji Bersama Istri Tercinta "
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="16.9dp"
android:textStyle="bold" />
</RelativeLayout>
Tampilan Planing
=================================================================
CONTACT
*contact.java
package projek.andro.profileku;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class contact extends Activity {
protected Button kembali1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.contact);
kembali1 = (Button)findViewById(R.id.kembali1);
kembali1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
gantihalaman1();
}
});
}
public void gantihalaman1(){
Intent gh1 = new Intent(this, menu.class);
startActivity(gh1);
}
}
*contact.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgroud1" >
<Button
android:id="@+id/keluar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="36dp"
android:layout_marginRight="46dp"
android:background="@drawable/keluar1" />
<Button
android:id="@+id/kembali1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/keluar"
android:layout_alignBottom="@+id/keluar"
android:layout_alignParentLeft="true"
android:layout_marginLeft="48dp"
android:background="@drawable/kembali1" />
<TextView
android:id="@+id/TextView08"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="37dp"
android:text="CONTACT"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="30dp"
android:textStyle="bold" />
<Gallery
android:id="@+id/gallery1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/TextView08"
android:layout_centerHorizontal="true"
android:layout_marginTop="15dp"
android:background="@drawable/contact2" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/gallery1"
android:layout_marginLeft="24dp"
android:text="Nomor HP :"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView1"
android:layout_alignBottom="@+id/textView1"
android:layout_toRightOf="@+id/textView1"
android:clickable="true"
android:text="087770978974"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView1"
android:layout_below="@+id/textView1"
android:text="Email :"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
<TextView
android:id="@+id/TextView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/TextView02"
android:layout_alignBottom="@+id/TextView02"
android:layout_alignRight="@+id/TextView01"
android:layout_toRightOf="@+id/TextView02"
android:autoLink="email"
android:clickable="true"
android:text="islamalfatihsitanggang@ymail.com"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textStyle="bold" />
</RelativeLayout>
Tampilan contact