question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vertical scanner in portrait screen mode

See original GitHub issue

I’m using custom scanner through DecoratedBarcodeView in my Fragment (like in example of Activity Custom Scanner).

Everything works perfect, but if phone in portrait mode - scanner line and detection are horizontal.

Could you help me please, how can I make it vertical (just for giving scanner mode data to scan), if phone will be only in portrait mode (it’s locked to portrait mode)?

Like this: image

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rkistnercommented, Nov 28, 2016

There is no built-in way to do this, so you’ll have to dig into the source.

There are two parts to this:

  1. The UI. This means changing / overriding ViewfinderView.

  2. The decoding. For some barcodes (e.g. QR codes), the orientation doesn’t matter. For others such as 1D barcodes, the TRY_HARDER hint may cause it to scan in both directions. Alternatively, you can rotate the image before decoding (may require changing the library source). You can do this by creating a custom Decoder and DecoderFactory.

0reactions
rkistnercommented, Sep 8, 2019

Moving discussion to #211.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Zxing change orientation to portrait - Stack Overflow
I'm a developer of Barcode Scanner. Yes, it takes a lot more than this to make it scan in portrait mode. You have...
Read more >
How to connect Android Phone to Monitor in Portrait or ...
How to connect a Phone to TV monitor using type C USB cable portrait vertical or landscape horizontal modes. I used samsung s9, ......
Read more >
Vertical vs Portrait Screens for Work: What are the Benefits ...
In addition, a vertical screen reduces the range of movement of your eyes, meaning that you can scan or view more content faster,...
Read more >
What Are Vertical Monitors Used For? | Learn the Benefits
Another perk of a monitor in portrait mode is that you get to see fewer ads in between the content as most ads...
Read more >
How To Set Scanned Output to Portrait or Landscape Orientation
Place an Original onto the Document Feeder or Document Glass. · Select the required scanning app. · Select any required Scan options. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found