Skip to content

Commit 2695bba

Browse files
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
1 parent 37c39ad commit 2695bba

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java

+8
Original file line numberDiff line numberDiff line change
@@ -1543,4 +1543,12 @@ public interface NearbyParentFragmentInstanceReadyCallback{
15431543
public void setNearbyParentFragmentInstanceReadyCallback(NearbyParentFragmentInstanceReadyCallback nearbyParentFragmentInstanceReadyCallback) {
15441544
this.nearbyParentFragmentInstanceReadyCallback = nearbyParentFragmentInstanceReadyCallback;
15451545
}
1546+
1547+
@Override
1548+
public void onConfigurationChanged(@NonNull final Configuration newConfig) {
1549+
super.onConfigurationChanged(newConfig);
1550+
ViewGroup.LayoutParams rlBottomSheetLayoutParams = rlBottomSheet.getLayoutParams();
1551+
rlBottomSheetLayoutParams.height = getActivity().getWindowManager().getDefaultDisplay().getHeight() / 16 * 9;
1552+
rlBottomSheet.setLayoutParams(rlBottomSheetLayoutParams);
1553+
}
15461554
}

0 commit comments

Comments
 (0)