UTS Mobile Programing

TUGAS UTS MOBILE PROGRAMING
APLIKASI LISTVIEW MENGGUNAKAN LOGIN ANDROID STUDIO
"HEWAN YANG DILINDUNGI DI INDONESIA"


1. Deskripsi
Aplikasi mobile untuk memberi pengetahuan dan edukasi tentang hewan-hewan yang dilindungi di Indonesia.

2&3. XML Text Dan XML Graphic
- Activity_main.xml



<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:app="http://schemas.android.com/apk/res-auto"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:orientation="vertical"

    android:background="@drawable/back"

    tools:context=".MainActivity">



    <ImageView

        android:layout_width="300dp"

        android:layout_height="200dp"

        android:src="@drawable/login"

        android:layout_gravity="center"

        android:layout_marginTop="20sp"/>



    <EditText

        android:layout_width="match_parent"

        android:layout_height="50dp"

        android:id="@+id/txtUsername"

        android:inputType="text"

        android:layout_marginLeft="10dp"

        android:layout_marginRight="10dp"

        android:hint="Masukkan Username"

        android:textColor="#424242"

        android:textColorHint="#bdbdbd"/>



    <EditText

        android:layout_width="match_parent"

        android:layout_height="50dp"

        android:id="@+id/txtPassword"

        android:inputType="textPassword"

        android:layout_marginLeft="10dp"

        android:layout_marginRight="10dp"

        android:hint="Masukkan Password"

        android:textColor="#424242"

        android:textColorHint="#bdbdbd"/>

    <Button

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:id="@+id/btnLogin"

        android:layout_marginLeft="20dp"

        android:layout_marginRight="20dp"

        android:layout_marginTop="30dp"

        android:backgroundTint="#FF0000FF"

        android:padding="20sp"

        android:text="login"

        android:textColor="#FF000000"

        android:textSize="16sp"

        android:textStyle="bold"/>



</LinearLayout>



-Activity_menu_utama.xml

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:app="http://schemas.android.com/apk/res-auto"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    tools:context=".MenuUtama">



    <ListView

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:background="@color/greensea"

        android:id="@+id/ListView1"

        android:layout_centerHorizontal="true"

        android:layout_centerVertical="true">



    </ListView>



</RelativeLayout>



-Activity_anoa.xml



<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:app="http://schemas.android.com/apk/res-auto"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    tools:context=".Anoa">



    <ScrollView

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:id="@+id/activity_main"

        android:background="@color/greensea">



        <LinearLayout

            android:layout_width="match_parent"

            android:layout_height="wrap_content"

            android:orientation="vertical">

            <FrameLayout

                android:layout_width="match_parent"

                android:layout_height="wrap_content">

                <ImageView

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:adjustViewBounds="true"

                    android:scaleType="fitXY"

                    android:src="@drawable/anoa"/>

            </FrameLayout>

            <TextView

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:layout_margin="16dp"

                android:text="ANOA"

                android:textSize="32sp"

                android:textStyle="bold"

                android:textAlignment="center"

                android:textColor="@android:color/black"/>

            <TableLayout

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:layout_marginLeft="16dp"

                android:layout_marginRight="16dp"

                android:layout_marginBottom="16dp">

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Kingdom"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Animalia"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Filum"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Chordata"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Kelas"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Mammalia"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Ordo"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Artiodactyla"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Family"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Bovidae"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Genus"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Bubalus"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Spesies"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="B. Depressicornis, B. Quarlesi"

                        android:textColor="@android:color/black"/>

                </TableRow>

            </TableLayout>

            <TextView

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:text="@string/anoa"

                android:layout_margin="10dp"

                android:paddingRight="10dp"

                android:paddingLeft="10dp"

                android:textSize="16sp"

                android:textColor="@android:color/black"/>

        </LinearLayout>



    </ScrollView>



</LinearLayout>



-Activity_badak.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
   
xmlns:app="http://schemas.android.com/apk/res-auto"
   
