android - Scanner layout Zxing -


anybody knows how can customize scanner layout in zxing library? want modify width of scanner, try in capture.xml can´t. knows or there manual?

thank you

i explained how in post: https://medium.com/@marta/bar-code-scanner-in-android-with-custom-layout-zxing-2ab92d9d744c

in short:

  • add required aar dependencies in gradle (https://github.com/embarkmobile/zxing-android-minimal#adding-aar-dependency-with-gradle)

  • provide custom layout capture activity. see sample/src/main/res/layout/custom_capture_layout.xml examples.

  • set scanner in java code:

    intentintegrator integrator = new intentintegrator(this); integrator.setcapturelayout(r.layout.custom_layout); integrator.initiatescan();

  • for cancel/back button, use ids @id/zxing_back_button zxing-android-minimal.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -