Comments (4)
@xolan thanks for request.
For changing colors, in your project's colors.xml you can put the following xml and change the hex colors to whatever you need:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="viewfinder_mask">#60000000</color>
<color name="viewfinder_laser">#ffcc0000</color>
<color name="viewfinder_border">#ffafed44</color>
</resources>
As for offsetting the ViewFinderView, right now it is setup exactly in the center of the surfaceview. Can you help me understand how changing the offset is helpful, like what are you trying to accomplish?
from barcodescanner.
The changing of colors makes sense now that you mention it.
Essentially I have an Activity with a Fragment containing a TabHost with 3+ tabs. Within one of these tabs I'm using ZBarScannerView with which I'm scanning QR codes. It seems the top most fragment, which has an ActionBar, is pushing the scanner down, and I'd like to re-adjust it so that the "view finder" remains center in terms of mobile display, not center in terms of it's parent view.
I guess I could go over my layout hierarchy to see if I can accomplish the desired look that way.
Thanks for the quick reply though!
from barcodescanner.
Here's the issue I'm having. http://imgur.com/5q02oUy
The ViewFinder seems to be centered in relation to the device screen size (but pushed down by the actionbar/tabs) instead of the layout I've added the view to.
Do you have any ideas on how I can fix this?
from barcodescanner.
One way to make the action bar to not push down the camera preview is by overlaying it (http://developer.android.com/training/basics/actionbar/overlaying.html)
The sample app (https://github.com/dm77/barcodescanner/blob/master/zxing/sample/src/main/res/values/styles.xml) uses the overlay actionbar to achieve this.
I will try to change this in a future release so that people are not forced to use the overlay action bar.
from barcodescanner.
Related Issues (20)
- Adjust exposure/brightness HOT 1
- Not Scanning properly with dual or triple back camera android devices HOT 3
- Encoded contend don't work HOT 1
- Hiding the view leaves an image the background
- error while running app with basic implementation of Zxing HOT 2
- I want to continue scanning Until Correct QR found HOT 1
- MultiFormatReader unable to read the qr although the qr is scannable. HOT 2
- Plus openCv for grayscale QR code scanning HOT 1
- while setting flask
- Scanner frame size
- move scanner area to top of camera screen?
- I keep getting this error!?
- getting crash while trying to scan through camera
- java.lang.RuntimeException: cancelAutoFocus failed java.lang.RuntimeException: cancelAutoFocus failed at android.hardware.Camera.native_cancelAutoFocus(Native Method)
- Extract the type of barcode
- Cannot cast 'android.view.View' to 'CodeScannerView'
- Cancel Button throws Java Exception HOT 1
- # CameraHandlerThread(7190) java.lang.OutOfMemoryError
- it keep displaying me on full screen, but i don't want on full screen
- VERY OLD version of zbarimg in macOS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from barcodescanner.