Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onClick(View view) {
- //Fragment fragment = null;
- getLocation getLocation = new getLocation();
- switch (view.getId()) {
- case R.id.SearchButton:
- getLocation.execute();
- break;
- }
- }
- public class getLocation extends AsyncTask<Void, Void, Void>{
- protected void doInBackground(String... strings) {
- }
- protected void onPreExecute(String... strings){
- }
- protected void onPostExecute(){
- Home activity = (Home) getActivity();//---> After app gets coordinates from anywhere, it launches next fragment with the map.
- if(activity != null)activity.openMapFragment();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement