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){
|
if (item.getItemId()==R.id.action_info){
|
||||||
|
|
||||||
int layoutID;
|
int layoutID;
|
||||||
switch (activeFragment){
|
switch (activeFragment){
|
||||||
case SHARED_PREFERENCES:
|
case SHARED_PREFERENCES:
|
||||||
@ -344,19 +343,11 @@ public abstract class BaseActivity
|
|||||||
popupWindow.setFocusable(true);
|
popupWindow.setFocusable(true);
|
||||||
// If you need the PopupWindow to dismiss when when touched outside
|
// If you need the PopupWindow to dismiss when when touched outside
|
||||||
popupWindow.setBackgroundDrawable(new ColorDrawable());
|
popupWindow.setBackgroundDrawable(new ColorDrawable());
|
||||||
int location[] = new int[2];
|
|
||||||
// Get the View's(the one that was clicked in the Fragment) location
|
// Get the View's(the one that was clicked in the Fragment) location
|
||||||
View anchorView= getWindow().getDecorView().findViewById(android.R.id.content);
|
View anchorView= getWindow().getDecorView().findViewById(android.R.id.content);
|
||||||
|
popupWindow.showAtLocation(anchorView,Gravity.TOP|Gravity.END, 0, 0);
|
||||||
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());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return super.onOptionsItemSelected(item);
|
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);
|
selectLocationButton = findViewById(R.id.select_location_button);
|
||||||
removeLocationButton = findViewById(R.id.remove_location_button);
|
removeLocationButton = findViewById(R.id.remove_location_button);
|
||||||
mapView = findViewById(R.id.mapView);
|
mapView = findViewById(R.id.mapView);
|
||||||
|
@ -84,7 +84,6 @@ public class UsersListFragment extends Fragment {
|
|||||||
|
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
ButterKnife.bind(this, view);
|
ButterKnife.bind(this, view);
|
||||||
view.findViewById(R.id.userListInfoImageButton).setOnClickListener(v -> InfoHelperUtils.infoPopUp(v,R.layout.info_popup_userlist));
|
|
||||||
|
|
||||||
userService = ApiClient.getClient(getApplicationContext())
|
userService = ApiClient.getClient(getApplicationContext())
|
||||||
.create(UserService.class);
|
.create(UserService.class);
|
||||||
|
@ -20,12 +20,6 @@
|
|||||||
|
|
||||||
</com.mapbox.mapboxsdk.maps.MapView>
|
</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
|
<LinearLayout
|
||||||
android:id="@+id/linearLayout2"
|
android:id="@+id/linearLayout2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
android:fontFamily="@font/lato_regular"
|
android:fontFamily="@font/lato_regular"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.uam.wmi.findmytutor.utils.SharingInfoPopupButtonPreference/>
|
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="@string/settings_category_location"
|
android:title="@string/settings_category_location"
|
||||||
android:key="category_sharing">
|
android:key="category_sharing">
|
||||||
|
@ -10,13 +10,6 @@
|
|||||||
|
|
||||||
<include layout="@layout/users_list_main" />
|
<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>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user