Fix #2245: Correct back button behaviour from nearby fragment (#2301)

This commit is contained in:
Vanshika Arora 2019-03-16 21:57:25 +05:30 committed by Adam Jones
parent a26b62f51b
commit 9d55c1e8d7
2 changed files with 15 additions and 6 deletions

View file

@ -132,14 +132,13 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
/**
* Hide or expand bottom sheet according to states of all sheets
*/
public void listOptionMenuIteClicked() {
public void listOptionMenuItemClicked() {
if(bottomSheetBehavior.getState()==BottomSheetBehavior.STATE_COLLAPSED || bottomSheetBehavior.getState()==BottomSheetBehavior.STATE_HIDDEN){
bottomSheetBehaviorForDetails.setState(BottomSheetBehavior.STATE_HIDDEN);
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
}else if(bottomSheetBehavior.getState()==BottomSheetBehavior.STATE_EXPANDED){
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
}
}
/**
@ -822,6 +821,9 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
locationManager.unregisterLocationManager();
}
}
public boolean isBottomSheetExpanded() { return bottomSheetBehavior.getState() == BottomSheetBehavior.STATE_EXPANDED;
}
}