xmlns:tools="http://schemas.android.com/tools"
   
android:layout_width="match_parent"
   
android:layout_height="match_parent"
   
tools:context=".Badak">

    <ScrollView
       
android:layout_width="match_parent"
       
android:layout_height="match_parent"
       
android:id="@+id/activity_main"
       
android:background="@color/greensea">
        <LinearLayout
           
android:layout_width="match_parent"
           
android:layout_height="wrap_content"
           
android:orientation="vertical">
            <FrameLayout
               
android:layout_width="match_parent"
               
android:layout_height="wrap_content">
                <ImageView
                   
android:layout_width="match_parent"
                   
android:layout_height="wrap_content"
                   
android:adjustViewBounds="true"
                    
android:scaleType="fitXY"
                   
android:src="@drawable/badakcula1"/>
            </FrameLayout>
            <TextView
               
android:layout_width="match_parent"
               
android:layout_height="wrap_content"
                
android:layout_margin="16dp"
               
android:text="BADAK CULA 1"
               
android:textSize="32sp"
               
android:textStyle="bold"
               
android:textAlignment="center"
               
android:textColor="@android:color/black"/>
            <TableLayout
               
android:layout_width="match_parent"
               
android:layout_height="wrap_content"
               
android:layout_marginLeft="16dp"
               
android:layout_marginRight="16dp"
                
android:layout_marginBottom="16dp">
                <TableRow
                   
android:layout_width="match_parent"
                   
android:layout_height="wrap_content"
                   
android:layout_marginBottom="8dp">
                    <TextView
                       
android:layout_width="wrap_content"
                       
android:layout_height="wrap_content"
                       
android:textSize="14sp"
                       
android:layout_marginRight="16dp"
                        
android:text="Kingdom"/>
                    <TextView
                       
android:layout_width="match_parent"
                       
android:layout_height="wrap_content"
                       
android:textSize="14sp"
                        
android:layout_weight="1"
                       
android:text="Animalia"
                       
android:textColor="@android:color/black"/>
                </TableRow>
                <TableRow
                   
android:layout_width="match_parent"
                   
android:layout_height="wrap_content"
                   
android:layout_marginBottom="8dp">
                    <TextView
                       
android:layout_width="wrap_content"
                       
android:layout_height="wrap_content"
                       
android:textSize="14sp"
                       
android:layout_marginRight="16dp"
                       
android:text="Filum"/>
                    <TextView
                       
android:layout_width="match_parent"
                       
android:layout_height="wrap_content"
                       
android:textSize="14sp"
                       
android:layout_weight="1"
                       
android:text="Chordata"
                       
android:textColor="@android:color/black"/>
                </TableRow>
                <TableRow
                   
android:layout_width="match_parent"
                   
android:layout_height="wrap_content"
                   
android:layout_marginBottom="8dp">
                    <TextView
                       
android:layout_width="wrap_content"
                       
android:layout_height="wrap_content"
                       
android:textSize="14sp"
                       
android:layout_marginRight="16dp"
                        
android:text="Kelas"/>
                    <TextView
                       
android:layout_width="match_parent"
                       
android:layout_height="wrap_content"
                       
android:textSize="14sp"
                        
android:layout_weight="1"
                       
android:text="Mammalia"
                       
android:textColor="@android:color/black"/>
                </TableRow>
                <TableRow
                   
android:layout_width="match_parent"
                    
android:layout_height="wrap_content"
                   
android:layout_marginBottom="8dp">
                    <TextView
                       
android:layout_width="wrap_content"
                       
android:layout_height="wrap_content"
                       
android:textSize="14sp"
                       
android:layout_marginRight="16dp"
                       
android:text="Ordo"/>
                    <TextView
                       
android:layout_width="match_parent"
                       
android:layout_height="wrap_content"
                       
android:textSize="14sp"
                       
android:layout_weight="1"
                       
android:text="Perissodactyla"
                       
android:textColor="@android:color/black"/>
                </TableRow>
                <TableRow
                   
