Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. @Override
  2. public void onClick(View view) {
  3. //Fragment fragment = null;
  4.  
  5.  
  6. getLocation getLocation = new getLocation();
  7. switch (view.getId()) {
  8. case R.id.SearchButton:
  9.  
  10. getLocation.execute();
  11.  
  12. break;
  13. }
  14. }
  15.  
  16. public class getLocation extends AsyncTask<Void, Void, Void>{
  17.  
  18.  
  19. protected void doInBackground(String... strings) {
  20.  
  21.  
  22. }
  23.  
  24.  
  25. protected void onPreExecute(String... strings){
  26.  
  27. }
  28.  
  29.  
  30. protected void onPostExecute(){
  31. Home activity = (Home) getActivity();//---> After app gets coordinates from anywhere, it launches next fragment with the map.
  32. if(activity != null)activity.openMapFragment();
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement