Aplikasi yang di buat ini menggunakan eclipse Helios menggunakan JDK 7, ADT 20.03 dan android-sdk-windows Aplikasi ini di bangun dan di jalankan menggunakan Android Virtual Device android 2.2 API level 8 Untuk membuat aplikasi Data Diri ini, kita perlu membuat Project terlebih dahulu. Langkah langkah untuk membuat Project yakni:
- Melalui menu File > New > Android Project. Atau dapat juga melalui Button New yang ada pada Toolbars. Jika Tidak ada, maka pilih Project pada suv menu New, kemudain pada dialog New Project, pilih Android > Android Project.
- Pada dialog new Android Project, beri nama Project dengan nama ”Sesuai yang anda mau”. Kalo disisini saya membuat dengan nama "Tugas_Murni".
- Pilih build target menjadi Android 2.2, Kemudian pilih Next >.
Gambar 1.1: Android Project |
- Seting konfigurasi icon, Kemudian pilih Next >.
Gambar 1.2: konfigurasi icon |
- Kemudian Centang Create Aktivity pilih BlankAktivity, Kemudian pilih Next >.
Gambar 1.3:Centang Create Aktivity |
- Kemudian isi New Blank Activity, Sesuai yang anda inginkan. Kemudian pilih Finish >.
Gambar 1.4:New Blank Activity |
Membuat Activity di Aplikasi Data diri
Activity dalam Android adalah sebuah kelas untuk menjalanakan layout yang berisi interface seperti text view, button, combo box dll. Untuk membuat kelas activity baru caranya klik kanan project -> new -> class.
Kelas - kelas yang dibutuhkan untuk membuat aplikasi data diri disini adalah :
Activity dalam Android adalah sebuah kelas untuk menjalanakan layout yang berisi interface seperti text view, button, combo box dll. Untuk membuat kelas activity baru caranya klik kanan project -> new -> class.
Gamabar 1.5:New class |
Gambar 1.6:Form new class |
Kelas - kelas yang dibutuhkan untuk membuat aplikasi data diri disini adalah :
- AnimasiActivity.java
- Bioadata.java
- Main.java
- masadepan.java
Layout adalah rancangan user interface pada sebuah activity. Android menyediakan XML untuk memudahkan pembuatan layout. File XML bisa dibuat di res/layout
Gambar 1.7: New android XML |
Gambar 1.8: Form new xml |
Layout yang dibutuhkan untuk membuat Aplikasi Data diri ini adalah :
- activity_main.xml
- animasi.xml
- biodata.xml
- rencana.xml
- AnimasiActivity.java
package com.Murni.tugas_murni;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.LayoutAnimationController;
import android.widget.ImageView;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
public class AnimasiActivity extends Activity{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.animasi);
startAnimating();
}
private void startAnimating() {
// TODO Auto-generated method stub
TextView textView1 = (TextView) findViewById(R.id.textView1);
Animation fade1 = AnimationUtils.loadAnimation(this, R.anim.fade_in);
textView1.startAnimation(fade1);
TextView textView4 = (TextView) findViewById(R.id.textView4);
Animation fade5 = AnimationUtils.loadAnimation(this, R.anim.fadein2);
textView4.startAnimation(fade5);
ImageView imageView1 = (ImageView) findViewById(R.id.imageView1);
Animation fade2 = AnimationUtils.loadAnimation(this, R.anim.fadein2);
imageView1.startAnimation(fade2);
TextView textView2 = (TextView) findViewById(R.id.textView2);
Animation fade3 = AnimationUtils.loadAnimation(this, R.anim.fade_in);
textView2.startAnimation(fade3);
TextView textView3 = (TextView) findViewById(R.id.textView3);
Animation fade4 = AnimationUtils.loadAnimation(this, R.anim.fadein2);
textView3.startAnimation(fade4);
TextView textView5 = (TextView) findViewById(R.id.textView5);
Animation fade6 = AnimationUtils.loadAnimation(this, R.anim.fade_in);
textView5.startAnimation(fade6);
fade2.setAnimationListener(new AnimationListener() {
public void onAnimationStart(Animation animation) {
// TODO Auto-generated method stub
}
public void onAnimationRepeat(Animation animation) {
// TODO Auto-generated method stub
}
public void onAnimationEnd(Animation animation) {
// TODO Auto-generated method stub
startActivity(new Intent(AnimasiActivity.this, Main.class));
AnimasiActivity.this.finish();
}
});
Animation spinin = AnimationUtils.loadAnimation(this, R.anim.custom_anim);
LayoutAnimationController controller = new LayoutAnimationController(spinin);
TableLayout table = (TableLayout) findViewById(R.id.tabel1);
TableRow row = (TableRow) table.getChildAt(0);
row.setLayoutAnimation(controller);
}
}
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.LayoutAnimationController;
import android.widget.ImageView;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
public class AnimasiActivity extends Activity{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.animasi);
startAnimating();
}
private void startAnimating() {
// TODO Auto-generated method stub
TextView textView1 = (TextView) findViewById(R.id.textView1);
Animation fade1 = AnimationUtils.loadAnimation(this, R.anim.fade_in);
textView1.startAnimation(fade1);
TextView textView4 = (TextView) findViewById(R.id.textView4);
Animation fade5 = AnimationUtils.loadAnimation(this, R.anim.fadein2);
textView4.startAnimation(fade5);
ImageView imageView1 = (ImageView) findViewById(R.id.imageView1);
Animation fade2 = AnimationUtils.loadAnimation(this, R.anim.fadein2);
imageView1.startAnimation(fade2);
TextView textView2 = (TextView) findViewById(R.id.textView2);
Animation fade3 = AnimationUtils.loadAnimation(this, R.anim.fade_in);
textView2.startAnimation(fade3);
TextView textView3 = (TextView) findViewById(R.id.textView3);
Animation fade4 = AnimationUtils.loadAnimation(this, R.anim.fadein2);
textView3.startAnimation(fade4);
TextView textView5 = (TextView) findViewById(R.id.textView5);
Animation fade6 = AnimationUtils.loadAnimation(this, R.anim.fade_in);
textView5.startAnimation(fade6);
fade2.setAnimationListener(new AnimationListener() {
public void onAnimationStart(Animation animation) {
// TODO Auto-generated method stub
}
public void onAnimationRepeat(Animation animation) {
// TODO Auto-generated method stub
}
public void onAnimationEnd(Animation animation) {
// TODO Auto-generated method stub
startActivity(new Intent(AnimasiActivity.this, Main.class));
AnimasiActivity.this.finish();
}
});
Animation spinin = AnimationUtils.loadAnimation(this, R.anim.custom_anim);
LayoutAnimationController controller = new LayoutAnimationController(spinin);
TableLayout table = (TableLayout) findViewById(R.id.tabel1);
TableRow row = (TableRow) table.getChildAt(0);
row.setLayoutAnimation(controller);
}
}
- animasi.xml
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/kc"
android:id="@+id/tabel1" >
<TableRow >
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="18dp"
android:gravity="center_horizontal"
android:text=".:WELCOME TO MY PROFIL:."
android:textSize="11pt"
android:background="#60afdc"
android:textColor="#efb6db" />
</TableRow>
<TableRow>
<TextView
android:id="@+id/textView4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="Aplikasi Data Diri 1.0"
android:textSize="6pt"
android:background="#60afdc"
android:textColor="#efb6db"/>
</TableRow>
<TableRow >
<ImageView
android:id="@+id/imageView1"
android:paddingTop="30dp"
android:layout_width="wrap_content"
android:layout_height="260dp"
android:layout_marginBottom="91dp"
android:src="@drawable/paris2"
/>
</TableRow>
<TableRow>
<TextView
android:id="@+id/textView3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="Teknik Informatika"
android:textSize="6pt"
android:background="#60afdc"
android:textColor="#efb6db"/>
</TableRow>
<TableRow >
<TextView
android:id="@+id/textView2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="Universitas ibn Khaldun"
android:textSize="8pt"
android:background="#60afdc"
android:textColor="#efb6db"/>
</TableRow>
<TableRow>
<TextView
android:id="@+id/textView5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="Copyright©2012 Murni Handayani"
android:textSize="6pt"
android:background="#60afdc"
android:textColor="#efb6db"/>
</TableRow>
</TableLayout>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/kc"
android:id="@+id/tabel1" >
<TableRow >
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="18dp"
android:gravity="center_horizontal"
android:text=".:WELCOME TO MY PROFIL:."
android:textSize="11pt"
android:background="#60afdc"
android:textColor="#efb6db" />
</TableRow>
<TableRow>
<TextView
android:id="@+id/textView4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="Aplikasi Data Diri 1.0"
android:textSize="6pt"
android:background="#60afdc"
android:textColor="#efb6db"/>
</TableRow>
<TableRow >
<ImageView
android:id="@+id/imageView1"
android:paddingTop="30dp"
android:layout_width="wrap_content"
android:layout_height="260dp"
android:layout_marginBottom="91dp"
android:src="@drawable/paris2"
/>
</TableRow>
<TableRow>
<TextView
android:id="@+id/textView3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="Teknik Informatika"
android:textSize="6pt"
android:background="#60afdc"
android:textColor="#efb6db"/>
</TableRow>
<TableRow >
<TextView
android:id="@+id/textView2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="Universitas ibn Khaldun"
android:textSize="8pt"
android:background="#60afdc"
android:textColor="#efb6db"/>
</TableRow>
<TableRow>
<TextView
android:id="@+id/textView5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="Copyright©2012 Murni Handayani"
android:textSize="6pt"
android:background="#60afdc"
android:textColor="#efb6db"/>
</TableRow>
</TableLayout>
Gambar 1.9: Tampilan splash |
###############################################################################
Tambahan dalam membuat splash screen adalah membuat folder anim didalam res, dalam folder anim ada 3 xml yang dibuat (cara membuatnya sama seperti yang sudah saya jelaskan):
- costum_anim.xml
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<rotate
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:duration="2000"
/>
<alpha
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration="2000">
</alpha>
<scale
android:pivotX="50%"
android:pivotY="50%"
android:fromXScale=".1"
android:fromYScale=".1"
android:toXScale="1.0"
android:toYScale="1.0"
android:duration="2000"
/>
</set>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<rotate
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:duration="2000"
/>
<alpha
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration="2000">
</alpha>
<scale
android:pivotX="50%"
android:pivotY="50%"
android:fromXScale=".1"
android:fromYScale=".1"
android:toXScale="1.0"
android:toYScale="1.0"
android:duration="2000"
/>
</set>
- fade_in.xml
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<alpha
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration="2500"
>
</alpha>
</set>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<alpha
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration="2500"
>
</alpha>
</set>
- fadein2.xml
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<alpha
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration="2500"
android:startOffset="2500">
</alpha>
</set>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<alpha
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration="2500"
android:startOffset="2500">
</alpha>
</set>
################################################################################
- Main.java
package com.Murni.tugas_murni;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.View;
import android.widget.ImageView;
import android.view.View.OnClickListener;
public class Main extends Activity {
protected ProgressDialog progressDialog;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
progressDialog = ProgressDialog.show(Main.this, "please wait..", "System is loading");
new Thread(){
public void run(){
try{
sleep(2500);
}
catch (Exception e) {
Log.e("tag",e.getMessage());
// TODO: handle exception
}
//dismiss the`progres dialog
progressDialog.dismiss();
}
}.start();
setContentView(R.layout.activity_main);
ImageView exit = (ImageView)findViewById(R.id.exit);
exit.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
close();
}
});
}
public void profil (View view){
Intent intent1=new Intent (this,Biodata.class);
startActivity(intent1);
}
public void menu (View view){
Intent intent2= new Intent (this,masadepan.class);
startActivity(intent2);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
public void close(){
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Do you want to exit?")
.setCancelable(false)
.setPositiveButton("OK",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int id) {
Main.this.finish();
}
})
.setNegativeButton("Cancel",new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int id) {
dialog.cancel();
}
}).show();
}
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACKSLASH) {
close();
}
return super.onKeyDown(keyCode, event);
}
}
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/awan" >
<RelativeLayout
android:id="@+id/rl1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="106dp" >
</RelativeLayout>
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="95dp"
android:gravity="center_horizontal"
android:text="Selamat Datang"
android:textColor="#efb6db"
android:textSize="15pt"
android:textStyle="bold"
/>
<TextView
android:id="@+id/textView2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginTop="18dp"
android:layout_below="@+id/textView1"
android:gravity="center_horizontal"
android:text="di Aplikasi Data Diri"
android:textColor="#efb6db"
android:textSize="13pt"
android:textStyle="bold" />
<ImageView
android:id="@+id/toga"
android:layout_width="100dp"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:onClick="menu"
android:src="@drawable/toga" />
<ImageView
android:id="@+id/exit"
android:layout_width="90dp"
android:layout_height="50dp"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/toga"
android:layout_marginRight="49dp"
android:onClick="exit"
android:src="@drawable/exit" />
<ImageView
android:id="@+id/profil"
android:layout_width="70dp"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@+id/rl1"
android:onClick="profil"
android:src="@drawable/profil" />
</RelativeLayout>
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
public class Biodata extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.biodata);
}
public void Home(View view){
Intent intent=new Intent (this,Main.class);
startActivity(intent);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
}
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.View;
import android.widget.ImageView;
import android.view.View.OnClickListener;
public class Main extends Activity {
protected ProgressDialog progressDialog;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
progressDialog = ProgressDialog.show(Main.this, "please wait..", "System is loading");
new Thread(){
public void run(){
try{
sleep(2500);
}
catch (Exception e) {
Log.e("tag",e.getMessage());
// TODO: handle exception
}
//dismiss the`progres dialog
progressDialog.dismiss();
}
}.start();
setContentView(R.layout.activity_main);
ImageView exit = (ImageView)findViewById(R.id.exit);
exit.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
close();
}
});
}
public void profil (View view){
Intent intent1=new Intent (this,Biodata.class);
startActivity(intent1);
}
public void menu (View view){
Intent intent2= new Intent (this,masadepan.class);
startActivity(intent2);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
public void close(){
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Do you want to exit?")
.setCancelable(false)
.setPositiveButton("OK",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int id) {
Main.this.finish();
}
})
.setNegativeButton("Cancel",new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int id) {
dialog.cancel();
}
}).show();
}
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACKSLASH) {
close();
}
return super.onKeyDown(keyCode, event);
}
}
- activity_main.xml
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/awan" >
<RelativeLayout
android:id="@+id/rl1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="106dp" >
</RelativeLayout>
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="95dp"
android:gravity="center_horizontal"
android:text="Selamat Datang"
android:textColor="#efb6db"
android:textSize="15pt"
android:textStyle="bold"
/>
<TextView
android:id="@+id/textView2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginTop="18dp"
android:layout_below="@+id/textView1"
android:gravity="center_horizontal"
android:text="di Aplikasi Data Diri"
android:textColor="#efb6db"
android:textSize="13pt"
android:textStyle="bold" />
<ImageView
android:id="@+id/toga"
android:layout_width="100dp"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:onClick="menu"
android:src="@drawable/toga" />
<ImageView
android:id="@+id/exit"
android:layout_width="90dp"
android:layout_height="50dp"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/toga"
android:layout_marginRight="49dp"
android:onClick="exit"
android:src="@drawable/exit" />
<ImageView
android:id="@+id/profil"
android:layout_width="70dp"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@+id/rl1"
android:onClick="profil"
android:src="@drawable/profil" />
</RelativeLayout>
Gambar 1.10: Tampilan Menu Utama |
Gambar 1.11: Tampilan Exit |
Gambar 1.12:Tampilan loading menu utama |
- Biodata.java
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
public class Biodata extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.biodata);
}
public void Home(View view){
Intent intent=new Intent (this,Main.class);
startActivity(intent);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
}
- biodata.xml
<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/awan">
<TableLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/imageView1"
android:layout_marginTop="25dp" >
<TextView
android:id = "@+id/nama"
android:layout_width = "fill_parent"
android:layout_height= "wrap_content"
android:text = "Profil"
android:textSize="15pt"
android:textStyle = "bold"
android:gravity = "center"
android:textColor="#115d89"/>
<ImageView
android:id = "@+id/gambarutama"
android:src = "@drawable/murnihanda"
android:layout_width = "250dp"
android:layout_height= "150dp"
android:layout_gravity = "center"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Nama :"
android:textSize="8pt"
android:gravity="center"
android:textColor="#115d89"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_weight="0.98"
android:text= " Murni Handayani"
android:textSize="9pt"
android:textColor="#115d89"/>
</TableRow>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="NPM :"
android:textSize="8pt"
android:gravity="center"
android:textColor="#115d89"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="10215410194"
android:textSize="8pt"
android:layout_marginLeft="20dp"
android:textColor="#115d89"/>
</TableRow>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Email :"
android:textSize="8pt"
android:gravity="center"
android:textColor="#115d89"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="email"
android:text="murnihanda92@gmail.com"
android:textSize="8pt"
android:layout_marginLeft="20dp"
android:textColor="#115d89"/>
</TableRow>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Alamat :"
android:textSize="8pt"
android:gravity="center"
android:textColor="#115d89"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Kp. cipayung RT 04/ 07 No 22 kel.tengah "
android:textSize="8pt"
android:layout_marginLeft="20dp"
android:textColor="#115d89"/>
</TableRow>
</LinearLayout>
<Button
android:id="@+id/back"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="100dp"
android:background="@drawable/imagebutton"
android:layout_gravity="left"
android:onClick="Home"
android:text="Home"
android:textColor="#10899f"
android:textSize="10pt" />
</TableLayout>
</ScrollView>
Gambar 1.13: Tampilan profil |
################################################################################
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
public class masadepan extends Activity{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.rencana);
}
public void Home(View view){
Intent intent1 = new Intent (this,Main.class);
startActivity(intent1);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}}
- masadepan.java
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
public class masadepan extends Activity{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.rencana);
}
public void Home(View view){
Intent intent1 = new Intent (this,Main.class);
startActivity(intent1);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}}
- rencana.xml
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/rmd"
android:orientation="vertical" >
<TableLayout
android:layout_width="fill_parent"
android:layout_height="200dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/imageView1"
android:layout_marginTop="25dp" >
<TextView
android:id="@+id/textView2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginTop="135dp"
android:gravity="center"
android:text="@string/Rencana"
android:textColor="#115d89"/>
<Button
android:id="@+id/back1"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_marginTop="150dp"
android:background="@drawable/imagebutton"
android:onClick="Home"
android:text="Home"
android:textColor="#10899f"
android:textSize="10pt" />
</TableLayout>
</ScrollView>
Gambar 1.14:Tampilan rencana masa depan |
##################################################################################
Manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.Murni.tugas_murni"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".AnimasiActivity"
android:label="@string/ani">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Main"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Biodata"
android:label="@string/title_activity_biodata">
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".masadepan"
android:label="@string/title_activity_Rencana">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
package="com.Murni.tugas_murni"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".AnimasiActivity"
android:label="@string/ani">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Main"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Biodata"
android:label="@string/title_activity_biodata">
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".masadepan"
android:label="@string/title_activity_Rencana">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
ijin comot.... :)
BalasHapusjejakq : http://ardyne.wordpress.com/
ijin nyoba ya mba...
BalasHapushttp://iqbalds.blogspot.com
Power Supply Titanium / SEGA Mega Drive
BalasHapusI need to titanium body jewelry power my Sega Mega Drive or Genesis for mens titanium wedding rings Genesis. I need the Genesis / Mega Drive for ford titanium a titanium build for kodi full power supply. seiko titanium The only problem is $44.00 · In stock