fix- #2770 -Incomplete Nearby List shown in Landscape mode (#4188)

* fix-Incomplete Nearby List shown in Landscape mode (#2270)

* fix-Incomplete Nearby List shown in Landscape mode (#2770)

* added the setLayoutParams() method

* reformed the codechange
This commit is contained in:
Prince kushwaha 2021-02-15 23:31:48 +05:30 committed by GitHub
parent 37c39ad55f
commit 2695bbaf4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1543,4 +1543,12 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
public void setNearbyParentFragmentInstanceReadyCallback(NearbyParentFragmentInstanceReadyCallback nearbyParentFragmentInstanceReadyCallback) { public void setNearbyParentFragmentInstanceReadyCallback(NearbyParentFragmentInstanceReadyCallback nearbyParentFragmentInstanceReadyCallback) {
this.nearbyParentFragmentInstanceReadyCallback = nearbyParentFragmentInstanceReadyCallback; this.nearbyParentFragmentInstanceReadyCallback = nearbyParentFragmentInstanceReadyCallback;
} }
@Override
public void onConfigurationChanged(@NonNull final Configuration newConfig) {
super.onConfigurationChanged(newConfig);
ViewGroup.LayoutParams rlBottomSheetLayoutParams = rlBottomSheet.getLayoutParams();
rlBottomSheetLayoutParams.height = getActivity().getWindowManager().getDefaultDisplay().getHeight() / 16 * 9;
rlBottomSheet.setLayoutParams(rlBottomSheetLayoutParams);
}
} }