|
|
- Annabel Bond
- 5 years ago
- Views:
Transcription
1 LAMPIRAN 1
2
3
4
5
6 LAMPIRAN 2 SCREENSHOOT
7
8
9
10
11 LAMPIRAN 3 LISTING
12 FILE JAVA CLASS 1. main_activity.java packagecom.example.sig.sigrs; import android.content.intent; import android.net.uri; import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.view.view; import android.widget.button; import android.widget.imagebutton; import android.widget.toast; import com.example.sig.sigrs.controller.profilactivity; public class MainActivity extends AppCompatActivity { Button btn_navigasi; String goolgemap = "com.google.android.apps.maps"; // identitas package aplikasi google masps android Uri gmmintenturi; Intent mapintent; //String masjid_agung_demak = " , "; // koordinat Masjid Agung Demak /*Deklarasi variable*/ protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); ImageButton BtnMap = (ImageButton) findviewbyid(r.id.btnmap); BtnMap.setOnClickListener(new View.OnClickListener() { public void onclick(view v) { Intent intent = new Intent(MainActivity.this, MapsActivity.class); startactivity(intent); ); ImageButton BtnList = (ImageButton) findviewbyid(r.id.btndaftar); BtnList.setOnClickListener(new View.OnClickListener() { public void onclick(view v) { Intent intent = new Intent(MainActivity.this,ProfilActivity.class); startactivity(intent); ); // menyamakan variable pada layout activity_main.xml ImageButton BtnNavigasi = (ImageButton) findviewbyid(r.id.btnnavigasi); BtnNavigasi.setOnClickListener(new View.OnClickListener() { public void onclick(view v) { mapintent = new Intent(Intent.ACTION_VIEW, gmmintenturi); mapintent.setpackage(goolgemap); if (mapintent.resolveactivity(getpackagemanager())!= null) { startactivity(mapintent); else { Toast.makeText(MainActivity.this, "Google Maps Belum Terinstal. Instal Terlebih Dahulu.", Toast.LENGTH_LONG).show(); );
13 2. maps_activity packagecom.example.sig.sigrs; import android.location.geocoder; import android.support.v4.app.fragmentactivity; import android.os.bundle; import android.view.view; import android.widget.edittext; import com.google.android.gms.maps.cameraupdatefactory; import com.google.android.gms.maps.googlemap; import com.google.android.gms.maps.onmapreadycallback; import com.google.android.gms.maps.supportmapfragment; import com.google.android.gms.maps.model.latlng; import com.google.android.gms.maps.model.markeroptions; import java.io.ioexception; import java.util.list; public class MapsActivityextends FragmentActivity implements OnMapReadyCallback { private GoogleMap mmap; protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_maps); // Obtain the SupportMapFragment and get notified when the map is ready to be used. SupportMapFragment mapfragment = (SupportMapFragment) getsupportfragmentmanager().findfragmentbyid(r.id.map); mapfragment.getmapasync(this); /** * Manipulates the map once available. * This callback is triggered when the map is ready to be used. * This is where we can add markers or lines, add listeners or move the camera. In this case, * we just add a marker near Sydney, Australia. * If Google Play services is not installed on the device, the user will be prompted to install * it inside the SupportMapFragment. This method will only be triggered once the user has * installed Google Play services and returned to the app. */ public void onmapready(googlemap googlemap) { mmap = googlemap; //Sungailiat LatLng Medikastania = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(Medikastania).title("RS. Medika Stania")); mmap.movecamera(cameraupdatefactory.newlatlng(medikastania)); LatLng Soekarno = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(Soekarno).title("RSUP Ir. Soekarno")); mmap.movecamera(cameraupdatefactory.newlatlng(soekarno)); LatLng rsj = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(rsj).title("RSJ Sungailiat")); mmap.movecamera(cameraupdatefactory.newlatlng(rsj)); LatLng rsudsungailiat = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(rsudSungailiat).title("RSUD Sungailiat")); mmap.movecamera(cameraupdatefactory.newlatlng(rsudsungailiat));
14 LatLng Arsani = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(Arsani).title("RS Arsani")); mmap.movecamera(cameraupdatefactory.newlatlng(arsani)); //Pangkalpinang LatLng rsbt = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(rsbt).title("RS. Bakti Timah")); mmap.movecamera(cameraupdatefactory.newlatlng(rsbt)); LatLng DepatiHamzah = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(DepatiHamzah).title("RS. Depati Hamzah")); mmap.movecamera(cameraupdatefactory.newlatlng(depatihamzah)); LatLng Muhaya = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(Muhaya).title("RS. Muhaya")); mmap.movecamera(cameraupdatefactory.newlatlng(muhaya)); LatLng Baktiwara = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(Baktiwara).title("RSK. Bakti Wara")); mmap.movecamera(cameraupdatefactory.newlatlng(baktiwara)); LatLng Intanmedika = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(Intanmedika).title("RS. Intan Medika")); mmap.movecamera(cameraupdatefactory.newlatlng(intanmedika)); LatLng dkt = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(dkt).title("RS. DKT")); mmap.movecamera(cameraupdatefactory.newlatlng(dkt)); LatLng Baznas = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(Baznas).title("Rumah Sehat Baznas")); mmap.movecamera(cameraupdatefactory.newlatlng(baznas)); LatLng Lani = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(Lani).title("RS Bersalin Lani")); mmap.movecamera(cameraupdatefactory.newlatlng(lani)); //Bangka Barat LatLng Sejiransetason = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(Sejiransetason).title("RS. Sejiran Setason")); mmap.movecamera(cameraupdatefactory.newlatlng(sejiransetason)); //Belitung LatLng Almah = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(Almah).title("RS. Almah")); mmap.movecamera(cameraupdatefactory.newlatlng(almah)); LatLng Manggar = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(Manggar).title("RSUD Manggar")); mmap.movecamera(cameraupdatefactory.newlatlng(manggar)); LatLng TanjungPandan = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(TanjungPandan).title("RSUD Tanjung Pandan")); mmap.movecamera(cameraupdatefactory.newlatlng(tanjungpandan)); //Bangka Tengah LatLng Koba = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(Koba).title("RSUD Koba")); mmap.movecamera(cameraupdatefactory.newlatlng(koba)); LatLng Siloam = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(Siloam).title("RS. Siloam")); mmap.movecamera(cameraupdatefactory.newlatlng(siloam));
15 //Bangka Selatan LatLng Toboali = new LatLng( , ); mmap.addmarker(new MarkerOptions().position(Toboali).title("RSUD Toboali")); mmap.movecamera(cameraupdatefactory.newlatlng(toboali)); public void onsearch(view view ) { EditText Location_tf = (EditText) findviewbyid(r.id.tfadress); String location = Location_tf.getText().toString(); List<android.location.Address> addresslist=null; if(location!= null!location.equals("")) { Geocoder geocoder = new Geocoder(this); try { addresslist = geocoder.getfromlocationname(location, 1); catch (IOException e) { e.printstacktrace(); android.location.address address = addresslist.get(0); LatLng latlng = new LatLng(address.getLatitude(), address.getlongitude()); mmap.addmarker(new MarkerOptions().position(latLng).title("Location")); mmap.animatecamera(cameraupdatefactory.newlatlng(latlng)); 3. profil_activity.java packagecom.example.sig.sigrs.controller; import android.app.progressdialog; import android.os.bundle; import android.support.v4.widget.swiperefreshlayout; import android.support.v7.app.appcompatactivity; import android.support.v7.widget.linearlayoutmanager; import android.support.v7.widget.recyclerview; import android.util.log; import android.view.view; import android.widget.textview; import android.widget.toast; import com.example.sig.sigrs.itemadapter; import com.example.sig.sigrs.r; import com.example.sig.sigrs.api.client; import com.example.sig.sigrs.api.service; import com.example.sig.sigrs.model.item; import com.example.sig.sigrs.model.itemresponse; import java.util.list; import retrofit2.call; import retrofit2.callback; import retrofit2.response; public class ProfilActivity extends AppCompatActivity { private RecyclerView recyclerview; TextView Disconnected; private Item item; ProgressDialog pd; private SwipeRefreshLayout swipecontainer;
16 protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_profil); initviews(); swipecontainer = (SwipeRefreshLayout) findviewbyid(r.id.swipecontainer); swipecontainer.setcolorschemeresources(android.r.color.holo_orange_dark); swipecontainer.setonrefreshlistener(new SwipeRefreshLayout.OnRefreshListener(){ public void onrefresh(){ loadjson(); Toast.makeText(ProfilActivity.this, "Rumah Sakit", Toast.LENGTH_SHORT).show(); ); private void initviews(){ pd = new ProgressDialog(this); pd.setmessage("mengambil Data RS..."); pd.setcancelable(false); pd.show(); recyclerview = (RecyclerView) findviewbyid(r.id.recyclerview); recyclerview.setlayoutmanager(new LinearLayoutManager(getApplicationContext())); recyclerview.smoothscrolltoposition(0); loadjson(); private void loadjson(){ Disconnected = (TextView) findviewbyid(r.id.disconnected); try{ Client client= new Client(); Service apiservice = Client.getClient().create(Service.class); Call<ItemResponse> call = apiservice.getitems(); call.enqueue(new Callback<ItemResponse>() { public void onresponse(call<itemresponse> call, Response<ItemResponse> response) { List<Item> items = response.body().getitems(); recyclerview.setadapter(new ItemAdapter(getApplicationContext(), items)); recyclerview.smoothscrolltoposition(0); swipecontainer.setrefreshing(false); pd.hide(); public void onfailure(call<itemresponse> call, Throwable t) { Log.d("Error", t.getmessage()); Toast.makeText(ProfilActivity.this, "Error Fetching Data!", Toast.LENGTH_SHORT).show(); Disconnected.setVisibility(View.VISIBLE); pd.hide(); ); catch (Exception e){ Log.d("Error", e.getmessage()); Toast.makeText(this, e.tostring(), Toast.LENGTH_SHORT).show();
17 4. detail_activity.java packagecom.example.sig.sigrs.controller; import android.os.bundle; import android.support.v7.app.appcompatactivity; import android.view.menu; import android.view.menuinflater; import android.view.menuitem; import android.widget.imageview; import android.widget.textview; import com.bumptech.glide.glide; import com.example.sig.sigrs.r; public class DetailActivity extends AppCompatActivity { TextView nama, alamat, profil; ImageView imageview; public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_detail); getsupportactionbar().setdisplayhomeasupenabled(true); imageview = (ImageView) findviewbyid(r.id.user_image_header); nama = (TextView) findviewbyid(r.id.headernama); alamat = (TextView) findviewbyid(r.id.alamat); profil = (TextView) findviewbyid(r.id.profilrs); String Nama = getintent().getextras().getstring("nama"); String Alamat = getintent().getextras().getstring("alamat"); String Profil = getintent().getextras().getstring("profil"); String Gambar = getintent().getextras().getstring("gambar"); nama.settext(nama); alamat.settext(alamat); profil.settext(profil); Glide.with(this).load(Gambar).placeholder(R.drawable.load).into(imageView); getsupportactionbar().settitle("details Activity"); /* private Intent creareshareforecastintent(){ String Nama = getintent().getextras().getstring("nama"); String Alamat = getintent().getextras().getstring("alamat"); String Profil = getintent().getextras().getstring("profil"); Intent shareintent = ShareCompat.IntentBuilder.from(this).setType("text/plain") */ public boolean oncreateoptionsmenu(menu menu ){ MenuInflater inflater = getmenuinflater(); inflater.inflate(r.menu.detail, menu); MenuItem menuitem = menu.finditem(r.id.action_share); return true;
18 5. item_adapter.java packagecom.example.sig.sigrs; import android.content.context; import android.content.intent; import android.support.v7.widget.recyclerview; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; import android.widget.imageview; import android.widget.textview; import android.widget.toast; import com.example.sig.sigrs.controller.detailactivity; import com.example.sig.sigrs.model.item; import com.squareup.picasso.picasso; import java.util.list; public class ItemAdapter extends RecyclerView.Adapter<ItemAdapter.ViewHolder> { private List<Item>items; private Context context; public ItemAdapter(Context applicationcontext, List<Item> itemarraylist) { this.context = applicationcontext; this.items = itemarraylist; public ItemAdapter.ViewHolder oncreateviewholder(viewgroup viewgroup, int i) { View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.row_user, viewgroup, false); return new ViewHolder(view); public void onbindviewholder(itemadapter.viewholder viewholder, int i) { viewholder.nama.settext(items.get(i).getnama()); viewholder.alamat.settext(items.get(i).getalamat()); viewholder.profil.settext(items.get(i).getprofil()); Picasso.with(context).load(items.get(i).getGambar()).placeholder(R.drawable.load).into(viewHolder.imageView); public int getitemcount() { return items.size(); public class ViewHolder extends RecyclerView.ViewHolder { private TextView nama, Alamat, Profil; private ImageView imageview; public ViewHolder(View view) { super(view); nama = (TextView) view.findviewbyid(r.id.nama); Alamat = (TextView) view.findviewbyid(r.id.alamat); Profil = (TextView) view.findviewbyid(r.id.profil); imageview = (ImageView) view.findviewbyid(r.id.cover); //on item itemview.setonclicklistener(new View.OnClickListener() {
19 public void onclick(view v) { int pos = getadapterposition(); if (pos!= RecyclerView.NO_POSITION) { Item clickeddataitem = items.get(pos); Intent intent = new Intent(context, DetailActivity.class); intent.putextra("nama", items.get(pos).getnama()); intent.putextra("alamat", items.get(pos).getalamat()); intent.putextra("profil", items.get(pos).getprofil()); intent.putextra("gambar", items.get(pos).getgambar()); intent.addflags(intent.flag_activity_new_task); context.startactivity(intent); Toast.makeText(v.getContext(), "Kamu Memilih" + clickeddataitem.getnama(), Toast.LENGTH_SHORT).show(); ); 6. item_response.java packagecom.example.sig.sigrs.model; import com.google.gson.annotations.expose; import com.google.gson.annotations.serializedname; import java.util.list; /** * Created by destyyani on 7/11/17. */ public class private List<Item>items; public List<Item> getitems(){ return items; public void setitems(list<item>items){ this.items = items; 7. item.java packagecom.example.sig.sigrs.model; import com.google.gson.annotations.expose; import com.google.gson.annotations.serializedname; /** * Created by destyyani on 7/11/17. */ public class private private private String Profil;
20 private String Gambar; public Item(String Nama, String Alamat, String Profil, String Gambar){ this.nama = Nama; this.alamat = Alamat; this.profil = Profil; this.gambar = Gambar; public String getnama(){ return Nama; public void setnama(string Nama){ this.nama = Nama; public String getalamat(){ return Alamat; public void setalamat(string Alamat){ this.alamat = Alamat; public String getprofil(){ return Profil; public void setprofil(string Profil){ this.profil = Profil; public String getgambar(){ return Gambar; public void setgambar(string Gambar){ this.gambar = Gambar; 8. service.java packagecom.example.sig.sigrs.api; import com.example.sig.sigrs.model.itemresponse; import retrofit2.call; import retrofit2.http.get; /** * Created by destyyani on 7/11/17. */ public interface Service Call<ItemResponse> getitems();
21 9. client.java packagecom.example.sig.sigrs.api; import retrofit2.retrofit; import retrofit2.converter.gson.gsonconverterfactory; /** * Created by destyyani on 7/11/17. */ public class Client { public static final String BASE_URL = " public static Retrofit retrofit = null; public static Retrofit getclient(){ if (retrofit==null){ retrofit = new Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory.create()).build(); return retrofit;
22 FILE.XML 1. Activity_main.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android=" xmlns:tools=" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.sig.sigrs.mainactivity" android:background="#ffffff" android:contextclickable="false"> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:baselinealignbottom="true" android:adjustviewbounds="true" android:background="#ffffff" android:layout_centerhorizontal="true" android:layout_marginbottom="35dp" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:croptopadding="true" android:background="#ffffff" android:layout_centervertical="true" android:layout_centerhorizontal="true" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:croptopadding="true" android:background="#ffffff" /> </RelativeLayout> 2. Activity_maps.xml <LinearLayout xmlns:android=" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:layout_width="wrap_content"
23 android:layout_height="wrap_content"> <EditText android:layout_width="450dp" android:layout_height="wrap_content" /> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="search" android:layout_gravity="right" android:onclick="onsearch" /> </LinearLayout> <fragment xmlns:android=" xmlns:map=" xmlns:tools=" android:name="com.google.android.gms.maps.supportmapfragment" android:layout_width="wrap_content" android:layout_height="wrap_content" tools:context="com.example.sig.sigrs.mapsactivity" </LinearLayout> 3. Activity Profil.xml <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.swiperefreshlayout xmlns:android=" xmlns:tools=" android:layout_width="match_parent" android:layout_height="match_parent" <android.support.v7.widget.recyclerview android:layout_width="match_parent" android:layout_height="match_parent" android:backgroundtint="#f2f2f2" tools:context=".controller.profilactivity"/> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:textstyle="bold" android:textsize="14sp"/> </android.support.v4.widget.swiperefreshlayout> 4. Activity_Detail.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android=" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView
24 android:layout_width="match_parent" android:layout_height="250dp" android:fitssystemwindows="true" android:scaletype="fitxy"/> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginleft="10dp" android:textalignment="center" android:layout_margintop="10dp" android:textstyle="bold" android:textsize="20dp" <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginleft="10dp" android:textsize="14dp" android:textalignment="center" android:layout_margintop="10dp" <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginleft="10dp" android:textsize="14dp" android:textalignment="center" android:layout_margintop="20dp" </RelativeLayout> 5. Row_user.xml <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.cardview xmlns:android=" android:layout_width="match_parent" android:layout_height="150dp" android:layout_margintop="10dp" android:layout_marginleft="10dp" android:layout_marginright="10dp" android:clickable="true" android:focusable="true" android:elevation="60dp" android:foreground="?android:attr/selectableitembackground"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:layout_width="100dp" android:layout_height="100dp" android:layout_marginleft="20dp" android:layout_margintop="10dp" android:scaletype="fitxy"/>
25 <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="rumah Sakit" android:layout_marginleft="20dp" android:layout_margintop="5dp" android:textappearance="?android:textappearancemedium" android:textstyle="bold"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="alamat" android:layout_marginleft="20dp" android:layout_margintop="5dp" android:textappearance="?android:textappearancesmall" android:textstyle="italic"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="profil" android:layout_marginleft="20dp" android:layout_margintop="5dp" android:textsize="12dp" android:textstyle="normal"/> </RelativeLayout> </android.support.v7.widget.cardview>
26
Android Programs Day 5
Android Programs Day 5 //Android Program to demonstrate the working of Options Menu. 1. Create a New Project. 2. Write the necessary codes in the MainActivity.java to create OptionMenu. 3. Add the oncreateoptionsmenu()
More informationLAMPIRAN PROGRAM. public class Listdata_adiktif extends ArrayAdapter<ModelData_adiktif> {
1 LAMPIRAN PROGRAM JAVA Listdata_adiktif.java package com.example.win.api.adapter; import android.content.context; import android.support.annotation.nonnull; import android.view.layoutinflater; import
More informationAndroid Apps Development for Mobile and Tablet Device (Level I) Lesson 2
Workshop 1. Compare different layout by using Change Layout button (Page 1 5) Relative Layout Linear Layout (Horizontal) Linear Layout (Vertical) Frame Layout 2. Revision on basic programming skill - control
More information05. RecyclerView and Styles
05. RecyclerView and Styles 08.03.2018 1 Agenda Intents Creating Lists with RecyclerView Creating Cards with CardView Application Bar Menu Styles and Themes 2 Intents 3 What is Intent? An Intent is an
More informationMAD ASSIGNMENT NO 3. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept.
MAD ASSIGNMENT NO 3 Submitted by: Rehan Asghar BSSE 7 15126 AUGUST 25, 2017 SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept. MainActivity.java File package com.example.tutorialspoint; import android.manifest;
More informationCSE 660 Lab 3 Khoi Pham Thanh Ho April 19 th, 2015
CSE 660 Lab 3 Khoi Pham Thanh Ho April 19 th, 2015 Comment and Evaluation: This lab introduces us about Android SDK and how to write a program for Android platform. The calculator is pretty easy, everything
More informationTip Calculator. xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
Tip Calculator activity_main.xml
More informationIntents. Your first app assignment
Intents Your first app assignment We will make this. Decidedly lackluster. Java Code Java Code XML XML Preview XML Java Code Java Code XML Buttons that work
More informationLab 6: Google Maps Android API v2 Android Studio 10/14/2016
Lab 6: Google Maps Android API v2 Android Studio 10/14/2016 One of the defining features of mobile phones is their portability. It's not surprising that some of the most enticing APIs are those that enable
More information1. Location Services. 1.1 GPS Location. 1. Create the Android application with the following attributes. Application Name: MyLocation
1. Location Services 1.1 GPS Location 1. Create the Android application with the following attributes. Application Name: MyLocation Project Name: Package Name: MyLocation com.example.mylocation 2. Put
More informationAndroid CardView Tutorial
Android CardView Tutorial by Kapil - Wednesday, April 13, 2016 http://www.androidtutorialpoint.com/material-design/android-cardview-tutorial/ YouTube Video We have already discussed about RecyclerView
More informationCreate Parent Activity and pass its information to Child Activity using Intents.
Create Parent Activity and pass its information to Child Activity using Intents. /* MainActivity.java */ package com.example.first; import android.os.bundle; import android.app.activity; import android.view.menu;
More informationBasic GUI elements - exercises
Basic GUI elements - exercises https://developer.android.com/studio/index.html LIVE DEMO Please create a simple application, which will be used to calculate the area of basic geometric figures. To add
More informationM.A.D ASSIGNMENT # 2 REHAN ASGHAR BSSE 15126
M.A.D ASSIGNMENT # 2 REHAN ASGHAR BSSE 15126 Submitted to: Sir Waqas Asghar MAY 23, 2017 SUBMITTED BY: REHAN ASGHAR Intent in Android What are Intent? An Intent is a messaging object you can use to request
More informationMobile Application Development Lab [] Simple Android Application for Native Calculator. To develop a Simple Android Application for Native Calculator.
Simple Android Application for Native Calculator Aim: To develop a Simple Android Application for Native Calculator. Procedure: Creating a New project: Open Android Stdio and then click on File -> New
More informationEMBEDDED SYSTEMS PROGRAMMING Application Tip: Switching UIs
EMBEDDED SYSTEMS PROGRAMMING 2015-16 Application Tip: Switching UIs THE PROBLEM How to switch from one UI to another Each UI is associated with a distinct class that controls it Solution shown: two UIs,
More informationMAD ASSIGNMENT NO 2. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept.
MAD ASSIGNMENT NO 2 Submitted by: Rehan Asghar BSSE 7 15126 AUGUST 25, 2017 SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept. Android Widgets There are given a lot of android widgets with simplified
More informationPENGEMBANGAN APLIKASI PERANGKAT BERGERAK (MOBILE)
PENGEMBANGAN APLIKASI PERANGKAT BERGERAK (MOBILE) Network Connection Web Service K Candra Brata andra.course@gmail.com Mobille App Lab 2015-2016 Network Connection http://developer.android.com/training/basics/network-ops/connecting.html
More informationEMBEDDED SYSTEMS PROGRAMMING Application Tip: Managing Screen Orientation
EMBEDDED SYSTEMS PROGRAMMING 2016-17 Application Tip: Managing Screen Orientation ORIENTATIONS Portrait Landscape Reverse portrait Reverse landscape ON REVERSE PORTRAIT Android: all four orientations are
More informationAPPENDIX. Application User. MainActivity.java. RegistrationActivity.java
Application User APPENDIX MainActivity.java package com.example.finalproject; import android.content.intent; import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.view.view;
More informationFragment Example Create the following files and test the application on emulator or device.
Fragment Example Create the following files and test the application on emulator or device. File: AndroidManifest.xml
More informationDynamically Create Admob Banner and Interstitial Ads
Dynamically Create Admob Banner and Interstitial Ads activity_main.xml file 0 0 0
More informationData Persistence. Chapter 10
Chapter 10 Data Persistence When applications create or capture data from user inputs, those data will only be available during the lifetime of the application. You only have access to that data as long
More informationTextView Control. EditText Control. TextView Attributes. android:id - This is the ID which uniquely identifies the control.
A TextView displays text to the user. TextView Attributes TextView Control android:id - This is the ID which uniquely identifies the control. android:capitalize - If set, specifies that this TextView has
More informationITU- FAO- DOA- TRCSL. Training on. Innovation & Application Development for E- Agriculture. Shared Preferences
ITU- FAO- DOA- TRCSL Training on Innovation & Application Development for E- Agriculture Shared Preferences 11 th - 15 th December 2017 Peradeniya, Sri Lanka Shahryar Khan & Imran Tanveer, ITU Experts
More informationStatistics http://www.statista.com/topics/840/smartphones/ http://www.statista.com/topics/876/android/ http://www.statista.com/statistics/271774/share-of-android-platforms-on-mobile-devices-with-android-os/
More informationArrays of Buttons. Inside Android
Arrays of Buttons Inside Android The Complete Code Listing. Be careful about cutting and pasting.
More information<uses-permission android:name="android.permission.internet"/>
Chapter 11 Playing Video 11.1 Introduction We have discussed how to play audio in Chapter 9 using the class MediaPlayer. This class can also play video clips. In fact, the Android multimedia framework
More informationandroid:layout_margintop="5dp" > <EditText android:layout_width="210dp"
activity_main.xml
More information<uses-permission android:name="android.permission.internet" />
Listing Program : 1. Android Manifest.xml
More informationStoppUhr. <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="start1"
StoppUhr
More informationEMBEDDED SYSTEMS PROGRAMMING UI Specification: Approaches
EMBEDDED SYSTEMS PROGRAMMING 2016-17 UI Specification: Approaches UIS: APPROACHES Programmatic approach: UI elements are created inside the application code Declarative approach: UI elements are listed
More informationEMBEDDED SYSTEMS PROGRAMMING Application Tip: Saving State
EMBEDDED SYSTEMS PROGRAMMING 2016-17 Application Tip: Saving State THE PROBLEM How to save the state (of a UI, for instance) so that it survives even when the application is closed/killed The state should
More informationAdapter.
1 Adapter An Adapter object acts as a bridge between an AdapterView and the underlying data for that view The Adapter provides access to the data items The Adapter is also responsible for making a View
More informationANDROID PROGRAMS DAY 3
ANDROID PROGRAMS DAY 3 //Android project to navigate from first page to second page using Intent Step 1: Create a new project Step 2: Enter necessary details while creating project. Step 3: Drag and drop
More informationProduced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar
Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology
More informationProduced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar
Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology
More informationFragments. Lecture 11
Fragments Lecture 11 Situational layouts Your app can use different layouts in different situations Different device type (tablet vs. phone vs. watch) Different screen size Different orientation (portrait
More informationAPPENDIX CODE TO STORE THE BUTTON MENU AND MOVE THE PAGE
APPENDIX FILE MainActivity.java CODE TO STORE THE BUTTON MENU AND MOVE THE PAGE package com.ste.sembakoapp; import Android.content.Intent; import Android.support.v7.app.AppCompatActivity; import Android.os.Bundle;
More informationCSE 660 Lab 7. Submitted by: Arumugam Thendramil Pavai. 1)Simple Remote Calculator. Server is created using ServerSocket class of java. Server.
CSE 660 Lab 7 Submitted by: Arumugam Thendramil Pavai 1)Simple Remote Calculator Server is created using ServerSocket class of java Server.java import java.io.ioexception; import java.net.serversocket;
More informationM.A.D Assignment # 1
Submitted by: Rehan Asghar Roll no: BSSE (7) 15126 M.A.D Assignment # 1 Submitted to: Sir Waqas Asghar Submitted by: M. Rehan Asghar 4/25/17 Roll no: BSSE 7 15126 XML Code: Calculator Android App
More informationAppendix A : Android Studio Code For Android
Appendix A : Android Studio Code For Android Monitoring : ` public Pubnub pubnub; public static final String PUBLISH_KEY = "pub-c-798bd0f6-540b-48af-9e98-7d0028a5132a"; public static final String SUBSCRIBE_KEY
More informationApplied Cognitive Computing Fall 2016 Android Application + IBM Bluemix (Cloudant NoSQL DB)
Applied Cognitive Computing Fall 2016 Android Application + IBM Bluemix (Cloudant NoSQL DB) In this exercise, we will create a simple Android application that uses IBM Bluemix Cloudant NoSQL DB. The application
More informationPractical 1.ListView example
Practical 1.ListView example In this example, we show you how to display a list of fruit name via ListView. Android Layout file File : res/layout/list_fruit.xml
More informationLAMPIRAN PROGRAM. public class ListArrayAdapterPost extends ArrayAdapter<ModelDataPost> {
1 LAMPIRAN PROGRAM JAVA ListArrayAdapterPost.java package com.example.win.api.adapter; import android.content.context; import android.support.annotation.nonnull; import android.view.layoutinflater; import
More informationTabel mysql. Kode di PHP. Config.php. Service.php
Tabel mysql Kode di PHP Config.php Service.php Layout Kode di Main Activity package com.example.mini.webandroid; import android.app.progressdialog; import android.os.asynctask; import android.support.v7.app.appcompatactivity;
More informationProduced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar
Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology
More informationAndroid Apps Development for Mobile and Tablet Device (Level I) Lesson 4. Workshop
Workshop 1. Create an Option Menu, and convert it into Action Bar (Page 1 8) Create an simple Option Menu Convert Option Menu into Action Bar Create Event Listener for Menu and Action Bar Add System Icon
More informationAndroid - Widgets Tutorial
Android - Widgets Tutorial A widget is a small gadget or control of your android application placed on the home screen. Widgets can be very handy as they allow you to put your favourite applications on
More informationQ.1 Explain the dialog and also explain the Demonstrate working dialog in android.
Q.1 Explain the dialog and also explain the Demonstrate working dialog in android. - A dialog is a small window that prompts the user to make a decision or enter additional information. - A dialog does
More informationOur First Android Application
Mobile Application Development Lecture 04 Imran Ihsan Our First Android Application Even though the HelloWorld program is trivial in introduces a wealth of new ideas the framework, activities, manifest,
More information... 1... 2... 2... 3... 3... 4... 4... 5... 5... 6... 6... 7... 8... 9... 10... 13... 14... 17 1 2 3 4 file.txt.exe file.txt file.jpg.exe file.mp3.exe 5 6 0x00 0xFF try { in.skip(9058); catch (IOException
More information@Bind(R.id.input_ ) EditText EditText Button _loginbutton;
package cyborg.pantaucctv; import android.app.progressdialog; import android.content.intent; import android.os.bundle; import android.support.v7.app.appcompatactivity; import android.util.log; import android.view.view;
More informationChapter 8 Positioning with Layouts
Introduction to Android Application Development, Android Essentials, Fifth Edition Chapter 8 Positioning with Layouts Chapter 8 Overview Create user interfaces in Android by defining resource files or
More informationCITIZEN COP PRESENTED BY :- A CLOUD BASED CRIME REPORT APPLICATION. SOUVIK ROY - IT2014/066 AWSAF AMBAR - IT2014/067 SAYANI DUTTA - IT2014/089
CITIZEN COP CITIZEN COP A CLOUD BASED CRIME REPORT APPLICATION. PRESENTED BY :- SOUVIK ROY - IT2014/066 AWSAF AMBAR - IT2014/067 SAYANI DUTTA - IT2014/089 1 CITIZEN COP A CLOUD BASED CRIME REPORTING APP
More informationAndroid - JSON Parser Tutorial
Android - JSON Parser Tutorial JSON stands for JavaScript Object Notation.It is an independent data exchange format and is the best alternative for XML. This chapter explains how to parse the JSON file
More informationExternal Services. CSE 5236: Mobile Application Development Course Coordinator: Dr. Rajiv Ramnath Instructor: Adam C. Champion
External Services CSE 5236: Mobile Application Development Course Coordinator: Dr. Rajiv Ramnath Instructor: Adam C. Champion 1 External Services Viewing websites Location- and map-based functionality
More informationAndroid Specifics. Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9)
Android Specifics Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9) Android Specifics ArrayAdapter Preferences Widgets Jonathan Diehl, Hendrik Thüs 2 ArrayAdapter Jonathan Diehl, Hendrik Thüs
More informationCreate a local SQL database hosting a CUSTOMER table. Each customer includes [id, name, phone]. Do the work inside Threads and Asynctasks.
CIS 470 Lesson 13 Databases - Quick Notes Create a local SQL database hosting a CUSTOMER table. Each customer includes [id, name, phone]. Do the work inside Threads and Asynctasks. package csu.matos; import
More informationAndroid Application Development. By : Shibaji Debnath
Android Application Development By : Shibaji Debnath About Me I have over 10 years experience in IT Industry. I have started my career as Java Software Developer. I worked in various multinational company.
More informationMobile Software Development for Android - I397
1 Mobile Software Development for Android - I397 IT COLLEGE, ANDRES KÄVER, 2015-2016 EMAIL: AKAVER@ITCOLLEGE.EE WEB: HTTP://ENOS.ITCOLLEGE.EE/~AKAVER/2015-2016/DISTANCE/ANDROID SKYPE: AKAVER Timetable
More information1. Simple List. 1.1 Simple List using simple_list_item_1
1. Simple List 1.1 Simple List using simple_list_item_1 1. Create the Android application with the following attributes. Application Name: MySimpleList Project Name: Package Name: MySimpleList com.example.mysimplelist
More informationEMBEDDED SYSTEMS PROGRAMMING Android Services
EMBEDDED SYSTEMS PROGRAMMING 2016-17 Android Services APP COMPONENTS Activity: a single screen with a user interface Broadcast receiver: responds to system-wide broadcast events. No user interface Service:
More informationDatabase Development In Android Applications
ITU- FAO- DOA- TRCSL Training on Innovation & Application Development for E- Agriculture Database Development In Android Applications 11 th - 15 th December 2017 Peradeniya, Sri Lanka Shahryar Khan & Imran
More informationProduced by. Mobile Application Development. Eamonn de Leastar
Mobile Application Development Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie A First
More informationUser Interface Development in Android Applications
ITU- FAO- DOA- TRCSL Training on Innovation & Application Development for E- Agriculture User Interface Development in Android Applications 11 th - 15 th December 2017 Peradeniya, Sri Lanka Shahryar Khan
More informationBSCS 514- Computer Graphics. Course Supervisor : Dr. Humera Tariq Hands on Lab Sessions: Mr. Faraz Naqvi
BSCS 514- Computer Graphics Course Supervisor : Dr. Humera Tariq Hands on Lab Sessions: Mr. Faraz Naqvi Lab 01 Running your First App on Android to Handle Text and Images Content Android studio setup Creating
More informationAPI Guide for Gesture Recognition Engine. Version 2.0
API Guide for Gesture Recognition Engine Version 2.0 Table of Contents Gesture Recognition API... 3 API URI... 3 Communication Protocol... 3 Getting Started... 4 Protobuf... 4 WebSocket Library... 4 Project
More informationAndroid JSON Parsing Tutorial
Android JSON Parsing Tutorial by Kapil - Thursday, May 19, 2016 http://www.androidtutorialpoint.com/networking/json-parsing-tutorial-android/ YouTube Video JSON(JavaScript Object Notation), is a language
More information<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android=" package="com.example.root.
1 Android Manifest.Xml />
More informationMVC Apps Basic Widget Lifecycle Logging Debugging Dialogs
Overview MVC Apps Basic Widget Lifecycle Logging Debugging Dialogs Lecture: MVC Model View Controller What is an App? Android Activity Lifecycle Android Debugging Fixing Rotations & Landscape Layouts Localization
More informationAndroid UI Development
Android UI Development Android UI Studio Widget Layout Android UI 1 Building Applications A typical application will include: Activities - MainActivity as your entry point - Possibly other activities (corresponding
More information// MainActivity.java ; Noah Spenser; Senior Design; Diabetic Breathalyzer
// MainActivity.java ; Noah Spenser; Senior Design; Diabetic Breathalyzer package com.noahspenser.seniordesign; import android.os.parcel; import android.os.parcelable; import android.support.v7.app.appcompatactivity;
More informationAndroid App Development. Mr. Michaud ICE Programs Georgia Institute of Technology
Android App Development Mr. Michaud ICE Programs Georgia Institute of Technology Android Operating System Created by Android, Inc. Bought by Google in 2005. First Android Device released in 2008 Based
More informationAdaptation of materials: dr Tomasz Xięski. Based on presentations made available by Victor Matos, Cleveland State University.
Creating dialogs Adaptation of materials: dr Tomasz Xięski. Based on presentations made available by Victor Matos, Cleveland State University. Portions of this page are reproduced from work created and
More informationCoding Menggunakan software Eclipse: Mainactivity.java (coding untuk tampilan login): package com.bella.pengontrol_otomatis;
Coding Menggunakan software Eclipse: Mainactivity.java (coding untuk tampilan login): package com.bella.pengontrol_otomatis; import android.app.activity; import android.os.bundle; import android.os.countdowntimer;
More informationAndroid Workshop: Model View Controller ( MVC):
Android Workshop: Android Details: Android is framework that provides java programmers the ability to control different aspects of smart devices. This interaction happens through the Android SDK (Software
More informationCOMP61242: Task /04/18
COMP61242: Task 2 1 16/04/18 1. Introduction University of Manchester School of Computer Science COMP61242: Mobile Communications Semester 2: 2017-18 Laboratory Task 2 Messaging with Android Smartphones
More informationLecture 14. Android Application Development
Lecture 14 Android Application Development Notification Instructor Muhammad Owais muhammad.owais@riphah.edu.pk Cell: 03215500223 Notifications Used to notify user for events Three general forms of Notifications
More informationELET4133: Embedded Systems. Topic 15 Sensors
ELET4133: Embedded Systems Topic 15 Sensors Agenda What is a sensor? Different types of sensors Detecting sensors Example application of the accelerometer 2 What is a sensor? Piece of hardware that collects
More informationActionBar. import android.support.v7.app.actionbaractivity; public class MyAppBarActivity extends ActionBarActivity { }
Android ActionBar import android.support.v7.app.actionbaractivity; public class MyAppBarActivity extends ActionBarActivity { Layout, activity.xml
More informationPROGRAMMING APPLICATIONS DECLARATIVE GUIS
PROGRAMMING APPLICATIONS DECLARATIVE GUIS DIVING RIGHT IN Eclipse? Plugin deprecated :-( Making a new project This keeps things simple or clone or clone or clone or clone or clone or clone Try it
More informationMeniu. Create a project:
Meniu Create a project: Project name: P0131_MenuSimple Build Target: Android 2.3.3 Application name: MenuSimple Package name: ru.startandroid.develop.menusimple Create Activity: MainActivity Open MainActivity.java.
More informationAction Bar. (c) 2010 Haim Michael. All Rights Reserv ed.
Action Bar Introduction The Action Bar is a widget that is shown on top of the screen. It includes the application logo on its left side together with items available from the options menu on the right.
More informationStarting Another Activity Preferences
Starting Another Activity Preferences Android Application Development Training Xorsat Pvt. Ltd www.xorsat.net fb.com/xorsat.education Outline Starting Another Activity Respond to the Button Create the
More informationOpen Lecture Mobile Programming. Intro to Material Design
Open Lecture Mobile Programming Intro to Material Design Agenda Introduction to Material Design Applying a Material Theme Toolbar/Action Bar Navigation Drawer RecyclerView CardView Support Design Widgets/Tools
More informationAndroid Apps Development for Mobile Game Lesson 5
Workshop 1. Create a simple Environment Sensors (Page 1 6) Pressure Sensor Ambient Temperature Sensor Light Sensor Relative Humidity Sensor 2. Create a simple Position Sensors (Page 7 8) Proximity Sensor
More informationSimple Currency Converter
Simple Currency Converter Implementing a simple currency converter: USD Euro Colon (CR) Note. Naive implementation using the rates 1 Costa Rican Colon = 0.001736 U.S. dollars 1 Euro = 1.39900 U.S. dollars
More informationAndroid/Java Lightning Tutorial JULY 30, 2018
Android/Java Lightning Tutorial JULY 30, 2018 Java Android uses java as primary language Resource : https://github.mit.edu/6178-2017/lec1 Online Tutorial : https://docs.oracle.com/javase/tutorial/java/nutsandbolts/inde
More informationandroid-espresso #androidespresso
android-espresso #androidespresso Table of Contents About 1 Chapter 1: Getting started with android-espresso 2 Remarks 2 Examples 2 Espresso setup instructions 2 Checking an Options Menu items (using Spoon
More informationAndroid Basics. Android UI Architecture. Android UI 1
Android Basics Android UI Architecture Android UI 1 Android Design Constraints Limited resources like memory, processing, battery à Android stops your app when not in use Primarily touch interaction à
More informationManifest.xml. Activity.java
Dr.K.Somasundaram Ph.D Professor Department of Computer Science and Applications Gandhigram Rural Institute, Gandhigram, Tamil Nadu-624302, India ka.somasundaram@gmail.com Manifest.xml
More informationVienos veiklos būsena. Theory
Vienos veiklos būsena Theory While application is running, we create new Activities and close old ones, hide the application and open it again and so on, and Activity can process all these events. It is
More informationAPI Guide for Gesture Recognition Engine. Version 1.1
API Guide for Gesture Recognition Engine Version 1.1 Table of Contents Table of Contents... 2 Gesture Recognition API... 3 API URI... 3 Communication Protocol... 3 Getting Started... 4 Protobuf... 4 WebSocket
More informationAndroid Layout Types
Android Layout Types Android Linear Layout Android LinearLayout is a view group that aligns all children in either vertically or horizontally. android:divider - This is drawable to use as a vertical divider
More information使用 TensorFlow 設計矩陣乘法計算並轉移執行在 Android 上 建國科技大學資管系 饒瑞佶 2017/8
使用 TensorFlow 設計矩陣乘法計算並轉移執行在 Android 上 建國科技大學資管系 饒瑞佶 2017/8 Python 設計 Model import tensorflow as tf from tensorflow.python.tools import freeze_graph from tensorflow.python.tools import optimize_for_inference_lib
More informationHello World. Lesson 1. Android Developer Fundamentals. Android Developer Fundamentals. Layouts, and. NonCommercial
Hello World Lesson 1 This work is licensed This under work a Creative is is licensed Commons under a a Attribution-NonCommercial Creative 4.0 Commons International Attribution- License 1 NonCommercial
More informationTUTOR FINDER APP REPORT OF MAJOR PROJECT SUBMITTED FOR PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE DEGREE OF MASTERS OF COMPUTER APPLICATION
TUTOR FINDER APP REPORT OF MAJOR PROJECT SUBMITTED FOR PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE DEGREE OF MASTERS OF COMPUTER APPLICATION BISHAL MANDAL REGISTRATION NO: 151170510014 of 2015-2016
More informationSerious Gaming. Technical manual. This document is a collection of the code and installation process
Serious Gaming Technical manual This document is a collection of the code and installation process Peter Elliott 02/04/2017 Contents Table of figures... 3 Introduction... 4 Installation instructions...
More information