Has anyone run into layout issues in Android with zxing and the
software keyboard?
I have an Android project where I'm embedding ZXing in order to
customize the preview UI to spec. Everything works beautifully on the
HTC Magic and G1. Scanning functionality also works on a Droid or
Samsung Galaxy, but the app gets stuck if the custom CaptureActivity
is launched after an activity with EditTexts. Instead of the preview
screen, I see a window containing only the previous activity's
background and a TextView from capture.xml -- no camera preview
(though on the Droid you can hear the camera focusing). It's almost
as if Android stopped drawing the layout half way through.
On the emulator, I see the same behavior, but I can also see that
Android still has the software keyboard in focus. The suggestion text
view is still visible, but without any text. Any attempt to get rid
of the software keyboard is explicitly ignored (see "ignoring" request
in logs). The logs don't show any errors, but do suggest something's
out-of-place with the software keyboard (see below).
r1597 adds stateAlwaysHidden "to keep soft keyboard away" so maybe you
guys have run into this kind of issue before?
Thanks,
Ron
12-19 11:37:33.638: WARN/InputConnectionWrapper.ICC(115): Timed out
waiting on IInputContextCallback
12-19 11:37:34.128: INFO/InputConnectionWrapper.ICC(115): Got
out-of-sequence callback 65 (expected 66) in setCursorCapsMode,
ignoring.
As it turns out, the bug was caused by the background drawable of the
activity which launched the intent for CaptureActivity. Removing the
background drawable from the launching activity resolved the issue (I
assume the drawable is not scaling correctly). This was perplexing
since both hierarchyviewer and logcat were reporting nearly
identically across my broken CaptureActivity and BarcodeScanner 3.52.
Thanks for zxing - it rocks! git's rebase feature (using git-svn)
makes it easy to stay up-to-date with mainline development when
embedding zxing.
Ron