android:layout_width="match_parent"
                   
android:layout_height="wrap_content"
                   
android:layout_marginBottom="8dp">
                    <TextView
                       
android:layout_width="wrap_content"
                       
android:layout_height="wrap_content"
                       
android:textSize="14sp"
                       
android:layout_marginRight="16dp"
                        
android:text="Family"/>
                    <TextView
                       
android:layout_width="match_parent"
                       
android:layout_height="wrap_content"
                       
android:textSize="14sp"
                        
android:layout_weight="1"
                       
android:text="Rhinocerotidae"
                       
android:textColor="@android:color/black"/>
                </TableRow>
                <TableRow
                   
android:layout_width="match_parent"
                   
android:layout_height="wrap_content"
                   
android:layout_marginBottom="8dp">
                    <TextView
                       
android:layout_width="wrap_content"
                       
android:layout_height="wrap_content"
                       
android:textSize="14sp"
                       
android:layout_marginRight="16dp"
                       
android:text="Genus"/>
                    <TextView
                       
android:layout_width="match_parent"
                       
android:layout_height="wrap_content"
                       
android:textSize="14sp"
                       
android:layout_weight="1"
                       
android:text="Rhinoceros"
                       
android:textColor="@android:color/black"/>
                </TableRow>
                <TableRow
                   
android:layout_width="match_parent"
                   
android:layout_height="wrap_content"
                   
android:layout_marginBottom="8dp">
                    <TextView
                       
android:layout_width="wrap_content"
                       
android:layout_height="wrap_content"
                       
android:textSize="14sp"
                       
android:layout_marginRight="16dp"
                        
android:text="Spesies"/>
                    <TextView
                       
android:layout_width="match_parent"
                       
android:layout_height="wrap_content"
                       
android:textSize="14sp"
                        
android:layout_weight="1"
                       
android:text="R. Sondaicus"
                       
android:textColor="@android:color/black"/>
                </TableRow>
            </TableLayout>
            <TextView
               
android:layout_width="match_parent"
               
android:layout_height="wrap_content"
               
android:text="@string/badak"
               
android:layout_margin="10dp"
               
android:paddingRight="10dp"
               
android:paddingLeft="10dp"
                
android:textSize="16sp"
               
android:textColor="@android:color/black"/>
        </LinearLayout>
    </ScrollView>

</LinearLayout>



-Activity_elangjawa.xml


<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:app="http://schemas.android.com/apk/res-auto"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    tools:context=".ElangJawa">



    <ScrollView

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:id="@+id/activity_main"

        android:background="@color/greensea">



        <LinearLayout

            android:layout_width="match_parent"

            android:layout_height="wrap_content"

            android:orientation="vertical">

            <FrameLayout

                android:layout_width="match_parent"

                android:layout_height="wrap_content">

                <ImageView

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:adjustViewBounds="true"

                    android:scaleType="fitXY"

                    android:src="@drawable/elangjawa"/>



            </FrameLayout>

            <TextView

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:layout_margin="16dp"

                android:text="ELANG JAWA"

                android:textSize="32sp"

                android:textStyle="bold"

                android:textAlignment="center"

                android:textColor="@android:color/black"/>

            <TableLayout

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:layout_marginLeft="16dp"

                android:layout_marginRight="16dp"

                android:layout_marginBottom="16dp">

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Kingdom"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Animalia"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Filum"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Chordata"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Kelas"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Aves"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Ordo"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Accipitriformes"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Family"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Accipitridae"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Genus"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Nisaetus"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Spesies"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="N. Bartelsi"

                        android:textColor="@android:color/black"/>

                </TableRow>

            </TableLayout>

            <TextView

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:text="@string/elang"

                android:layout_margin="10dp"

                android:paddingRight="10dp"

                android:paddingLeft="10dp"

                android:textSize="16sp"

                android:textColor="@android:color/black"/>

        </LinearLayout>



    </ScrollView>



</LinearLayout>



