forked from organicmaps/organicmaps
Revert "[android] Add a workaround for broken PlacePageView after Search/Edit"
These hacks did not work properly. A better solution is needed. This reverts commits41a117ef23
58dcdc6334
1f8c0667b2
Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
parent
a16b253331
commit
6d48b058f9
3 changed files with 0 additions and 25 deletions
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue