Langsung ke konten utama

Postingan

Menampilkan postingan dari Mei, 2018

contoh current location 2

layout < fragment xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: map = "http://schemas.android.com/apk/res-auto" xmlns: tools = "http://schemas.android.com/tools" android :id= "@+id/map" android :name= "com.google.android.gms.maps.SupportMapFragment" android :layout_width= "match_parent" android :layout_height= "match_parent" /> java package adehodijah.example.com.pertemuanmap; import android.content.pm.PackageManager; import android.location.Location; import android.os.Build; import android.os.Bundle; import android.support.annotation.NonNull ; import android.support.annotation.Nullable ; import android.support.v4.app.ActivityCompat; import android.support.v4.app.FragmentActivity; import android.support.v4.content.ContextCompat; import android.util.Log; import android.widget.Toast; import com.google.android.gms.common.ConnectionResult; import com.google.andro...

contoh current location 1

layout < RelativeLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:tools= "http://schemas.android.com/tools" android:layout_width= "match_parent" android:layout_height= "match_parent" android:paddingLeft= "@dimen/activity_horizontal_margin" android:paddingRight= "@dimen/activity_horizontal_margin" android:paddingTop= "@dimen/activity_vertical_margin" android:paddingBottom= "@dimen/activity_vertical_margin" > < Button android:layout_alignParentTop= "true" android:layout_centerHorizontal= "true" android:id= "@+id/bt_getLocation" android:text= "Get Location" android:layout_width= "wrap_content" android:layout_height= "wrap_content" /> </ RelativeLayout > java package adehodijah.example.com.pertemuanmap; import android.locatio...

contoh service

layout <? xml version= "1.0" encoding= "utf-8" ?> < LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" android :layout_width= "fill_parent" android :layout_height= "fill_parent" android :orientation= "vertical" > < Button android :id= "@+id/btnStartService" android :layout_width= "fill_parent" android :layout_height= "wrap_content" android :onClick= "startService" android :text= "Start Service" /> < Button android :id= "@+id/btnStopService" android :layout_width= "fill_parent" android :layout_height= "wrap_content" android :onClick= "stopService" android :text= "Stop Service" /> </ LinearLayout > service package com.example.adehodijah.myservice; /** * Created by AdeHod...

Pertemuan MAP lokasi terdekat

compile 'com.google.android.gms:play-services-maps:9.6.0' compile 'com.google.android.gms:play-services-location:9.6.0' https://maps.googleapis.com/maps/api/place/search/json?location=-6.8729758,107.5332892&radius=200&types=restaurant&sensor=true&key=AIzaSyC99GN2-5Seu8nqOh8GhGO_aGIk-wqQHv8 Layout < fragment xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: map = "http://schemas.android.com/apk/res-auto" xmlns: tools = "http://schemas.android.com/tools" android :id= "@+id/map" android :name= "com.google.android.gms.maps.SupportMapFragment" android :layout_width= "match_parent" android :layout_height= "match_parent" /> Java package adehodijah.example.com.pertemuanmap; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.util.Log; import android.widget.Toast; import ...

Pertemuan MAP garis

https://console.developers.google.com https://jsoneditoronline.org/ https://maps.googleapis.com/maps/api/directions/json?origin=-6.8729758,107.5332892&destination=-6.9203738,107.5982842&sensor=false Layout < fragment xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: map = "http://schemas.android.com/apk/res-auto" xmlns: tools = "http://schemas.android.com/tools" android :id= "@+id/map" android :name= "com.google.android.gms.maps.SupportMapFragment" android :layout_width= "match_parent" android :layout_height= "match_parent" /> Java package adehodijah.example.com.pertemuanmap; import android.graphics.Color; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.util.Log; import android.widget.Toast; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps...

Pertemuan MAP marker

Layout < fragment xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: map = "http://schemas.android.com/apk/res-auto" xmlns: tools = "http://schemas.android.com/tools" android :id= "@+id/map" android :name= "com.google.android.gms.maps.SupportMapFragment" android :layout_width= "match_parent" android :layout_height= "match_parent" /> Java package adehodijah.example.com.pertemuanmap; import android.os.Bundle; import android.support.v4.app.FragmentActivity; 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; public class MapsActivityMarker extends FragmentActivity implements OnMapReadyCallback { privat...

Implementasi TextWatcher pada DisplayActivity

Class Objek package adehodijah.example.com.pertemuanmysql; import org.json.JSONException; import org.json.JSONObject; public class Account { public String username ; public String password ; public Account(JSONObject json){ super (); try { this . username = json.getString( "username" ); this . password = json.getString( "password" ); } catch (JSONException e) { e.printStackTrace(); } } @Override public String toString() { return this . username ; } } Class Layout Utama <? xml version= "1.0" encoding= "utf-8" ?> < LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" android :layout_width= "match_parent" android :layout_height= "match_parent" android :orientation= "vertical" > < LinearLayout android :layout_width= "match_parent" ...