diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/MapActivity.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/MapActivity.java index edae8ec..f285b1f 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/MapActivity.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/MapActivity.java @@ -731,36 +731,18 @@ public class MapActivity extends BaseActivity public void infoDialog(View anchorView) { - View popupView = getLayoutInflater().inflate(R.layout.info_popup_map, null); - PopupWindow popupWindow = new PopupWindow(popupView, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); - - // Example: If you have a TextView inside `popup_layout.xml` -// TextView tv = (TextView) popupView.findViewById(R.id.textViewAAA); -// -// tv.setText("aaaaa"); - - // Initialize more widgets from `popup_layout.xml` -// .... -// .... - // If the PopupWindow should be focusable popupWindow.setFocusable(true); - // If you need the PopupWindow to dismiss when when touched outside popupWindow.setBackgroundDrawable(new ColorDrawable()); - int location[] = new int[2]; - // Get the View's(the one that was clicked in the Fragment) location anchorView.getLocationOnScreen(location); - // Using location, the PopupWindow will be displayed right under anchorView popupWindow.showAtLocation(anchorView, Gravity.NO_GRAVITY, - location[0], location[1] + anchorView.getHeight()); - + location[0] + anchorView.getWidth(), location[1] + anchorView.getHeight()); } - } \ No newline at end of file