├── a.jks
├── app
├── .gitignore
├── app-release.apk
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── id
│ │ └── co
│ │ └── imastudio
│ │ └── santri
│ │ └── jogjatourismplace
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── id
│ │ │ └── co
│ │ │ └── imastudio
│ │ │ └── santri
│ │ │ └── jogjatourismplace
│ │ │ ├── ErrorActivity.java
│ │ │ ├── ListWisata.java
│ │ │ ├── Login.java
│ │ │ ├── SingleItemView.java
│ │ │ ├── Splash.java
│ │ │ └── adapter
│ │ │ ├── FileCache.java
│ │ │ ├── ImageLoader.java
│ │ │ ├── JSONfunctions.java
│ │ │ ├── ListViewAdapter.java
│ │ │ ├── MemoryCache.java
│ │ │ └── Utils.java
│ └── res
│ │ ├── drawable-v21
│ │ ├── ic_menu_camera.xml
│ │ ├── ic_menu_gallery.xml
│ │ ├── ic_menu_manage.xml
│ │ ├── ic_menu_send.xml
│ │ ├── ic_menu_share.xml
│ │ └── ic_menu_slideshow.xml
│ │ ├── drawable
│ │ ├── jogjaicon.png
│ │ ├── side_nav_bar.xml
│ │ └── temp_img.png
│ │ ├── layout
│ │ ├── activity_error.xml
│ │ ├── activity_list_wisata.xml
│ │ ├── activity_login.xml
│ │ ├── activity_main.xml
│ │ ├── activity_single_item_view.xml
│ │ ├── activity_splash.xml
│ │ ├── app_bar_main.xml
│ │ ├── content_main.xml
│ │ ├── layout_listview.xml
│ │ ├── listview_item.xml
│ │ └── nav_header_main.xml
│ │ ├── menu
│ │ ├── activity_main_drawer.xml
│ │ └── main.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_round.png
│ │ └── jogjaicon.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_round.png
│ │ └── jogjaicon.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── drawables.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── id
│ └── co
│ └── imastudio
│ └── santri
│ └── jogjatourismplace
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── jogjaToursim.jks
└── settings.gradle
/a.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/a.jks
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/app-release.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/app-release.apk
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.0"
6 | defaultConfig {
7 | applicationId "id.co.imastudio.santri.jogjatourismplace"
8 | minSdkVersion 15
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 |
21 | useLibrary 'org.apache.http.legacy'
22 | }
23 |
24 | dependencies {
25 | compile fileTree(dir: 'libs', include: ['*.jar'])
26 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
27 | exclude group: 'com.android.support', module: 'support-annotations'
28 | })
29 | compile 'com.android.support:appcompat-v7:25.3.1'
30 | compile 'com.android.support:cardview-v7:25.3.1'
31 | compile 'com.android.support:design:25.3.1'
32 | compile 'com.android.support.constraint:constraint-layout:1.0.2'
33 | testCompile 'junit:junit:4.12'
34 | }
35 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\Server\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/id/co/imastudio/santri/jogjatourismplace/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package id.co.imastudio.santri.jogjatourismplace;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("id.co.imastudio.santri.jogjatourismplace", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
21 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
33 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/java/id/co/imastudio/santri/jogjatourismplace/ErrorActivity.java:
--------------------------------------------------------------------------------
1 | package id.co.imastudio.santri.jogjatourismplace;
2 |
3 | import android.content.Context;
4 | import android.net.ConnectivityManager;
5 | import android.net.NetworkInfo;
6 | import android.os.Bundle;
7 | import android.support.v7.app.AppCompatActivity;
8 | import android.view.Menu;
9 | import android.widget.Toast;
10 |
11 | public class ErrorActivity extends AppCompatActivity {
12 | String answer;
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | setContentView(R.layout.activity_error);
17 | ConnectivityManager cm = (ConnectivityManager) getApplicationContext()
18 | .getSystemService(Context.CONNECTIVITY_SERVICE);
19 | NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
20 | if (null != activeNetwork) {
21 | if(activeNetwork.getType() == ConnectivityManager.TYPE_WIFI)
22 | answer="You are connected to a WiFi Network";
23 | if(activeNetwork.getType() == ConnectivityManager.TYPE_MOBILE)
24 | answer="You are connected to a Mobile Network";
25 | }
26 | else
27 | answer = "No internet Connectivity";
28 | Toast.makeText(getApplicationContext(), answer, Toast.LENGTH_LONG).show();
29 | }
30 |
31 | @Override
32 | public boolean onCreateOptionsMenu(Menu menu) {
33 | // Inflate the menu; this adds items to the action bar if it is present.
34 | getMenuInflater().inflate(R.menu.main, menu);
35 | return true;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/java/id/co/imastudio/santri/jogjatourismplace/ListWisata.java:
--------------------------------------------------------------------------------
1 | package id.co.imastudio.santri.jogjatourismplace;
2 |
3 | import android.app.ProgressDialog;
4 | import android.os.AsyncTask;
5 | import android.os.Bundle;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.util.Log;
8 | import android.widget.ListView;
9 |
10 | import org.json.JSONArray;
11 | import org.json.JSONException;
12 | import org.json.JSONObject;
13 |
14 | import java.util.ArrayList;
15 | import java.util.HashMap;
16 |
17 | import id.co.imastudio.santri.jogjatourismplace.adapter.JSONfunctions;
18 | import id.co.imastudio.santri.jogjatourismplace.adapter.ListViewAdapter;
19 |
20 | public class ListWisata extends AppCompatActivity {
21 | // Declare Variables
22 | JSONObject jsonobject;
23 | JSONArray jsonarray;
24 | ListView listview;
25 | ListViewAdapter adapter;
26 | ProgressDialog mProgressDialog;
27 | ArrayList> arraylist;
28 | public static String JUDUL = "nama_pariwisata";
29 | public static String ALMAT = "alamat_pariwisata";
30 | public static String DETAIL = "detail_pariwisata";
31 | public static String GAMBAR = "gambar_pariwisata";
32 |
33 | @Override
34 | public void onCreate(Bundle savedInstanceState) {
35 | super.onCreate(savedInstanceState);
36 | // Get the view from listview_main.xml
37 | setContentView(R.layout.activity_list_wisata);
38 | /* Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
39 | setSupportActionBar(toolbar);*/
40 | // Execute DownloadJSON AsyncTask
41 |
42 | new DownloadJSON().execute();
43 | }
44 |
45 |
46 | // DownloadJSON AsyncTask
47 | public class DownloadJSON extends AsyncTask {
48 | @Override
49 | protected void onPreExecute() {
50 | super.onPreExecute();
51 | // Create a progressdialog
52 | mProgressDialog = new ProgressDialog(ListWisata.this);
53 | // Set progressdialog title
54 | mProgressDialog.setTitle("Ambil Data Dari Server");
55 | // Set progressdialog message
56 | mProgressDialog.setMessage("Sabar Ya . . .");
57 | mProgressDialog.setIndeterminate(false);
58 | // Show progressdialog
59 | mProgressDialog.show();
60 | }
61 |
62 |
63 | @Override
64 | protected Void doInBackground(Void... params) {
65 | // Create an array
66 | arraylist = new ArrayList>();
67 | // Retrieve JSON Objects from the given URL address
68 | jsonobject = JSONfunctions
69 | .getJSONfromURL("http://www.erporate.com/bootcamp/jsonBootcamp.php");
70 |
71 | try {
72 | // Locate the array name in JSON
73 | jsonarray = jsonobject.getJSONArray("data");
74 |
75 | for (int i = 0; i < jsonarray.length(); i++) {
76 | HashMap map = new HashMap();
77 | jsonobject = jsonarray.getJSONObject(i);
78 | // Retrive JSON Objects
79 | map.put("nama_pariwisata", jsonobject.getString("nama_pariwisata"));
80 | map.put("alamat_pariwisata", jsonobject.getString("alamat_pariwisata"));
81 | map.put("detail_pariwisata", jsonobject.getString("detail_pariwisata"));
82 | map.put("gambar_pariwisata", jsonobject.getString("gambar_pariwisata"));
83 | // Set the JSON Objects into the array
84 | arraylist.add(map);
85 | }
86 | } catch (JSONException e) {
87 | Log.e("Error", e.getMessage());
88 | e.printStackTrace();
89 | }
90 | return null;
91 | }
92 |
93 | @Override
94 | protected void onPostExecute(Void args) {
95 | // Locate the listview in listview_main.xml
96 | listview = (ListView) findViewById(R.id.listview);
97 | // Pass the results into ListViewAdapter.java
98 | adapter = new ListViewAdapter(ListWisata.this, arraylist);
99 | // Set the adapter to the ListView
100 | listview.setAdapter(adapter);
101 | // Close the progressdialog
102 | mProgressDialog.dismiss();
103 | }
104 | }
105 | @Override
106 | public void onBackPressed() {
107 |
108 | finish();
109 |
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/app/src/main/java/id/co/imastudio/santri/jogjatourismplace/Login.java:
--------------------------------------------------------------------------------
1 | package id.co.imastudio.santri.jogjatourismplace;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.support.v7.app.AppCompatActivity;
6 | import android.view.View;
7 | import android.widget.EditText;
8 | import android.widget.Toast;
9 |
10 | public class Login extends AppCompatActivity {
11 | EditText editText1 ,editText2; //Deklarasi object dari class EdiText
12 | String text1 ,text2; //Deklarasi object string
13 |
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.activity_login);
18 |
19 | }
20 | public void loginMasuk(View view) {
21 | //Method onClick pada Button
22 |
23 | editText1 = (EditText)findViewById(R.id.edittext_username);
24 | editText2 = (EditText) findViewById(R.id.edittext_password);
25 | text1 = editText1.getText().toString();
26 | text2 = editText2.getText().toString();
27 |
28 | if ((text1.contains("Username"))&&((text2.contains("Password")))) {
29 | Toast.makeText(this, "Sukses Login", Toast.LENGTH_SHORT).show();
30 | Intent intent = new Intent(Login.this, Splash.class);
31 | startActivity(intent);
32 | }
33 |
34 | else if ((text1.matches("")||text2.matches("")))
35 | {
36 | //Maka akan menampilkan pesan text toast
37 | Toast.makeText(this, "Isikan Username dan Password", Toast.LENGTH_SHORT).show();
38 |
39 | }
40 |
41 | else {
42 | //jika kedua kondisi diatas tidak memenuhi
43 |
44 | Toast.makeText(this, "Login Gagal /Username Password Salah", Toast.LENGTH_SHORT).show();
45 | }
46 |
47 | }
48 | @Override
49 | public void onBackPressed() {
50 | finish();
51 |
52 |
53 | }
54 |
55 |
56 | public void backSession() {
57 | backThisPage();
58 |
59 | }
60 |
61 |
62 | }
63 |
64 |
--------------------------------------------------------------------------------
/app/src/main/java/id/co/imastudio/santri/jogjatourismplace/SingleItemView.java:
--------------------------------------------------------------------------------
1 | package id.co.imastudio.santri.jogjatourismplace;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.support.v7.app.AppCompatActivity;
6 | import android.support.v7.widget.Toolbar;
7 | import android.view.MenuItem;
8 | import android.view.Window;
9 | import android.widget.ImageView;
10 | import android.widget.TextView;
11 |
12 | import id.co.imastudio.santri.jogjatourismplace.adapter.ImageLoader;
13 |
14 | public class SingleItemView extends AppCompatActivity {
15 |
16 | // Declare Variables
17 | String judul;
18 | String alamat;
19 | String detail;
20 | String gambar;
21 | String position;
22 | ImageLoader imageLoader = new ImageLoader(this);
23 | private Toolbar toolbar;
24 | @Override
25 | public void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | this.requestWindowFeature(Window.FEATURE_NO_TITLE);
28 | // Get the view from singleitemview.xml
29 | setContentView(R.layout.activity_single_item_view);
30 |
31 | Intent i = getIntent();
32 |
33 | judul = i.getStringExtra("judul");
34 |
35 | alamat = i.getStringExtra("alamat");
36 |
37 | detail = i.getStringExtra("detail");
38 |
39 | gambar = i.getStringExtra("gambar");
40 |
41 | // Locate the TextViews in singleitemview.xml
42 | TextView judulSi = (TextView) findViewById(R.id.judulSi);
43 | TextView alamatSI = (TextView) findViewById(R.id.alamatSi);
44 | TextView detailSi = (TextView) findViewById(R.id.detailSi);
45 |
46 | // Locate the ImageView in singleitemview.xml
47 | ImageView imgflag = (ImageView) findViewById(R.id.imgflag);
48 |
49 | // Set results to the TextViews
50 | judulSi.setText(judul);
51 | alamatSI.setText(alamat);
52 | detailSi.setText(detail);
53 |
54 | imageLoader.DisplayImage(gambar, imgflag);
55 | // get position
56 | imageLoader.DisplayImage(gambar, position);
57 | }
58 |
59 | @Override
60 | public boolean onOptionsItemSelected(MenuItem item) {
61 | int id = item.getItemId();
62 |
63 | //noinspection SimplifiableIfStatement
64 | if (id == android.R.id.home) {
65 | onBackPressed();
66 | return true;
67 | }
68 | return super.onOptionsItemSelected(item);
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/app/src/main/java/id/co/imastudio/santri/jogjatourismplace/Splash.java:
--------------------------------------------------------------------------------
1 | package id.co.imastudio.santri.jogjatourismplace;
2 |
3 | import android.app.AlertDialog;
4 | import android.content.Context;
5 | import android.content.DialogInterface;
6 | import android.content.Intent;
7 | import android.content.pm.ActivityInfo;
8 | import android.net.ConnectivityManager;
9 | import android.net.NetworkInfo;
10 | import android.os.Bundle;
11 | import android.support.v7.app.AppCompatActivity;
12 |
13 | public class Splash extends AppCompatActivity {
14 | String answer;
15 |
16 |
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
21 | setContentView(R.layout.activity_splash);
22 |
23 | if (isWorkingInternetPersent()) {
24 | splash();
25 | } else {
26 | showAlertDialog(Splash.this, "Tidak ada Koneksi Internet",
27 | "Nyalakan Wifi / Paket Data", false);
28 | }
29 | }
30 |
31 | public void splash() {
32 | Thread timerTread = new Thread() {
33 | public void run() {
34 | try {
35 | sleep(3000);
36 | } catch (InterruptedException e) {
37 | e.printStackTrace();
38 | } finally {
39 | Intent intent = new Intent(getApplicationContext(), ListWisata.class);
40 | intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
41 | startActivity(intent);
42 | finish();
43 | }
44 | }
45 | };
46 | timerTread.start();
47 | }
48 |
49 | public boolean isWorkingInternetPersent() {
50 | ConnectivityManager connectivityManager = (ConnectivityManager) getBaseContext()
51 | .getSystemService(Context.CONNECTIVITY_SERVICE);
52 | if (connectivityManager != null) {
53 | NetworkInfo[] info = connectivityManager.getAllNetworkInfo();
54 | if (info != null)
55 | for (int i = 0; i < info.length; i++)
56 | if (info[i].getState() == NetworkInfo.State.CONNECTED) {
57 | return true;
58 | }
59 |
60 | }
61 | return false;
62 | }
63 |
64 | public void showAlertDialog(Context context, String title, String message, Boolean status) {
65 | AlertDialog alertDialog = new AlertDialog.Builder(context).create();
66 |
67 | // Setting Dialog Title
68 | alertDialog.setTitle(title);
69 |
70 | // Setting Dialog Message
71 | alertDialog.setMessage(message);
72 |
73 | // Setting alert dialog icon
74 | // alertDialog.setIcon((status) ? R.mipmap.ic_launcher : R.mipmap.ic_launcher);
75 |
76 | // Setting OK Button
77 | alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
78 | public void onClick(DialogInterface dialog, int which) {
79 |
80 | finish();
81 | System.exit(0);
82 | }
83 | });
84 |
85 | // Showing Alert Message
86 | alertDialog.show();
87 | }
88 | @Override
89 | public void onBackPressed() {
90 | finish();
91 |
92 |
93 | }
94 |
95 | }
96 | /*
97 |
98 | @Override
99 | protected void onCreate(Bundle savedInstanceState) {
100 | super.onCreate(savedInstanceState);
101 | setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
102 | setContentView(R.layout.activity_splash);
103 |
104 | new Handler().postDelayed(new Runnable() {
105 | @Override
106 | public void run() {
107 | //TODO Auto-generated method stub
108 | if(isOnline()) {
109 |
110 | Intent i = new Intent(Splash.this, ListWisata.class);
111 | startActivity(i);
112 | //jeda selesai Splashscreen
113 | this.finish();
114 | // INTERNET AVAILABLE
115 | } else {
116 | Intent i = new Intent(Splash.this, ErrorActivity.class);
117 | startActivity(i);
118 | //jeda selesai Splashscreen
119 | this.finish();
120 |
121 |
122 | }}
123 |
124 | private void finish() {
125 | // TODO Auto-generated method stub
126 | }
127 | }, 3000);
128 | }
129 |
130 | public boolean isOnline() {
131 | ConnectivityManager cm = (ConnectivityManager) getApplicationContext()
132 | .getSystemService(Context.CONNECTIVITY_SERVICE);
133 | NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
134 | if (null != activeNetwork) {
135 | if(activeNetwork.getType() == ConnectivityManager.TYPE_WIFI)
136 | answer="You are connected to a WiFi Network";
137 | if(activeNetwork.getType() == ConnectivityManager.TYPE_MOBILE)
138 | answer="You are connected to a Mobile Network";
139 | }
140 | return false;
141 |
142 | }
143 |
144 | }
145 | */
146 |
--------------------------------------------------------------------------------
/app/src/main/java/id/co/imastudio/santri/jogjatourismplace/adapter/FileCache.java:
--------------------------------------------------------------------------------
1 | package id.co.imastudio.santri.jogjatourismplace.adapter;
2 |
3 | import android.content.Context;
4 |
5 | import java.io.File;
6 |
7 | public class FileCache {
8 |
9 | private File cacheDir;
10 |
11 | public FileCache(Context context) {
12 | // Find the dir to save cached images
13 | if (android.os.Environment.getExternalStorageState().equals(
14 | android.os.Environment.MEDIA_MOUNTED))
15 | cacheDir = new File(
16 | android.os.Environment.getExternalStorageDirectory(),
17 | "JsonParseTutorialCache");
18 | else
19 | cacheDir = context.getCacheDir();
20 | if (!cacheDir.exists())
21 | cacheDir.mkdirs();
22 | }
23 |
24 | public File getFile(String url) {
25 | String filename = String.valueOf(url.hashCode());
26 | // String filename = URLEncoder.encode(url);
27 | File f = new File(cacheDir, filename);
28 | return f;
29 |
30 | }
31 |
32 | public void clear() {
33 | File[] files = cacheDir.listFiles();
34 | if (files == null)
35 | return;
36 | for (File f : files)
37 | f.delete();
38 | }
39 |
40 | }
--------------------------------------------------------------------------------
/app/src/main/java/id/co/imastudio/santri/jogjatourismplace/adapter/ImageLoader.java:
--------------------------------------------------------------------------------
1 | package id.co.imastudio.santri.jogjatourismplace.adapter;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.BitmapFactory;
6 | import android.os.Handler;
7 | import android.widget.ImageView;
8 |
9 | import java.io.File;
10 | import java.io.FileInputStream;
11 | import java.io.FileNotFoundException;
12 | import java.io.FileOutputStream;
13 | import java.io.IOException;
14 | import java.io.InputStream;
15 | import java.io.OutputStream;
16 | import java.net.HttpURLConnection;
17 | import java.net.URL;
18 | import java.util.Collections;
19 | import java.util.Map;
20 | import java.util.WeakHashMap;
21 | import java.util.concurrent.ExecutorService;
22 | import java.util.concurrent.Executors;
23 |
24 | import id.co.imastudio.santri.jogjatourismplace.R;
25 |
26 | public class ImageLoader {
27 |
28 | MemoryCache memoryCache = new MemoryCache();
29 | FileCache fileCache;
30 | private Map imageViews = Collections
31 | .synchronizedMap(new WeakHashMap());
32 | ExecutorService executorService;
33 | // Handler to display images in UI thread
34 | Handler handler = new Handler();
35 |
36 | public ImageLoader(Context context) {
37 | fileCache = new FileCache(context);
38 | executorService = Executors.newFixedThreadPool(5);
39 | }
40 |
41 | final int stub_id = R.drawable.temp_img;
42 |
43 | public void DisplayImage(String url, ImageView imageView) {
44 | imageViews.put(imageView, url);
45 | Bitmap bitmap = memoryCache.get(url);
46 | if (bitmap != null)
47 | imageView.setImageBitmap(bitmap);
48 | else {
49 | queuePhoto(url, imageView);
50 | imageView.setImageResource(stub_id);
51 | }
52 | }
53 |
54 | private void queuePhoto(String url, ImageView imageView) {
55 | PhotoToLoad p = new PhotoToLoad(url, imageView);
56 | executorService.submit(new PhotosLoader(p));
57 | }
58 |
59 | private Bitmap getBitmap(String url) {
60 | File f = fileCache.getFile(url);
61 |
62 | Bitmap b = decodeFile(f);
63 | if (b != null)
64 | return b;
65 |
66 | // Download Images from the Internet
67 | try {
68 | Bitmap bitmap = null;
69 | URL imageUrl = new URL(url);
70 | HttpURLConnection conn = (HttpURLConnection) imageUrl
71 | .openConnection();
72 | conn.setConnectTimeout(30000);
73 | conn.setReadTimeout(30000);
74 | conn.setInstanceFollowRedirects(true);
75 | InputStream is = conn.getInputStream();
76 | OutputStream os = new FileOutputStream(f);
77 | Utils.CopyStream(is, os);
78 | os.close();
79 | conn.disconnect();
80 | bitmap = decodeFile(f);
81 | return bitmap;
82 | } catch (Throwable ex) {
83 | ex.printStackTrace();
84 | if (ex instanceof OutOfMemoryError)
85 | memoryCache.clear();
86 | return null;
87 | }
88 | }
89 |
90 | // Decodes image and scales it to reduce memory consumption
91 | private Bitmap decodeFile(File f) {
92 | try {
93 | // Decode image size
94 | BitmapFactory.Options o = new BitmapFactory.Options();
95 | o.inJustDecodeBounds = true;
96 | FileInputStream stream1 = new FileInputStream(f);
97 | BitmapFactory.decodeStream(stream1, null, o);
98 | stream1.close();
99 |
100 | // Find the correct scale value. It should be the power of 2.
101 | // Recommended Size 512
102 | final int REQUIRED_SIZE = 70;
103 | int width_tmp = o.outWidth, height_tmp = o.outHeight;
104 | int scale = 1;
105 | while (true) {
106 | if (width_tmp / 2 < REQUIRED_SIZE
107 | || height_tmp / 2 < REQUIRED_SIZE)
108 | break;
109 | width_tmp /= 2;
110 | height_tmp /= 2;
111 | scale *= 2;
112 | }
113 |
114 | // Decode with inSampleSize
115 | BitmapFactory.Options o2 = new BitmapFactory.Options();
116 | o2.inSampleSize = scale;
117 | FileInputStream stream2 = new FileInputStream(f);
118 | Bitmap bitmap = BitmapFactory.decodeStream(stream2, null, o2);
119 | stream2.close();
120 | return bitmap;
121 | } catch (FileNotFoundException e) {
122 | } catch (IOException e) {
123 | e.printStackTrace();
124 | }
125 | return null;
126 | }
127 |
128 | // Task for the queue
129 | private class PhotoToLoad {
130 | public String url;
131 | public ImageView imageView;
132 |
133 | public PhotoToLoad(String u, ImageView i) {
134 | url = u;
135 | imageView = i;
136 | }
137 | }
138 |
139 | class PhotosLoader implements Runnable {
140 | PhotoToLoad photoToLoad;
141 |
142 | PhotosLoader(PhotoToLoad photoToLoad) {
143 | this.photoToLoad = photoToLoad;
144 | }
145 |
146 | @Override
147 | public void run() {
148 | try {
149 | if (imageViewReused(photoToLoad))
150 | return;
151 | Bitmap bmp = getBitmap(photoToLoad.url);
152 | memoryCache.put(photoToLoad.url, bmp);
153 | if (imageViewReused(photoToLoad))
154 | return;
155 | BitmapDisplayer bd = new BitmapDisplayer(bmp, photoToLoad);
156 | handler.post(bd);
157 | } catch (Throwable th) {
158 | th.printStackTrace();
159 | }
160 | }
161 | }
162 |
163 | boolean imageViewReused(PhotoToLoad photoToLoad) {
164 | String tag = imageViews.get(photoToLoad.imageView);
165 | if (tag == null || !tag.equals(photoToLoad.url))
166 | return true;
167 | return false;
168 | }
169 |
170 | // Used to display bitmap in the UI thread
171 | class BitmapDisplayer implements Runnable {
172 | Bitmap bitmap;
173 | PhotoToLoad photoToLoad;
174 |
175 | public BitmapDisplayer(Bitmap b, PhotoToLoad p) {
176 | bitmap = b;
177 | photoToLoad = p;
178 | }
179 |
180 | public void run() {
181 | if (imageViewReused(photoToLoad))
182 | return;
183 | if (bitmap != null)
184 | photoToLoad.imageView.setImageBitmap(bitmap);
185 | else
186 | photoToLoad.imageView.setImageResource(stub_id);
187 | }
188 | }
189 |
190 | public void clearCache() {
191 | memoryCache.clear();
192 | fileCache.clear();
193 | }
194 |
195 | }
--------------------------------------------------------------------------------
/app/src/main/java/id/co/imastudio/santri/jogjatourismplace/adapter/JSONfunctions.java:
--------------------------------------------------------------------------------
1 | package id.co.imastudio.santri.jogjatourismplace.adapter;
2 |
3 | import android.util.Log;
4 |
5 | import org.apache.http.HttpEntity;
6 | import org.apache.http.HttpResponse;
7 | import org.apache.http.client.HttpClient;
8 | import org.apache.http.client.methods.HttpPost;
9 | import org.apache.http.impl.client.DefaultHttpClient;
10 | import org.json.JSONException;
11 | import org.json.JSONObject;
12 |
13 | import java.io.BufferedReader;
14 | import java.io.InputStream;
15 | import java.io.InputStreamReader;
16 |
17 | public class JSONfunctions {
18 |
19 | public static JSONObject getJSONfromURL(String url) {
20 | InputStream is = null;
21 | String result = "";
22 | JSONObject jArray = null;
23 |
24 | // Download JSON data from URL
25 | try {
26 | HttpClient httpclient = new DefaultHttpClient();
27 | HttpPost httppost = new HttpPost(url);
28 | HttpResponse response = httpclient.execute(httppost);
29 | HttpEntity entity = response.getEntity();
30 | is = entity.getContent();
31 |
32 | } catch (Exception e) {
33 | Log.e("log_tag", "Error in http connection " + e.toString());
34 | }
35 |
36 | // Convert response to string
37 | try {
38 | BufferedReader reader = new BufferedReader(new InputStreamReader(
39 | is, "iso-8859-1"), 8);
40 | StringBuilder sb = new StringBuilder();
41 | String line = null;
42 | while ((line = reader.readLine()) != null) {
43 | sb.append(line + "\n");
44 | }
45 | is.close();
46 | result = sb.toString();
47 | } catch (Exception e) {
48 | Log.e("log_tag", "Error converting result " + e.toString());
49 | }
50 |
51 | try {
52 |
53 | jArray = new JSONObject(result);
54 | } catch (JSONException e) {
55 | Log.e("log_tag", "Error parsing data " + e.toString());
56 | }
57 |
58 | return jArray;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/app/src/main/java/id/co/imastudio/santri/jogjatourismplace/adapter/ListViewAdapter.java:
--------------------------------------------------------------------------------
1 | package id.co.imastudio.santri.jogjatourismplace.adapter;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.View.OnClickListener;
8 | import android.view.ViewGroup;
9 | import android.widget.BaseAdapter;
10 | import android.widget.ImageView;
11 | import android.widget.TextView;
12 |
13 | import java.util.ArrayList;
14 | import java.util.HashMap;
15 |
16 | import id.co.imastudio.santri.jogjatourismplace.ListWisata;
17 | import id.co.imastudio.santri.jogjatourismplace.R;
18 | import id.co.imastudio.santri.jogjatourismplace.SingleItemView;
19 |
20 | public class ListViewAdapter extends BaseAdapter {
21 |
22 | // Declare Variables
23 | Context context;
24 | LayoutInflater inflater;
25 | ArrayList> data;
26 | ImageLoader imageLoader;
27 | HashMap resultp = new HashMap();
28 |
29 | public ListViewAdapter(Context context,
30 | ArrayList> arraylist) {
31 | this.context = context;
32 | data = arraylist;
33 | imageLoader = new ImageLoader(context);
34 | }
35 |
36 | @Override
37 | public int getCount() {
38 | return data.size();
39 | }
40 |
41 | @Override
42 | public Object getItem(int position) {
43 | return null;
44 | }
45 |
46 | @Override
47 | public long getItemId(int position) {
48 | return 0;
49 | }
50 |
51 | public View getView(final int position, View convertView, ViewGroup parent) {
52 | // Declare Variables
53 | TextView judul;
54 | TextView alamat;
55 | TextView detail;
56 | ImageView gambar;
57 |
58 | inflater = (LayoutInflater) context
59 | .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
60 |
61 | View itemView = inflater.inflate(R.layout.listview_item, parent, false);
62 | // Get the position
63 | resultp = data.get(position);
64 |
65 | // Locate the TextViews in listview_item.xml
66 | judul = (TextView) itemView.findViewById(R.id.judul);
67 | alamat = (TextView) itemView.findViewById(R.id.alamat);
68 | detail = (TextView) itemView.findViewById(R.id.detail);
69 |
70 | // Locate the ImageView in listview_item.xml
71 | gambar = (ImageView) itemView.findViewById(R.id.gambar);
72 |
73 | // Capture position and set results to the TextViews
74 | judul.setText(resultp.get(ListWisata.JUDUL));
75 | alamat.setText(resultp.get(ListWisata.ALMAT));
76 | detail.setText(resultp.get(ListWisata.DETAIL));
77 | // Capture position and set results to the ImageView
78 | // Passes flag images URL into ImageLoader.class
79 | imageLoader.DisplayImage(resultp.get(ListWisata.GAMBAR), gambar);
80 | // Capture ListView item click
81 | itemView.setOnClickListener(new OnClickListener() {
82 |
83 | @Override
84 | public void onClick(View arg0) {
85 | // Get the position
86 | resultp = data.get(position);
87 | Intent intent = new Intent(context, SingleItemView.class);
88 | // Pass all data rank
89 | intent.putExtra("judul", resultp.get(ListWisata.JUDUL));
90 | // Pass all data country
91 | intent.putExtra("alamat", resultp.get(ListWisata.ALMAT));
92 | // Pass all data population
93 | intent.putExtra("detail",resultp.get(ListWisata.DETAIL));
94 | // Pass all data flag
95 | intent.putExtra("gambar", resultp.get(ListWisata.GAMBAR));
96 | // Start SingleItemView Class
97 | context.startActivity(intent);
98 |
99 | }
100 | });
101 | return itemView;
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/app/src/main/java/id/co/imastudio/santri/jogjatourismplace/adapter/MemoryCache.java:
--------------------------------------------------------------------------------
1 | package id.co.imastudio.santri.jogjatourismplace.adapter;
2 |
3 | import android.graphics.Bitmap;
4 | import android.util.Log;
5 |
6 | import java.util.Collections;
7 | import java.util.Iterator;
8 | import java.util.LinkedHashMap;
9 | import java.util.Map;
10 | import java.util.Map.Entry;
11 |
12 | public class MemoryCache {
13 |
14 | private static final String TAG = "MemoryCache";
15 |
16 | // Last argument true for LRU ordering
17 | private Map cache = Collections
18 | .synchronizedMap(new LinkedHashMap(10, 1.5f, true));
19 |
20 | // Current allocated size
21 | private long size = 0;
22 |
23 | // Max memory in bytes
24 | private long limit = 1000000;
25 |
26 | public MemoryCache() {
27 | // Use 25% of available heap size
28 | setLimit(Runtime.getRuntime().maxMemory() / 4);
29 | }
30 |
31 | public void setLimit(long new_limit) {
32 | limit = new_limit;
33 | Log.i(TAG, "MemoryCache will use up to " + limit / 1024. / 1024. + "MB");
34 | }
35 |
36 | public Bitmap get(String id) {
37 | try {
38 | if (!cache.containsKey(id))
39 | return null;
40 | return cache.get(id);
41 | } catch (NullPointerException ex) {
42 | ex.printStackTrace();
43 | return null;
44 | }
45 | }
46 |
47 | public void put(String id, Bitmap bitmap) {
48 | try {
49 | if (cache.containsKey(id))
50 | size -= getSizeInBytes(cache.get(id));
51 | cache.put(id, bitmap);
52 | size += getSizeInBytes(bitmap);
53 | checkSize();
54 | } catch (Throwable th) {
55 | th.printStackTrace();
56 | }
57 | }
58 |
59 | private void checkSize() {
60 | Log.i(TAG, "cache size=" + size + " length=" + cache.size());
61 | if (size > limit) {
62 | // Least recently accessed item will be the first one iterated
63 | Iterator> iter = cache.entrySet().iterator();
64 | while (iter.hasNext()) {
65 | Entry entry = iter.next();
66 | size -= getSizeInBytes(entry.getValue());
67 | iter.remove();
68 | if (size <= limit)
69 | break;
70 | }
71 | Log.i(TAG, "Clean cache. New size " + cache.size());
72 | }
73 | }
74 |
75 | public void clear() {
76 | try {
77 | cache.clear();
78 | size = 0;
79 | } catch (NullPointerException ex) {
80 | ex.printStackTrace();
81 | }
82 | }
83 |
84 | long getSizeInBytes(Bitmap bitmap) {
85 | if (bitmap == null)
86 | return 0;
87 | return bitmap.getRowBytes() * bitmap.getHeight();
88 | }
89 | }
--------------------------------------------------------------------------------
/app/src/main/java/id/co/imastudio/santri/jogjatourismplace/adapter/Utils.java:
--------------------------------------------------------------------------------
1 | package id.co.imastudio.santri.jogjatourismplace.adapter;
2 | import java.io.InputStream;
3 | import java.io.OutputStream;
4 |
5 | public class Utils {
6 | public static void CopyStream(InputStream is, OutputStream os)
7 | {
8 | final int buffer_size=1024;
9 | try
10 | {
11 | byte[] bytes=new byte[buffer_size];
12 | for(;;)
13 | {
14 | int count=is.read(bytes, 0, buffer_size);
15 | if(count==-1)
16 | break;
17 | os.write(bytes, 0, count);
18 | }
19 | }
20 | catch(Exception ex){}
21 | }
22 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_menu_camera.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_menu_gallery.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_menu_manage.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_menu_send.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_menu_share.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_menu_slideshow.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/jogjaicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/src/main/res/drawable/jogjaicon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/side_nav_bar.xml:
--------------------------------------------------------------------------------
1 |
3 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/temp_img.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/src/main/res/drawable/temp_img.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_error.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_list_wisata.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_login.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
26 | />
27 |
28 |
29 |
30 |
40 |
41 |
52 |
53 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_single_item_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
19 |
23 |
32 |
33 |
36 |
43 |
52 |
53 |
54 |
55 |
56 |
65 |
66 |
69 |
76 |
84 |
85 |
86 |
87 |
88 |
89 |
98 |
99 |
102 |
108 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
23 |
27 |
31 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/app_bar_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
20 |
21 |
22 |
23 |
24 |
25 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_listview.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/listview_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
20 |
21 |
22 |
28 |
29 |
38 |
39 |
40 |
49 |
50 |
51 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nav_header_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
21 |
22 |
28 |
29 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/activity_main_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/jogjaicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/src/main/res/mipmap-hdpi/jogjaicon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/jogjaicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/src/main/res/mipmap-xxhdpi/jogjaicon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #76ff03
4 | #64dd17
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 | 160dp
7 | 16dp
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/drawables.xml:
--------------------------------------------------------------------------------
1 |
2 | - @android:drawable/ic_menu_camera
3 | - @android:drawable/ic_menu_gallery
4 | - @android:drawable/ic_menu_slideshow
5 | - @android:drawable/ic_menu_manage
6 | - @android:drawable/ic_menu_share
7 | - @android:drawable/ic_menu_send
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Jogja Tourism Place
3 |
4 | Open navigation drawer
5 | Close navigation drawer
6 |
7 | Settings
8 | Sign in
9 |
10 |
11 | Email
12 | Password (optional)
13 | Sign in or register
14 | Sign in
15 | This email address is invalid
16 | This password is too short
17 | This password is incorrect
18 | This field is required
19 | "Contacts permissions are needed for providing email
20 | completions."
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/test/java/id/co/imastudio/santri/jogjatourismplace/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package id.co.imastudio.santri.jogjatourismplace;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.3.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Aug 12 19:49:56 ICT 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/jogjaToursim.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/basriumar12/hacktoberFest/7648bdfb651429dad667b86c005314305f7fdb4b/jogjaToursim.jks
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------