Listing Program MainActivity.java package com.pakarkepribadian; import import import import import
android.os.Bundle; android.app.TabActivity; android.content.Intent; android.content.res.Resources; android.widget.TabHost;
public class MainActivity extends TabActivity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Resources res = getResources(); TabHost tabhost = getTabHost(); TabHost.TabSpec spec; Intent intent; intent = new Intent().setClass(this, BerandaActivity.class); //content pada tab yang akan kita buat spec = tabhost.newTabSpec("home").setIndicator("",res.getDrawable(R.d rawable.iconhome)).setContent(intent); //mengeset nama tab dan mengisi content pada menu tab anda. tabhost.addTab(spec); //untuk membuat tabbaru disini bisa diatur sesuai keinginan anda intent = new Intent().setClass(this, InfoActivity.class); spec = tabhost.newTabSpec("info").setIndicator("",res.getDrawable(R.d rawable.iconinfo)).setContent(intent); tabhost.addTab(spec); intent = new Intent().setClass(this, PetunjukActivity.class); spec = tabhost.newTabSpec("petunjuk").setIndicator("",res.getDrawable (R.drawable.iconpetunjuk)).setContent(intent); tabhost.addTab(spec); intent = new Intent().setClass(this, ciri.class); spec = tabhost.newTabSpec("ciri").setIndicator("",res.getDrawable(R.d rawable.iconplay)).setContent(intent); tabhost.addTab(spec); } }
Universitas Sumatera Utara
BerandaActivity.java package com.pakarkepribadian; import import import import import
android.app.Activity; android.content.Intent; android.os.Bundle; android.view.View; android.widget.Button;
public class BerandaActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.beranda); // menghubungkan button koleris ke pengertian koleris Button next = (Button) findViewById(R.id.Button01); next.setOnClickListener(new View.OnClickListener() { public void onClick(View pribadi) { Intent myIntent = new Intent(pribadi.getContext(), koleris.class); startActivityForResult(myIntent, 0); } }); //menghubungkan button sanguinis ke pengertian sanguinis Button next2 = (Button) findViewById(R.id.Button02); next2.setOnClickListener(new View.OnClickListener() { public void onClick(View pribadi) { Intent myIntent = new Intent(pribadi.getContext(), sanguinis.class); startActivityForResult(myIntent, 0); } }); //menghubungkan button melankolis ke pengertian melankolis Button next3 = (Button) findViewById(R.id.Button03); next3.setOnClickListener(new View.OnClickListener() { public void onClick(View pribadi) { Intent myIntent = new Intent(pribadi.getContext(), melankolis.class); startActivityForResult(myIntent, 0); } }); //menghubungkan button plegmatis ke pengertian plegmatis Button next4 = (Button) findViewById(R.id.Button04); next4.setOnClickListener(new View.OnClickListener() { public void onClick(View pribadi) { Intent myIntent = new Intent(pribadi.getContext(), plegmatis.class);
Universitas Sumatera Utara
startActivityForResult(myIntent, 0); } }); } }
Koleris.java package com.pakarkepribadian; import android.app.Activity; import android.os.Bundle; import android.webkit.WebView; public class koleris extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.koleriskepribadian); WebView cirifan = (WebView)findViewById(R.id.WebKoleris); cirifan.loadUrl("file:///android_asset/pengertiankoleris.html" ); } } InfoActivity.java package com.pakarkepribadian; import android.app.Activity; import android.os.Bundle; import android.webkit.WebView; public class InfoActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.info); WebView cirifan = (WebView)findViewById(R.id.WebTentang); cirifan.loadUrl("file:///android_asset/tentangaplikasi.html"); } }
Universitas Sumatera Utara
PetunjukActivity.java package com.pakarkepribadian; import android.app.Activity; import android.os.Bundle; import android.webkit.WebView; public class PetunjukActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.petunjuk); WebView cirifan = (WebView)findViewById(R.id.WebPetunjuk); cirifan.loadUrl("file:///android_asset/petunjuk.html"); } } Ciri.java package com.pakarkepribadian; import java.math.BigDecimal; import import import import import import import import
android.app.Activity; android.content.Intent; android.os.Bundle; android.view.View; android.view.View.OnClickListener; android.widget.Button; android.widget.CheckBox; android.widget.TextView;
public class ciri extends Activity implements OnClickListener { Button btnT1,btnT2,btnT3,btnT4; //arrP adalah deklarasi variabel array untuk tipe kepribadian bertipe double double[]arrP=new double[4]; //arrB adalah deklarasi variable array untuk jumlah bobot bertipe double double []arrB=new double[4]; int Tipe1=1,Tipe2=1,Tipe3=1,Tipe4=1; TextView txtHasil; Button btnPilih;
Universitas Sumatera Utara
CheckBox ckPilih1, ckPilih2,ckPilih3,ckPilih4,ckPilih5,ckPilih6,ckPilih7,ckPilih8 ; CheckBox ckPilih9, ckPilih10,ckPilih11,ckPilih12,ckPilih13,ckPilih14,ckPilih15; CheckBox ckPilih16, ckPilih17,ckPilih18,ckPilih19,ckPilih20,ckPilih21,ckPilih22,ck Pilih23,ckPilih24,ckPilih25; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.ciri); //arrB adalah jumlah bobot untuk masing-masing tipe kepribadian arrB[0]=0.5+0.5+0.5+1+1+1+1; arrB[1]=0.5+0.5+1+1+1+1; arrB[2]=0.5+0.5+0.5+1+1+1; arrB[3]=0.5+0.5+1+1+1+1; txtHasil = (TextView) findViewById (R.id.txtHasil); ckPilih1=(CheckBox) findViewById(R.id.ciri1); ckPilih2=(CheckBox) findViewById(R.id.ciri2); ckPilih3=(CheckBox) findViewById(R.id.ciri3); ckPilih4=(CheckBox) findViewById(R.id.ciri4); ckPilih5=(CheckBox) findViewById(R.id.ciri5); ckPilih6=(CheckBox) findViewById(R.id.ciri6); ckPilih7=(CheckBox) findViewById(R.id.ciri7); ckPilih8=(CheckBox) findViewById(R.id.ciri8); ckPilih9=(CheckBox) findViewById(R.id.ciri9); ckPilih10=(CheckBox) findViewById(R.id.ciri10); ckPilih11=(CheckBox) findViewById(R.id.ciri11); ckPilih12=(CheckBox) findViewById(R.id.ciri12); ckPilih13=(CheckBox) ckPilih14=(CheckBox) ckPilih15=(CheckBox) ckPilih16=(CheckBox) ckPilih17=(CheckBox) ckPilih18=(CheckBox) ckPilih19=(CheckBox) ckPilih20=(CheckBox) ckPilih21=(CheckBox) ckPilih22=(CheckBox) ckPilih23=(CheckBox) ckPilih24=(CheckBox) ckPilih25=(CheckBox)
findViewById(R.id.ciri13); findViewById(R.id.ciri14); findViewById(R.id.ciri15); findViewById(R.id.ciri16); findViewById(R.id.ciri17); findViewById(R.id.ciri18); findViewById(R.id.ciri19); findViewById(R.id.ciri20); findViewById(R.id.ciri21); findViewById(R.id.ciri22); findViewById(R.id.ciri23); findViewById(R.id.ciri24); findViewById(R.id.ciri25);
ckPilih1.setText("Disiplin dan tepat waktu"); ckPilih2.setText("Pendirian yang kuat"); ckPilih3.setText("Suka perubahan, selalu memperbaiki keadaan"); ckPilih4.setText("Suka mengatur");
Universitas Sumatera Utara
ckPilih5.setText("Egois"); ckPilih6.setText("Optimis mencapai tujuan"); ckPilih7.setText("Berjiwa pemimpin"); ckPilih8.setText("Pesimis"); ckPilih9.setText("Lamban menerima hal-hal baru"); ckPilih10.setText("Perfeksionis"); ckPilih11.setText("Setia"); ckPilih12.setText("Perasaannya halus dan sensitif"); ckPilih13.setText("Sangat fokus memikirkan sesuatu"); ckPilih14.setText("Tidak mudah dipengaruhi"); ckPilih15.setText("Menghindari konflik"); ckPilih16.setText("Pemalu"); ckPilih17.setText("Dapat dipercaya"); ckPilih18.setText("Tenang dan tidak terburu-buru"); ckPilih19.setText("Pendengar yang baik"); ckPilih20.setText("Menyukai kegiatan yang spontan"); ckPilih21.setText("Berjiwa sosial yang tinggi"); ckPilih22.setText("Pandai bergaul dan suka banyak teman"); ckPilih23.setText("Percaya diri"); ckPilih24.setText("Ceria dan humoris"); ckPilih25.setText("Kreatif dan inovatif"); btnPilih = (Button)findViewById (R.id.btnTipe); btnPilih.setText(""); btnPilih.setOnClickListener(this); //new myproses() } public void onClick(View v) { switch (v.getId()) { case R.id.btnTipe: if (ckPilih1.isChecked()){ Tipe1=1;arrP[0]=arrP[0]+1*0.5;} if (ckPilih2.isChecked()){ Tipe1=1;arrP[0]=arrP[0]+1*0.5;} if (ckPilih3.isChecked()){ Tipe1=1;;arrP[0]=arrP[0]+1*0.5;} if (ckPilih4.isChecked()){ Tipe1=1;arrP[0]=arrP[0]+1*1;} if (ckPilih5.isChecked()){ Tipe1=1;arrP[0]=arrP[0]+1*1;} if (ckPilih6.isChecked()){ Tipe1=1;arrP[0]=arrP[0]+1*1;} if (ckPilih7.isChecked()){ Tipe1=1;arrP[0]=arrP[0]+1*1;} if (ckPilih8.isChecked()){ Tipe2=1;arrP[1]=arrP[1]+1*0.5;} if (ckPilih9.isChecked()){ Tipe2=1;arrP[1]=arrP[1]+1*0.5;} if (ckPilih10.isChecked()){ Tipe2=1;arrP[1]=arrP[1]+1*1;} if (ckPilih11.isChecked()){ Tipe2=1;arrP[1]=arrP[1]+1*1;} if (ckPilih12.isChecked()){ Tipe2=1;arrP[1]=arrP[1]+1*1;}
Universitas Sumatera Utara
if (ckPilih13.isChecked()){ Tipe2=1;arrP[1]=arrP[1]+1*1;} if (ckPilih14.isChecked()){ Tipe3=1;arrP[2]=arrP[2]+1*0.5;} if (ckPilih15.isChecked()){ Tipe3=1;arrP[2]=arrP[2]+1*0.5;} if (ckPilih16.isChecked()){ Tipe3=1;arrP[2]=arrP[2]+1*0.5;} if (ckPilih17.isChecked()){ Tipe3=1;arrP[2]=arrP[2]+1*1;} if (ckPilih18.isChecked()){ Tipe3=1;arrP[2]=arrP[2]+1*1;} if (ckPilih19.isChecked()){ Tipe3=1;arrP[2]=arrP[2]+1*1;} if (ckPilih20.isChecked()){ Tipe4=1;arrP[3]=arrP[3]+1*0.5;} if (ckPilih21.isChecked()){ Tipe4=1;arrP[3]=arrP[3]+1*0.5;} if (ckPilih22.isChecked()){ Tipe4=1;arrP[3]=arrP[3]+1*1;} if (ckPilih23.isChecked()){ Tipe4=1;arrP[3]=arrP[3]+1*1;} if (ckPilih24.isChecked()){ Tipe4=1;arrP[3]=arrP[3]+1*1;} if (ckPilih25.isChecked()){ Tipe4=1;arrP[3]=arrP[3]+1*1;} setContentView(R.layout.hasil); //perhitungan koleris float val1 = Float.parseFloat(String.valueOf(arrP[0])); float val2 = Float.parseFloat(String.valueOf(arrB[0])); float val3 = Float.parseFloat(String.valueOf(arrP[1])); float val4 = Float.parseFloat(String.valueOf(arrB[1])); float val5 = Float.parseFloat(String.valueOf(arrP[2])); float val6 = Float.parseFloat(String.valueOf(arrB[2])); float val7 = Float.parseFloat(String.valueOf(arrP[3])); float val8 = Float.parseFloat(String.valueOf(arrB[3])); float pb=((val1/val2 * 100)/((val1/val2 * 100)+(val3/val4 * 100)+(val5/val6 * 100)+(val7/val8 * 100))) * 100; String pbk=Float.toString(pb); Double d_pb = Double.parseDouble(pbk); String pbs = ss(String.valueOf(bulat(d_pb))); //hasil dari button koleris btnT1 = (Button)findViewById (R.id.hslBtn1); btnT1.setText("KOLERIS ("+pbs+" %)"); btnT1.setOnClickListener(new View.OnClickListener() { public void onClick(View pribadi) { Intent myIntent = new Intent(pribadi.getContext(),hasilkoleris.class); startActivityForResult(myIntent, 0); } });
Universitas Sumatera Utara
//perhitungan melankolis float val9 = Float.parseFloat(String.valueOf(arrP[0])); float val10 = Float.parseFloat(String.valueOf(arrB[0])); float val11 = Float.parseFloat(String.valueOf(arrP[1])); float val12 = Float.parseFloat(String.valueOf(arrB[1])); float val13 = Float.parseFloat(String.valueOf(arrP[2])); float val14 = Float.parseFloat(String.valueOf(arrB[2])); float val15 = Float.parseFloat(String.valueOf(arrP[3])); float val16 = Float.parseFloat(String.valueOf(arrB[3])); float pc=((val11/val12 * 100)/((val9/val10 * 100)+(val11/val12 * 100)+(val13/val14 * 100)+(val15/val16 * 100))) * 100; String spc = String.valueOf(pc); Double d_pc = Double.parseDouble(spc); String pcs=ss(String.valueOf(bulat(d_pc))); btnT2= (Button)findViewById (R.id.hslBtn2); btnT2.setText("MELANKOLIS ("+pcs+" %)"); btnT2.setOnClickListener(new View.OnClickListener() { public void onClick(View pribadi) { Intent myIntent = new Intent(pribadi.getContext(),hasilmelankolis.class); startActivityForResult(myIntent, 0); } }); //perhitungan plegmatis float val17 = Float.parseFloat(String.valueOf(arrP[0])); float val18 = Float.parseFloat(String.valueOf(arrB[0])); float val19 = Float.parseFloat(String.valueOf(arrP[1])); float val20 = Float.parseFloat(String.valueOf(arrB[1])); float val21 = Float.parseFloat(String.valueOf(arrP[2])); float val22 = Float.parseFloat(String.valueOf(arrB[2])); float val23 = Float.parseFloat(String.valueOf(arrP[3])); float val24 = Float.parseFloat(String.valueOf(arrB[3])); float pd=((val21/val22 * 100)/((val17/val18 * 100)+(val19/val20 * 100)+(val21/val22 * 100)+(val23/val24 * 100))) * 100; String spd = String.valueOf(pd); Double d_pd = Double.parseDouble(spd); String pds=ss(String.valueOf(bulat(d_pd))); btnT3= (Button)findViewById (R.id.hslBtn3); btnT3.setText("PLEGMATIS ("+pds+" %)"); btnT3.setOnClickListener(new View.OnClickListener() { public void onClick(View pribadi) { Intent myIntent = new Intent(pribadi.getContext(),hasilplegmatis.class); startActivityForResult(myIntent, 0); } });
Universitas Sumatera Utara
//perhitungan sanguinis float val25 = Float.parseFloat(String.valueOf(arrP[0])); float val26 = Float.parseFloat(String.valueOf(arrB[0])); float val27 = Float.parseFloat(String.valueOf(arrP[1])); float val28 = Float.parseFloat(String.valueOf(arrB[1])); float val29 = Float.parseFloat(String.valueOf(arrP[2])); float val30 = Float.parseFloat(String.valueOf(arrB[2])); float val31 = Float.parseFloat(String.valueOf(arrP[3])); float val32 = Float.parseFloat(String.valueOf(arrB[3])); float pe=((val31/val32 * 100)/((val25/val26 * 100)+(val27/val28 * 100)+(val29/val30 * 100)+(val31/val32 * 100))) * 100; String spe = String.valueOf(pe); Double d_pe = Double.parseDouble(spe); String pes=ss(String.valueOf(bulat(d_pe))); btnT4= (Button)findViewById (R.id.hslBtn4); btnT4.setText("SANGUINIS ("+pes+" %)"); btnT4.setOnClickListener(new View.OnClickListener() { public void onClick(View pribadi) { Intent myIntent = new Intent(pribadi.getContext(),hasilsanguinis.class); startActivityForResult(myIntent, 0); } }); } } public static double bulat(double angka){ double r = 0; int decimalPlace = 2; BigDecimal bd = new BigDecimal(angka); bd = bd.setScale(decimalPlace,BigDecimal.ROUND_UP); r = bd.doubleValue(); return r; } public String ss(String in){ String out = ""; String k =
in.substring(in.lastIndexOf(".") + 1);
if(k.equals("0")){ if(in.contains(".")) { String parts[] = in.split("\\."); out = parts[0]; } } else{ out = in;
Universitas Sumatera Utara
} return out; } } //end
HasilKoleris.java package com.pakarkepribadian; import android.app.Activity; import android.os.Bundle; import android.webkit.WebView; public class hasilkoleris extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.kolerissolusi);
WebView cirifan = (WebView)findViewById(R.id.WebKolerisSolusi); cirifan.loadUrl("file:///android_asset/kolerissolusi.html "); } } Main.xml
Universitas Sumatera Utara
android:layout_height="fill_parent" android:layout_gravity="bottom" /> Beranda.xml
<Button android:id="@+id/Button01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/koleris1" android:layout_x="37dp" android:layout_y="70dp" /> <Button android:id="@+id/Button02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/sanguinis1" android:layout_x="37dp" android:layout_y="140dp" /> <Button android:id="@+id/Button03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/melankolis1" android:layout_x="37dp" android:layout_y="213dp" /> <Button android:id="@+id/Button04" android:layout_width="wrap_content" android:layout_height="wrap_content"
Universitas Sumatera Utara
android:background="@drawable/plegmatis1" android:layout_x="37dp" android:layout_y="290dp" />
Info.xml <WebView xmlns:android="http://schemas.android.com/apk/res/android " android:id="@+id/WebTentang" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
Petunjuk.xml <WebView xmlns:android="http://schemas.android.com/apk/res/android " android:id="@+id/WebPetunjuk" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
Ciri.xml <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:scrollbars="vertical" xmlns:android="http://schemas.android.com/apk/res/an droid">
Universitas Sumatera Utara
android:background="@drawable/pink" android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/an droid">
=
=
=
=
=
=
Universitas Sumatera Utara
"#000000" android:layout_height="wrap_content">
=
=
=
=
=
=
=
=
=
=
Universitas Sumatera Utara
"#000000" android:layout_height="wrap_content">
=
=
=
=
=
=
=
=
=
Universitas Sumatera Utara
android:id = "@+id/txtHasil" android:layout_width = "fill_parent" android:layout_height= "wrap_content" android:text = ""/> <Button android:layout_gravity="center" android:id="@+id/btnTipe" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/play3" android:onClick="" /> Hasil.xml
<Button android:id="@+id/hslBtn1" android:layout_width="250px" android:layout_height="wrap_content" android:layout_marginTop = "30dp" android:textColor="#ff3333" android:textStyle="bold" android:text="Tipe 1" android:layout_gravity="center" android:onClick="">
Universitas Sumatera Utara
<Button android:id="@+id/hslBtn2" android:layout_width="250px" android:layout_height="wrap_content" android:textColor="#ff3333" android:textStyle="bold" android:text="Tipe 2" android:layout_gravity="center" android:onClick=""> <Button android:id="@+id/hslBtn3" android:layout_width="250px" android:layout_height="wrap_content" android:textColor="#ff3333" android:textStyle="bold" android:text="Tipe 3" android:layout_gravity="center" android:onClick=""> <Button android:id="@+id/hslBtn4" android:layout_width="250px" android:layout_height="wrap_content" android:textColor="#ff3333" android:textStyle="bold" android:text="Tipe 4" android:layout_gravity="center" android:onClick=""> Koleriskepribadian.xml <WebView xmlns:android="http://schemas.android.com/apk/res/android " android:id="@+id/WebKoleris" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> Kolerissolusi.xml
Universitas Sumatera Utara
<WebView xmlns:android="http://schemas.android.com/apk/res/android " android:id="@+id/WebKolerisSolusi" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
AndroidManifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android " package="com.pakarkepribadian" android:versionCode="1" android:versionName="1.0">
< /activity>
Universitas Sumatera Utara
Universitas Sumatera Utara
<uses-sdk android:minSdkVersion="8" />
Universitas Sumatera Utara
DAFTAR RIWAYAT HIDUP Saya yang bertanda tangan dibawah ini:
DATA PRIBADI Nama Alamat Hp E-Mail Tempat/Tanggal Lahir Jenis Kelamin Status
: Tiany Dwi Lestari : Jl. Angsana V No.82 Blok 16 Perumnas Helvetia Medan : 087766092168 :
[email protected] : Medan, 8 Juni 1992 : Perempuan : Belum Menikah
PENDIDIKAN 1998-2004 2004-2007 2007-2010 2010-2013 2013-2015
: SD IKAL Medan : SMP Negeri 18 Medan : SMA Swasta Kartika I-2 Medan : D3 Teknik Informatika Universitas Sumatera Utara : Ekstensi S-1 Ilmu Komputer Universitas Sumatera Utara
SEMINAR
Seminar Nasional Literasi Informasi (SENARAI) Universitas Sumatera Utara.
Demikianlah Daftar Riwayat Hidup ini saya perbuat dengan sebenarnya.
Hormat Saya,
Tiany Dwi Lestari
Universitas Sumatera Utara