-Activity_harimausum.xml

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:app="http://schemas.android.com/apk/res-auto"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    tools:context=".HarimauSum">



    <ScrollView

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:id="@+id/activity_main"

        android:background="@color/greensea">



        <LinearLayout

            android:layout_width="match_parent"

            android:layout_height="wrap_content"

            android:orientation="vertical">

            <FrameLayout

                android:layout_width="match_parent"

                android:layout_height="wrap_content">

                <ImageView

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:adjustViewBounds="true"

                    android:scaleType="fitXY"

                    android:src="@drawable/harimausumatera"/>



            </FrameLayout>

            <TextView

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:layout_margin="16dp"

                android:text="HARIMAU SUMATERA"

                android:textSize="32sp"

                android:textStyle="bold"

                android:textAlignment="center"

                android:textColor="@android:color/black"/>

            <TableLayout

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:layout_marginLeft="16dp"

                android:layout_marginRight="16dp"

                android:layout_marginBottom="16dp">

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Kingdom"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Animalia"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Filum"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Chordata"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Kelas"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Mammalia"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Ordo"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Carnivora"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Family"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Felidae"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Genus"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Panthera"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Spesies"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="P. Tigris"

                        android:textColor="@android:color/black"/>

                </TableRow>

            </TableLayout>

            <TextView

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:text="@string/harimau"

                android:layout_margin="10dp"

                android:paddingRight="10dp"

                android:paddingLeft="10dp"

                android:textSize="16sp"

                android:textColor="@android:color/black"/>

        </LinearLayout>



    </ScrollView>



</LinearLayout>



-Activity_komodo.xml

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:app="http://schemas.android.com/apk/res-auto"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    tools:context=".Komodo">



    <ScrollView

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:id="@+id/activity_main"

        android:background="@color/greensea">



        <LinearLayout

            android:layout_width="match_parent"

            android:layout_height="wrap_content"

            android:orientation="vertical">

            <FrameLayout

                android:layout_width="match_parent"

                android:layout_height="wrap_content">

                <ImageView

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:adjustViewBounds="true"

                    android:scaleType="fitXY"

                    android:src="@drawable/komodo"/>



            </FrameLayout>

            <TextView

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:layout_margin="16dp"

                android:text="KOMODO"

                android:textSize="32sp"

                android:textStyle="bold"

                android:textAlignment="center"

                android:textColor="@android:color/black"/>

            <TableLayout

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:layout_marginLeft="16dp"

                android:layout_marginRight="16dp"

                android:layout_marginBottom="16dp">

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Kingdom"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text=""

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Filum"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text=""

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Kelas"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text=""

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Ordo"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Squamata"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Family"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Varanidae"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Genus"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Varanus"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Spesies"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Varanus Komodoensis"

                        android:textColor="@android:color/black"/>

                </TableRow>

            </TableLayout>

            <TextView

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:text="@string/komodo"

                android:layout_margin="10dp"

                android:paddingLeft="10dp"

                android:paddingRight="10dp"

                android:textSize="16dp"

                android:textColor="@android:color/black"/>

        </LinearLayout>



    </ScrollView>



</LinearLayout>



