From 6d48b058f92e696173e6d08f41f40df0314f4bc9 Mon Sep 17 00:00:00 2001 From: Alexander Borsuk Date: Sun, 26 Dec 2021 14:16:47 +0100 Subject: [PATCH] Revert "[android] Add a workaround for broken PlacePageView after Search/Edit" These hacks did not work properly. A better solution is needed. This reverts commits 41a117ef23 58dcdc6334 1f8c0667b2 Signed-off-by: Alexander Borsuk --- .../maps/widget/placepage/PlacePageButtons.java | 5 ----- .../maps/widget/placepage/PlacePageView.java | 15 --------------- android/src/com/mapswithme/util/Utils.java | 5 ----- 3 files changed, 25 deletions(-) diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageButtons.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageButtons.java index 2bec155182..10b641eab2 100644 --- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageButtons.java +++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageButtons.java @@ -293,11 +293,6 @@ public final class PlacePageButtons mMaxButtons = mPlacePage.getContext().getResources().getInteger(R.integer.pp_buttons_max); } - ViewGroup getFrame() - { - return mFrame; - } - private @NonNull List collectButtons(List items) { List res = new ArrayList<>(items); diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java index 9a06451abc..a423155851 100644 --- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java +++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java @@ -774,21 +774,6 @@ public class PlacePageView extends NestedScrollViewClickFixed refreshPreview(mMapObject); refreshDetails(mMapObject); refreshViewsInternal(mMapObject); - - // - // The view is completely broken after the first call to refreshView(): - // https://github.com/organicmaps/organicmaps/issues/722 - // https://github.com/organicmaps/organicmaps/issues/1065 - // - // Force re-layout explicitly on the next event loop after the first call to refreshView(). - // - if (Utils.isAndroid11OrLater()) { - post(() -> { - mPreview.requestLayout(); - mDetails.requestLayout(); - mButtons.getFrame().requestLayout(); - }); - } } private void refreshViewsInternal(@NonNull MapObject mapObject) diff --git a/android/src/com/mapswithme/util/Utils.java b/android/src/com/mapswithme/util/Utils.java index 16194394c2..f5ae471c3c 100644 --- a/android/src/com/mapswithme/util/Utils.java +++ b/android/src/com/mapswithme/util/Utils.java @@ -78,11 +78,6 @@ public class Utils return isTargetOrLater(Build.VERSION_CODES.O); } - public static boolean isAndroid11OrLater() - { - return isTargetOrLater(Build.VERSION_CODES.R); - } - private static boolean isTargetOrLater(int target) { return Build.VERSION.SDK_INT >= target;