Closed malikmotani closed 2 years ago
In devices like Samsung M20 and few Honor devices, I found this issue. This is how I have fixed it but not sure it will work on every device.
public int temp = 0; public void initStickyFooter(int measuredHeight, int initialStickyFooterLocation) { if (!heightAdded) { heightAdded = true; mStickyFooterHeight = (int) (measuredHeight + (MyApp.appContext.getResources().getDimension(R.dimen.space_sticky_footer))); if (temp == 0) { temp = getSoftButtonsBarHeight(); } if (temp > 200) { mStickyFooterHeight -= temp / 2.1; } } mStickyFooterInitialLocation = initialStickyFooterLocation; mStickyFooterInitialTranslation = mDeviceHeight - initialStickyFooterLocation - mStickyFooterHeight; if (mStickyFooterInitialLocation > mDeviceHeight - mStickyFooterHeight) { mStickyScrollPresentation.stickFooter(mStickyFooterInitialTranslation); mIsFooterSticky = true; } } private int getSoftButtonsBarHeight() { // getRealMetrics is only available with API 17 and + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { DisplayMetrics metrics = new DisplayMetrics(); MyApp.appContext.currentActivity.getWindowManager().getDefaultDisplay().getMetrics(metrics); int usableHeight = metrics.heightPixels; MyApp.appContext.currentActivity.getWindowManager().getDefaultDisplay().getRealMetrics(metrics); int realHeight = metrics.heightPixels; if (realHeight > usableHeight) return realHeight - usableHeight; else return 0; } return 0; }
@malikmotani Did you update the system navigation from Gesture to 3-button while the screen with StickyScrollView was open in the background?
Fixed in v1.0.3
In devices like Samsung M20 and few Honor devices, I found this issue. This is how I have fixed it but not sure it will work on every device.