-Activity_orangutan.xml

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:app="http://schemas.android.com/apk/res-auto"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    tools:context=".OrangUtan">



    <ScrollView

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:id="@+id/activity_main"

        android:background="@color/greensea">



        <LinearLayout

            android:layout_width="match_parent"

            android:layout_height="wrap_content"

            android:orientation="vertical">

            <FrameLayout

                android:layout_width="match_parent"

                android:layout_height="wrap_content">

                <ImageView

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:adjustViewBounds="true"

                    android:scaleType="fitXY"

                    android:src="@drawable/orangutan"/>



            </FrameLayout>

            <TextView

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:layout_margin="16dp"

                android:text="ORANG UTAN"

                android:textSize="32sp"

                android:textStyle="bold"

                android:textAlignment="center"

                android:textColor="@android:color/black"/>

            <TableLayout

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:layout_marginLeft="16dp"

                android:layout_marginRight="16dp"

                android:layout_marginBottom="16dp">

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Kingdom"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Animalia"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Filum"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Chordata"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Kelas"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Mammalia"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Ordo"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Primata"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Family"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Hominidae"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Genus"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Pongo"

                        android:textColor="@android:color/black"/>

                </TableRow>

                <TableRow

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:layout_marginBottom="8dp">

                    <TextView

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_marginRight="16dp"

                        android:text="Spesies"/>

                    <TextView

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        android:textSize="14sp"

                        android:layout_weight="1"

                        android:text="Pongo Pygmaeus"

                        android:textColor="@android:color/black"/>

                </TableRow>

            </TableLayout>

            <TextView

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:text="@string/orangutan"

                android:layout_margin="10dp"

                android:paddingRight="10dp"

                android:paddingLeft="10dp"

                android:textSize="16sp"

                android:textColor="@android:color/black"/>

        </LinearLayout>



    </ScrollView>



</LinearLayout>



4.Source Coding Java
-MainActivity.java

package com.example.denysupriyadi_161021450456;



import androidx.appcompat.app.AlertDialog;

import androidx.appcompat.app.AppCompatActivity;



import android.content.Intent;

import android.os.Bundle;

import android.text.TextUtils;

import android.view.View;

import android.widget.Button;

import android.widget.EditText;

import android.widget.Toast;



public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    EditText Usn, Pass;

    String username, password;

    Button btn;



    @Override

    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);

        Usn = (EditText)findViewById(R.id.txtUsername);

        Pass = (EditText)findViewById(R.id.txtPassword);

        btn = (Button)findViewById(R.id.btnLogin);

        btn.setOnClickListener(this);

    }



    @Override

    public void onClick(View view) {

        String username = Usn.getText().toString().trim();

        String password = Pass.getText().toString().trim();

        boolean kosongkah = false;

        if (view.getId() == R.id.btnLogin) {

            if (TextUtils.isEmpty(username)) {

                kosongkah = true;

                Usn.setError("Username tidak boleh kosong");

            }

            if (TextUtils.isEmpty(password)) {

                kosongkah = true;

                Pass.setError("Password tidak boleh kosong");

            }



        }

        if (username.equals("admin") && password.equals("admin")) {

            Toast.makeText(getApplicationContext(), "Login Sukses", Toast.LENGTH_SHORT).show();

            Intent i = new Intent(this, MenuUtama.class);

            startActivity(i);

        } else {

            AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);

            builder.setMessage("Username atau Password yang anda masukkan salah, Silahkan Coba lagi!!").setNegativeButton("Retry", null).create().show();

        }



    }

}



-MenuUtama.java


package com.example.denysupriyadi_161021450456;



import androidx.appcompat.app.AppCompatActivity;



import android.content.Intent;

import android.os.Bundle;

import android.view.View;

import android.widget.AdapterView;

import android.widget.ArrayAdapter;

import android.widget.ListView;

import android.widget.Toast;



public class MenuUtama extends AppCompatActivity {

    ListView Tampilan;

    String[]

            hewan={"KOMODO","BADAK","HARIMAU SUMATERA","ELANG JAWA","ANOA",

            "ORANG UTAN","TARSIUS","JALAK BALI","TRENGGILING","BABIRUSA"};

