Fixed fast scroll thumb

pull/168/head
M66B 5 years ago
parent e1bf066ff6
commit 0b054475c9

@ -50,7 +50,7 @@ Related questions:
* A [bug in Android](https://issuetracker.google.com/issues/37018931) sometimes causes a crash with *... InputChannel is not initialized ...* on some devices. * A [bug in Android](https://issuetracker.google.com/issues/37018931) sometimes causes a crash with *... InputChannel is not initialized ...* on some devices.
* A bug in Nova Launcher on Android 5.x lets FairEmail crash with a *java.lang.StackOverflowError* when Nova Launcher has access to the accessibility service. * A bug in Nova Launcher on Android 5.x lets FairEmail crash with a *java.lang.StackOverflowError* when Nova Launcher has access to the accessibility service.
* The folder selector sometimes shows no folders for yet unknown reasons. * The folder selector sometimes shows no folders for yet unknown reasons.
* A [bug in AndroidX](https://issuetracker.google.com/issues/64729576) makes it hard to grap the fast scroller. * ~~A [bug in AndroidX](https://issuetracker.google.com/issues/64729576) makes it hard to grap the fast scroller. A workaround was added.~~
* ~~Encryption with YubiKey results into an infinite loop. This seems to be caused by a [bug in OpenKeychain](https://github.com/open-keychain/open-keychain/issues/2507).~~ * ~~Encryption with YubiKey results into an infinite loop. This seems to be caused by a [bug in OpenKeychain](https://github.com/open-keychain/open-keychain/issues/2507).~~
* Scrolling to an internal linked location in original messages does not work. This can't be fixed because the original message view is contained in a scrolling view. * Scrolling to an internal linked location in original messages does not work. This can't be fixed because the original message view is contained in a scrolling view.
* A preview of the message text doesn't (always) appear on a Samsung watch because [setLocalOnly](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder.html#setLocalOnly(boolean)) seem to be ignored. However, message preview texts are known to appear correctly on a Pebble 2, a Fitbit Charge 3 and a Mi band 3. See also [this FAQ](#user-content-faq126). * A preview of the message text doesn't (always) appear on a Samsung watch because [setLocalOnly](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder.html#setLocalOnly(boolean)) seem to be ignored. However, message preview texts are known to appear correctly on a Pebble 2, a Fitbit Charge 3 and a Mi band 3. See also [this FAQ](#user-content-faq126).

@ -359,6 +359,7 @@ public class FastScrollerEx extends RecyclerView.ItemDecoration implements Recyc
(int) ((verticalVisibleLength * middleScreenPos) / verticalContentLength); (int) ((verticalVisibleLength * middleScreenPos) / verticalContentLength);
mVerticalThumbHeight = Math.min(verticalVisibleLength, mVerticalThumbHeight = Math.min(verticalVisibleLength,
(verticalVisibleLength * verticalVisibleLength) / verticalContentLength); (verticalVisibleLength * verticalVisibleLength) / verticalContentLength);
mVerticalThumbHeight = Math.max(mVerticalThumbHeight, mVerticalThumbDrawable.getIntrinsicHeight());
} }
if (mNeedHorizontalScrollbar) { if (mNeedHorizontalScrollbar) {

@ -3,11 +3,13 @@
<item android:state_pressed="true"> <item android:state_pressed="true">
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<solid android:color="?attr/colorAccent" /> <solid android:color="?attr/colorAccent" />
<size android:width="9dp" android:height="60dp" />
</shape> </shape>
</item> </item>
<item> <item>
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<solid android:color="?attr/colorSeparator" /> <solid android:color="?attr/colorSeparator" />
<size android:width="9dp" android:height="60dp" />
</shape> </shape>
</item> </item>
</selector> </selector>
Loading…
Cancel
Save