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 <me@alex.bio>
This commit is contained in:
Alexander Borsuk 2021-12-26 14:16:47 +01:00 committed by Alexander Borsuk
parent a16b253331
commit 6d48b058f9
3 changed files with 0 additions and 25 deletions

View file

@ -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<PlacePageButtons.PlacePageButton> collectButtons(List<PlacePageButtons.PlacePageButton> items)
{
List<PlacePageButtons.PlacePageButton> res = new ArrayList<>(items);

View file

@ -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)

View file

@ -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;