Kode Program Layout xml dan tampilan UI graphical
1. Layout Splash
<RelativeLayout xmlns:android="http://schemas.android.c...
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:contex...
android:background="@drawable/animal"
android:src="@drawable/animal" />
<ImageButton
android:id="@+id/imgabout"
android:la...
3. Layout Deskripsi
4. Layout Angka
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.and...
android:id="@+id/gallery1"
android:layout_width="fill_parent"
android:layout_height="100px" >
</Gallery>
<ImageView
androi...
</TextView>
<Gallery
android:id="@+id/gallery1"
android:layout_width="fill_parent"
android:layout_height="100px" >
</Galle...
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#ffffffff"
android:text="@stri...
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</FrameLayout>
<TextView
android:la...
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ImageView
android:layout_width="wrap_content"
...
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background_2"
android...
Upcoming SlideShare
Loading in...5
×

Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)

916

Published on

coding dan layout xml serta tampilan ui graphical pembuatan aplikasi di eclipse (android) mobile

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
916
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
42
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)"

  1. 1. Kode Program Layout xml dan tampilan UI graphical 1. Layout Splash <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/background" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".Splash" > <ProgressBar android:id="@+id/progressBar1" style="?android:attr/progressBarStyleLarge" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" /> </RelativeLayout> 2. Layout Isi Kamus (Menu) <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/menuutama" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin"
  2. 2. android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".IsiKamus" > <ImageButton android:id="@+id/imgangka" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_marginRight="15dp" android:layout_marginTop="75dp" android:layout_toLeftOf="@+id/imgbuah" android:background="@drawable/numbers" android:src="@drawable/numbers" /> <ImageButton android:id="@+id/imgbuah" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignTop="@+id/imgangka" android:background="@drawable/fruit" android:src="@drawable/fruit" /> <ImageButton android:id="@+id/imgfamily" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/imgbuah" android:layout_below="@+id/imgbuah" android:layout_marginTop="16dp" android:background="@drawable/familys" android:src="@drawable/familys" /> <ImageButton android:id="@+id/imgvehicle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/imgangka" android:layout_alignTop="@+id/imgfamily" android:background="@drawable/vegetable" android:src="@drawable/vehicles" /> <ImageButton android:id="@+id/imgsayuran" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/imgfamily" android:layout_below="@+id/imgfamily" android:layout_marginTop="21dp" android:background="@drawable/vegetable" android:src="@drawable/vegetable" /> <ImageButton android:id="@+id/imghewan" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/imgvehicle" android:layout_alignTop="@+id/imgsayuran"
  3. 3. android:background="@drawable/animal" android:src="@drawable/animal" /> <ImageButton android:id="@+id/imgabout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/imgsayuran" android:layout_below="@+id/imgsayuran" android:layout_marginTop="22dp" android:background="@drawable/tentang" android:src="@drawable/tentang" /> <ImageButton android:id="@+id/imgexit" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/imghewan" android:layout_alignTop="@+id/imgabout" android:background="@drawable/exit" android:src="@drawable/exit" /> </RelativeLayout>
  4. 4. 3. Layout Deskripsi 4. Layout Angka <?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:background="@drawable/backgroundangka" android:orientation="vertical" > <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" /> </FrameLayout> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="ANGKA | NUMBER" android:textColor="#ffff00ff" android:background="#ffffffff"> </TextView> <Gallery
  5. 5. android:id="@+id/gallery1" android:layout_width="fill_parent" android:layout_height="100px" > </Gallery> <ImageView android:id="@+id/image1" android:layout_width="320px" android:layout_height="250px" android:scaleType="fitXY" /> </LinearLayout> 5. Layout Buah <?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:background="@drawable/backgroundfruits" android:orientation="vertical" > <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" /> </FrameLayout> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#ffffffff" android:text="@string/buah" android:textColor="#ffff00ff" >
  6. 6. </TextView> <Gallery android:id="@+id/gallery1" android:layout_width="fill_parent" android:layout_height="100px" > </Gallery> <ImageView android:id="@+id/image1" android:layout_width="320px" android:layout_height="250px" android:scaleType="fitXY" /> </LinearLayout> 6. Layout Family (Keluarga) <?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:background="@drawable/backgroundkeluarga" android:orientation="vertical" > <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" /> </FrameLayout> <TextView
  7. 7. android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#ffffffff" android:text="@string/familyku" android:textColor="#ffff00ff" > </TextView> <Gallery android:id="@+id/gallery1" android:layout_width="fill_parent" android:layout_height="100px" > </Gallery> <ImageView android:id="@+id/image1" android:layout_width="320px" android:layout_height="250px" android:scaleType="fitXY" /> </LinearLayout> 7. Layout Hewan <?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:background="@drawable/backroundhewan" android:orientation="vertical" > <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" >
  8. 8. <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" /> </FrameLayout> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#ffffffff" android:text="@string/hewan" android:textColor="#ffff00ff" > </TextView> <Gallery android:id="@+id/gallery1" android:layout_width="fill_parent" android:layout_height="100px" > </Gallery> <ImageView android:id="@+id/image1" android:layout_width="320px" android:layout_height="250px" android:scaleType="fitXY" /> </LinearLayout> 8. Layout Kendaraan <?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:background="@drawable/transportationbackground" android:orientation="vertical" > <FrameLayout
  9. 9. android:layout_width="wrap_content" android:layout_height="wrap_content" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" /> </FrameLayout> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#ffffffff" android:text="@string/kendaraan" android:textColor="#ffff00ff" > </TextView> <Gallery android:id="@+id/gallery1" android:layout_width="fill_parent" android:layout_height="100px" > </Gallery> <ImageView android:id="@+id/image1" android:layout_width="320px" android:layout_height="250px" android:scaleType="fitXY" /> </LinearLayout> 9. Layout Sayur <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/LinearLayout1"
  10. 10. android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/background_2" android:orientation="vertical" > <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" /> </FrameLayout> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#ffffffff" android:text="SAYURAN | VEGETABLES" android:textColor="#ffff00ff" > </TextView> <Gallery android:id="@+id/gallery1" android:layout_width="fill_parent" android:layout_height="100px" > </Gallery> <ImageView android:id="@+id/image1" android:layout_width="320px" android:layout_height="250px" android:scaleType="fitXY" /> </LinearLayout>

×