Correction du scroll automatique qui remontait au début du dernier message#83
Open
Spriana wants to merge 1 commit into
Open
Correction du scroll automatique qui remontait au début du dernier message#83Spriana wants to merge 1 commit into
Spriana wants to merge 1 commit into
Conversation
…ssage. Quand le dernier message était plus grand que l'écran et qu'on rafraichissait en étant tout en bas, la vue remontait pour afficher le haut de ce message au lieu de rester en bas : setSelection aligne le haut de l'item visé sur le haut de la liste, et smoothScrollToPosition fait pareil quand l'item est déjà partiellement visible (AbsListView.PositionScroller.scrollToVisible privilégie le bord haut). Le saut instantané passe donc par TRANSCRIPT_MODE_ALWAYS_SCROLL, qui fait le layout à partir du bas de la liste, et le scroll animé calcule lui-même la distance restante après le layout provoqué par les nouveaux messages (avec repli sur smoothScrollToPosition quand le dernier message est encore hors écran, cas où celui-ci finit bien aligné en bas). Corrige #1. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Je n’ai pas personnellement testé ; Claude a testé dans l’émulateur :