info icon at toolbar + clean up
This commit is contained in:
parent
672a6bee06
commit
dee33a2ec3
@ -323,7 +323,6 @@ public abstract class BaseActivity
|
||||
}
|
||||
|
||||
if (item.getItemId()==R.id.action_info){
|
||||
|
||||
int layoutID;
|
||||
switch (activeFragment){
|
||||
case SHARED_PREFERENCES:
|
||||
@ -344,19 +343,11 @@ public abstract class BaseActivity
|
||||
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
|
||||
View anchorView= getWindow().getDecorView().findViewById(android.R.id.content);
|
||||
|
||||
anchorView.getLocationOnScreen(location);
|
||||
// Using location, the PopupWindow will be displayed right under anchorView
|
||||
// popupWindow.showAsDropDown(anchorView,6,170,Gravity.RIGHT|Gravity.CENTER);
|
||||
popupWindow.showAtLocation(anchorView,Gravity.TOP|Gravity.RIGHT, 0, 0);
|
||||
// popupWindow.showAtLocation(anchorView, Gravity.NO_GRAVITY,
|
||||
// location[0] + anchorView.getWidth() / 2, location[1] + anchorView.getHeight());
|
||||
popupWindow.showAtLocation(anchorView,Gravity.TOP|Gravity.END, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
|
@ -131,8 +131,6 @@ public class MapActivity extends BaseActivity
|
||||
|
||||
};
|
||||
|
||||
|
||||
findViewById(R.id.mapInfoImageButton).setOnClickListener(v-> InfoHelperUtils.infoPopUp(v, R.layout.info_popup_map));
|
||||
selectLocationButton = findViewById(R.id.select_location_button);
|
||||
removeLocationButton = findViewById(R.id.remove_location_button);
|
||||
mapView = findViewById(R.id.mapView);
|
||||
|
@ -84,7 +84,6 @@ public class UsersListFragment extends Fragment {
|
||||
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
ButterKnife.bind(this, view);
|
||||
view.findViewById(R.id.userListInfoImageButton).setOnClickListener(v -> InfoHelperUtils.infoPopUp(v,R.layout.info_popup_userlist));
|
||||
|
||||
userService = ApiClient.getClient(getApplicationContext())
|
||||
.create(UserService.class);
|
||||
|
@ -20,12 +20,6 @@
|
||||
|
||||
</com.mapbox.mapboxsdk.maps.MapView>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/mapInfoImageButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
mapbox:srcCompat="@drawable/outline_info_24"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout2"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -6,8 +6,6 @@
|
||||
android:fontFamily="@font/lato_regular"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.uam.wmi.findmytutor.utils.SharingInfoPopupButtonPreference/>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/settings_category_location"
|
||||
android:key="category_sharing">
|
||||
|
@ -10,13 +10,6 @@
|
||||
|
||||
<include layout="@layout/users_list_main" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/userListInfoImageButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
mapbox:srcCompat="@drawable/outline_info_24"/>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user