forked from organicmaps/organicmaps
Fixed global layout removal for old APIs.
This commit is contained in:
parent
1ac56fec64
commit
1aa8c8e4b7
1 changed files with 6 additions and 1 deletions
|
@ -1022,11 +1022,16 @@ public class MWMActivity extends BaseMwmFragmentActivity
|
|||
{
|
||||
mFadeView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener()
|
||||
{
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void onGlobalLayout()
|
||||
{
|
||||
refreshZoomButtonsVisibility();
|
||||
mFadeView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
|
||||
mFadeView.getViewTreeObserver().removeGlobalOnLayoutListener(this);
|
||||
} else {
|
||||
mFadeView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue