mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Add click actoion to bottom sheet details
This commit is contained in:
parent
9007ae5cd4
commit
7feed0a9e2
1 changed files with 15 additions and 0 deletions
|
|
@ -231,6 +231,21 @@ public class NearbyTestLayersFragment extends CommonsDaggerSupportFragment imple
|
|||
}
|
||||
});
|
||||
|
||||
bottomSheetDetails.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (bottomSheetDetailsBehavior.getState() == BottomSheetBehavior.STATE_COLLAPSED) {
|
||||
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||
} else if (bottomSheetDetailsBehavior.getState() == BottomSheetBehavior.STATE_EXPANDED) {
|
||||
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
bottomSheetList.getLayoutParams().height = getActivity().getWindowManager()
|
||||
.getDefaultDisplay().getHeight() / 16 * 9;
|
||||
bottomSheetListBehavior = BottomSheetBehavior.from(bottomSheetList);
|
||||
|
||||
bottomSheetListBehavior.setBottomSheetCallback(new BottomSheetBehavior
|
||||
.BottomSheetCallback() {
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue