android / android/camera-samples

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

Open
#305 2 comments 0 reactions 1 assignee Claimed by @owahltinez View on GitHub
Dominant language
Kotlin
Stars
5.5k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.