PDF viewer: a single tap while reading exits the document to a full-screen single-page view
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 72/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Domínio
- mobile-dev
Direção de pesquisa
Comece rastreando o fluxo de clique em PreviewPdfAdapter.kt, PreviewPdfFragment.kt e PreviewPdfViewModel.kt, começando pelo OnClickListener da página inteira no adapter. Use as etapas de reprodução para comparar o comportamento dos gestos e a navegação antes e depois da alteração. Considera-se concluído quando um único toque durante a leitura não abre inesperadamente a visualização separada da página em tela cheia e a posição de leitura é preservada.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
⚠️ Before posting ⚠️
- This is a bug, not a question or an enhancement.
- I've searched for similar issues and didn't find a duplicate.
- I've written a clear and descriptive title for this issue.
- I agree to follow Nextcloud's Code of Conduct.
Steps to reproduce
- Open a multi-page PDF from the Files list (native in-app viewer, not "open with" / browser).
- Scroll down a few pages.
- While reading, tap once anywhere on the page (no drag).
- The app opens a separate full-screen view showing only that single page.
- Press back → you return to the document but the reading/scroll position is lost (back near the top).
Expected behaviour
A single tap on the page while reading should not leave the scrollable document, and the reading position must be preserved. Accidental taps are very frequent when reading a long PDF one-handed.
Actual behaviour
PreviewPdfAdapter registers an OnClickListener on the whole page view. Any click on a page calls PreviewPdfViewModel.onClickPage(), which writes the page bitmap to a temp file and launches PreviewBitmapActivity — a separate full-screen activity showing only the tapped page, outside the scrollable RecyclerView. Coming back from it drops the reading position.
Source (current master)
app/src/main/java/com/owncloud/android/ui/preview/pdf/PreviewPdfAdapter.ktL33-35 —binding.root.setOnClickListener { onClickListener(bitmap) }: whole-page click target, no gesture discrimination.app/src/main/java/com/owncloud/android/ui/preview/pdf/PreviewPdfFragment.ktL79-92 — click →viewModel.onClickPage(page)→ observer onpreviewImagePathstartsPreviewBitmapActivity.app/src/main/java/com/owncloud/android/ui/preview/pdf/PreviewPdfViewModel.ktL55-61 —onClickPage()saves the bitmap to cache and sets_previewImagePath.
Android version
16
Device brand and model
Xiaomi Poco X7 Pro 5G
Stock or custom OS?
Stock (Xiaomi HyperOS)
Nextcloud android app version
34.1.1
Nextcloud server version
34.0.3
Using a reverse proxy?
Yes (Traefik) — not relevant, PDF rendering is fully client-side.
Additional information
The full-screen single-page view appears intended as a "tap to zoom" feature, but bound to a plain click on the entire page it fires on every accidental tap during reading. Possible directions: require a double-tap for the zoom view, shrink the tap target, or at least preserve/restore the RecyclerView scroll position when returning from PreviewBitmapActivity.
- Linguagem predominante
- Kotlin
- Estrelas
- 5.7k
- Forks
- 2.1k
- Merge médio
- 1d 22h
- PRs com merge (30d)
- 135
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de nextcloud/android
-
0. Needs triage bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 86/100
nextcloud/android#17845 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
[Bug] Lock owned by another client (e.g. Text app) cannot be unlocked from the appTalvez já em andamento @falkloewert assumiu há 28 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
nextcloud/android#17837 · 2 reações ·
Mantenedores costumam responder em até 1 dia
-
0. Needs triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
nextcloud/android#17533 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
RC 34.1.0-01: Duplicated wording in creation menu — "New" prefix + creator name produces "New New document" ("Neu Neues Dokument")Talvez já em andamento @ChristianTannheimer assumiu há 118 dias. Aberta0. Needs triage bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia
Todas as issues de nextcloud/android
Issues semelhantes
-
Failures in nested test classes (Outer$Inner) are not annotated on their source fileTalvez já em andamento @NopeCharon assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
mikepenz/action-junit-report#1661 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Kotlin/kotlin-lsp#309 ·
-
Two stored artist rows are not act names: "DJS" from a Renate floor heading and "Stevie Cox -"Abertaarea:data-quality importer size:S
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
enorm-labs/event-junkie#5136 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Mantenedores costumam responder em até 1 dia
-
Type: Possible bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
spacecowboy/Feeder#1318 ·
Mantenedores costumam responder em até 1 dia