Skip to content

Commit

Permalink
[ANDROAPP-5800] set rounded corners on show filters landscape
Browse files Browse the repository at this point in the history
  • Loading branch information
andresmr committed Feb 22, 2024
1 parent 9324f0e commit cd07c49
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,16 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
binding.setPresenter(presenter);
binding.setTotalFilters(FilterManager.getInstance().getTotalFilters());

if (OrientationUtilsKt.isPortrait()) {
ViewExtensionsKt.clipWithRoundedCorners(binding.mainComponent, ExtensionsKt.getDp(16));
if (OrientationUtilsKt.isLandscape()) {
viewModel.getFiltersOpened().observe(this, isOpened -> {
if (isOpened) {
ViewExtensionsKt.clipWithRoundedCorners(binding.mainComponent, ExtensionsKt.getDp(16));
} else {
ViewExtensionsKt.clipWithTopRightRoundedCorner(binding.mainComponent, ExtensionsKt.getDp(16));
}
});
} else {
ViewExtensionsKt.clipWithTopRightRoundedCorner(binding.mainComponent, ExtensionsKt.getDp(16));
ViewExtensionsKt.clipWithRoundedCorners(binding.mainComponent, ExtensionsKt.getDp(16));
}

binding.filterRecyclerLayout.setAdapter(filtersAdapter);
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout-land/activity_search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
android:id="@+id/mainComponent"
android:layout_width="0dp"
android:layout_height="0dp"
android:animateLayoutChanges="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/backdropGuideDiv"
Expand Down

0 comments on commit cd07c49

Please sign in to comment.