Assigned
Status Update
Comments
sh...@gmail.com <sh...@gmail.com> #2
I face with the same problem. I have different pageMargin in landscape and portrait and when viewpager is scrolled for the more than first position, after rotating device it is shifted.
I beleive the problem is inside onSizeChanged that is called after onConfigurationChanged, it has following code:
if (w != oldw) {
recomputeScrollPosition(w, oldw, mPageMargin, mPageMargin);
}
w always not equals oldw when changing orientation, so recomputeScrollPosition is called, but whit the same values for margin and oldMargin.
This should be fixed.
I beleive the problem is inside onSizeChanged that is called after onConfigurationChanged, it has following code:
if (w != oldw) {
recomputeScrollPosition(w, oldw, mPageMargin, mPageMargin);
}
w always not equals oldw when changing orientation, so recomputeScrollPosition is called, but whit the same values for margin and oldMargin.
This should be fixed.
hu...@google.com <hu...@google.com>
gm...@gmail.com <gm...@gmail.com> #3
[Comment deleted]
sp...@google.com <sp...@google.com>
sp...@google.com <sp...@google.com> #4
I found the same problem in suport library v4, wrong align happens only when ViewPager has a page margin > 0.
sp...@google.com <sp...@google.com> #5
[Comment deleted]
gm...@gmail.com <gm...@gmail.com> #6
The issue is still reproducible in support library v4 (rev. 18).
I managed to fix the issue by importing the source code of ViewPager in my project and modifying from onSizeChanged method the following line:
From:
if (w != oldw) {
recomputeScrollPosition(w, oldw, mPageMargin, mPageMargin);
}
To:
if (w != oldw) {
recomputeScrollPosition(w, oldw, 0, 0);
}
I managed to fix the issue by importing the source code of ViewPager in my project and modifying from onSizeChanged method the following line:
From:
if (w != oldw) {
recomputeScrollPosition(w, oldw, mPageMargin, mPageMargin);
}
To:
if (w != oldw) {
recomputeScrollPosition(w, oldw, 0, 0);
}
sp...@google.com <sp...@google.com> #7
I use this little wrapper as a work around for the bug:
ublic class FixedViewPager extends ViewPager {
public FixedViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
public FixedViewPager(Context context) {
super(context);
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w-this.getPageMargin(), h, oldw-this.getPageMargin(), oldh);
}
}
ublic class FixedViewPager extends ViewPager {
public FixedViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
public FixedViewPager(Context context) {
super(context);
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w-this.getPageMargin(), h, oldw-this.getPageMargin(), oldh);
}
}
Description
I am experiencing an issue with the BiometricPrompt on Android 13 (API 32). When a user is locked out of biometric authentication due to too many failed attempts, the BiometricPrompt does not appear, and the onAuthenticationError() callback is not triggered.
Additionally, there seems to be no direct way to detect if the user is permanently locked out of biometric authentication. I tried using the BiometricManager's canAuthenticate() method, but it does not return specific error codes for lockout situations like ERROR_LOCKOUT or ERROR_LOCKOUT_PERMANENT.
This behavior makes it difficult to handle lockout scenarios properly in the app and provide appropriate feedback to the user.
I would appreciate it if you could look into this issue and provide guidance on how to handle lockout situations, especially for detecting permanent lockouts, in Android 13 using the AndroidX Biometric library.
Thank you for your attention to this matter.