    @Override

    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_menu_utama);

        Tampilan=(ListView)findViewById(R.id.ListView1);

        ArrayAdapter adapter = new

                ArrayAdapter(this,android.R.layout.simple_list_item_1,hewan);



        Tampilan.setAdapter(adapter);

        Tampilan.setOnItemClickListener(new AdapterView.OnItemClickListener() {

            @Override

            public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,

                                    long arg3) {

                int itemke = arg2;

                String itemText = (String) Tampilan.getItemAtPosition(arg2);

                Toast.makeText(getBaseContext(), "Anda Meng Klik " + itemText, Toast.LENGTH_LONG).show();

                if (itemText.equals("KOMODO")) {

                    Intent hewanintent = new Intent(arg0.getContext(), Komodo.class);

                    startActivityForResult(hewanintent, 0);

                } else if (itemText.equals("BADAK")) {

                    Intent hewanintent = new Intent(arg0.getContext(), Badak.class);

                    startActivityForResult(hewanintent, 0);

                } else if (itemText.equals("HARIMAU SUMATERA")) {

                    Intent hewanintent = new Intent(arg0.getContext(), HarimauSum.class);

                    startActivityForResult(hewanintent, 0);

                } else if (itemText.equals("ELANG JAWA")) {

                    Intent hewanintent = new Intent(arg0.getContext(), ElangJawa.class);

                    startActivityForResult(hewanintent, 0);

                } else if (itemText.equals("ANOA")) {

                    Intent hewanintent = new Intent(arg0.getContext(), Anoa.class);

                    startActivityForResult(hewanintent, 0);

                } else if (itemText.equals("ORANG UTAN")) {

                    Intent hewanintent = new Intent(arg0.getContext(), OrangUtan.class);

                    startActivityForResult(hewanintent, 0);

                } else if (itemText.equals("TARSIUS")){

                    Intent hewanintent = new Intent(arg0.getContext(),Tarsius.class);

                    startActivityForResult(hewanintent, 0);

                } else if (itemText.equals("JALAK BALI")) {

                    Intent hewanintent = new Intent(arg0.getContext(), JalakBali.class);

                    startActivityForResult(hewanintent, 0);

                } else if (itemText.equals("TRENGGILING")) {

                    Intent hewanintent = new Intent(arg0.getContext(), Trenggiling.class);

                    startActivityForResult(hewanintent, 0);

                } else if (itemText.equals("BABIRUSA")) {

                    Intent hewanintent = new Intent(arg0.getContext(), Babirusa.class);

                    startActivityForResult(hewanintent, 0);

                }

            }

        });

    }

}




-Anoa.java
package com.example.denysupriyadi_161021450456;



import androidx.appcompat.app.AppCompatActivity;



import android.os.Bundle;



public class Anoa extends AppCompatActivity {



    @Override

    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_anoa);

    }

}



-Komodo.java
package com.example.denysupriyadi_161021450456;



import androidx.appcompat.app.AppCompatActivity;



import android.os.Bundle;



public class Komodo extends AppCompatActivity {



    @Override

    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_komodo);

    }

}



-Badak.java
package com.example.denysupriyadi_161021450456;



import androidx.appcompat.app.AppCompatActivity;



import android.os.Bundle;



public class Badak extends AppCompatActivity {



    @Override

    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_badak);

    }

}



-Harimausum.java
package com.example.denysupriyadi_161021450456;



import androidx.appcompat.app.AppCompatActivity;



import android.os.Bundle;



public class HarimauSum extends AppCompatActivity {



    @Override

    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_harimausum);

    }

}



-ElangJawa.java
package com.example.denysupriyadi_161021450456;



import androidx.appcompat.app.AppCompatActivity;



import android.os.Bundle;



public class ElangJawa extends AppCompatActivity {



    @Override

    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_elangjawa);

    }

}



-OrangUtan.java
package com.example.denysupriyadi_161021450456;



import androidx.appcompat.app.AppCompatActivity;



import android.os.Bundle;



public class OrangUtan extends AppCompatActivity {



    @Override

    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_orangutan);

    }

}



5. Foto Lembar Jawaban UTS


6. Screenshoot Aplikasi
Login


Menu Listview
Isi Listview

7. Demo Video Aplikasi


Nama  : Deny Supriyadi
Nim     : 161021450456
Kelas   : 06TPLM003
Matkul : Mobile Programing

Sekian aplikasi sederhana listview menggunakan login, semoga mampu mendapatkan nilai yang memuaskan. Terimakasih.

Komentar

Postingan populer dari blog ini

Den Hidroponik

Program Sederhana Penjualan Kopi

aplikasi kopi dengan report wizard