From cd07c498faf8f012c194fe8bfde703bd34683af3 Mon Sep 17 00:00:00 2001 From: andresmr Date: Thu, 22 Feb 2024 13:44:50 +0100 Subject: [PATCH] [ANDROAPP-5800] set rounded corners on show filters landscape --- .../searchTrackEntity/SearchTEActivity.java | 12 +++++++++--- app/src/main/res/layout-land/activity_search.xml | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchTEActivity.java b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchTEActivity.java index 2cf88b2dd3..3e370828e3 100644 --- a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchTEActivity.java +++ b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchTEActivity.java @@ -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); diff --git a/app/src/main/res/layout-land/activity_search.xml b/app/src/main/res/layout-land/activity_search.xml index 5f3e0c6fac..4d15c913a0 100644 --- a/app/src/main/res/layout-land/activity_search.xml +++ b/app/src/main/res/layout-land/activity_search.xml @@ -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"