You are on page 1of 9

Name : Oshia Alfatra Nathaniel Fasya

Class : X PPLG 1
Activity : PAS GANJIL

GENERAL INFORMATION

1. Modules:

Module Software

Android Studio 2021.2 or higher


Drop Down Menu

2. Project Submission

Use below setting for the project:

Name PAS X PPLG 1

Package Name id.sch.smkpjyakapi.name (Your Name)

Template Empty Activity

Program Language Java

Minimum SDK API 16 : Android 4.1 (Jelly Bean)


3. Grading Scheme:

Module Percentage

Drop Down Menu 100%

4. Schedules:

Time Activity

07.15 – 09.30 PAS


RULES

1. Create a Project Tutorial in Microsoft Word (.PDF) and Upload your Source Code Project in
https://s.id/paspplg1

2. The Committee Will Prepare the Equipment

Participants do not need to bring any equipment except:

● Hardware
No Name Specification

1 PC - Processor Intel Core i5 8500, 3.0 GHz


- RAM DDR4 8 GB or higher
- HDD 500 GB Sata or higher
- Operating System Windows 10

2 Keyboard Any

3 Mouse Any

● Software
No Name Version

1 Android Studio 2021.2 or higher


DROP DOWN WIREFRAME

1. Design 1
2. Design 2

Pertama, masukan code ini ke main_activity.xml


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_margin="16dp"
android:orientation="vertical"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:text="Pengembangan Perangkat Lunak Dan GIM"
android:textSize="24sp" />
<Spinner
android:id="@+id/spinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:backgroundTint="#2ecc71"
android:entries=" @array/android_dropdown_arrays"
android:padding="5dp" />
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="20dp"
android:gravity="bottom|center"
android:text="oshia.smkpjyakapi.sch.id"
android:textSize="24sp"
android:textStyle="bold" />
</LinearLayout>

Lalu masukan code ini ke strings.xml


<resources>
<string name="app_name">PAS X PPLG 1</string>
<string-array name="android_dropdown_arrays">
<item>Kompetensi Keahlian PPLG:</item>
<item>Teknik Pemrograman Komputer</item>
<item>Perancangan Perangkat Lunak Komputer</item>
<item>Perancangan Basis Data Komputer</item>
<item>Pemrograman Aplikasi Mobile</item>
<item>Pemrograman Website</item>
<item>Pemrograman Berbasis Dekstop</item>
<item>Produk Kreatif Digital</item>
</string-array>
</resources>

Dan yang terakhir Masukan code ini ke MainActivity.java

package id.sch.smkpjyakapi.oshia;

import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;
import android.view.View;
import android.widget.Spinner;
import android.widget.AdapterView;

public class MainActivity extends AppCompatActivity {


private Spinner spinner_;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
spinner_= findViewById(R.id.spinner);
spinner_.setOnItemSelectedListener(new ItemSelectedListener());
}
public class ItemSelectedListener implements AdapterView.OnItemSelectedListener {
String item_ = String.valueOf(spinner_.getSelectedItem());
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
String item2_ = String.valueOf(spinner_.getSelectedItem());
if (item_ != item2_) {
Toast.makeText(parent.getContext(),
"Kamu memilih: "+ parent.getItemAtPosition(pos).toString(),
Toast.LENGTH_LONG).show()
;
}
}
public void onNothingSelected(AdapterView<?> args_) {}
}
}

Hasil :

You might also like