android / android/camera-samples

CameraXBasic - Buttons onClick events are not triggered the very first time the app is launched

Offen
#305 2 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @owahltinez Auf GitHub ansehen
Vorherrschende Sprache
Kotlin
Sterne
5.5k
Forks
2.4k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Long story short: You need to click anywhere in the screen at least once, prior to have any click listener event to work.

Steps to reproduce:
- Start the Camera Activity from the scratch.
- Make sure the first thing you click within that screen is any of the control buttons (switch/capture/gallery).

Actual Result:
- Nothing happens, it is just like if you haven't even clicked anything.

Expected Result:
- The events should be triggered.

Some additional details:
- I tried commenting out the PreviewView and launch the same activity. The issue is not happening when I do that, so that might point out that it is something related to PreviewView.
- It happens for absolutely any kind of button: (Button/MaterialButton/AppCompatButton and so on). I haven't tried with any other kind of views, but I suspect the result would end up the same.
- Once you have clicked one time anywhere, all the events start working as expected.

Affected Versions:
- CameraX 1.0.0-beta09/1.0.0-beta08
- CameraX Extensions 1.0.0-alpha16/1.0.0-alpha15

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.