nihar89 / android-quick-response-code

Automatically exported from code.google.com/p/android-quick-response-code
Apache License 2.0
0 stars 0 forks source link

android:theme="@android:style/Theme.Dialog" in CaptureActivity problem in view #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use android:theme="@android:style/Theme.Dialog" in the capture activity

ex - <activity android:name="CaptureActivity"
            android:theme="@android:style/Theme.Dialog">

What is the expected output? What do you see instead?
Inner scanning area display at bottom right

What version of the product are you using? On what operating system?
Android 2.2

Please provide any additional information below.

following ondraw in Viewfinderview works for me. Please provide overiding 
ViewfinderView class 

 public void onDraw(Canvas canvas) {
        Rect frame = cameraManager.getFramingRect();
        if (frame == null) {
            return;
        }
        int width = canvas.getWidth();
        int height = canvas.getHeight();

        int frameDLeft = (width ) /4;
        int frameDRight = (width ) /4 * 3;

        int frameDTop = height/4;
        int frameDBottom = (height ) /4 * 3;

        // Draw the exterior (i.e. outside the framing rect) darkened
        paint.setColor(resultBitmap != null ? resultColor : maskColor);
        canvas.drawRect(0, 0, width, frameDTop, paint);
        canvas.drawRect(0, frameDTop, frameDLeft, frameDBottom + 1, paint);
        canvas.drawRect(frameDRight + 1, frameDTop, width, frameDBottom + 1, paint);
        canvas.drawRect(0, frameDBottom + 1, width, height, paint);

        if (resultBitmap != null) {
            // Draw the opaque result bitmap over the scanning rectangle
            paint.setAlpha(CURRENT_POINT_OPACITY);
            canvas.drawBitmap(resultBitmap, null, frame, paint);
        } else {

            // Draw a two pixel solid black border inside the framing rect
            paint.setColor(frameColor);
            canvas.drawRect(frameDLeft, frameDTop, frameDRight + 1, frameDTop + 2, paint);
            canvas.drawRect(frameDLeft, frameDTop + 2, frameDLeft + 2, frameDBottom - 1, paint);
            canvas.drawRect(frameDRight - 1, frameDTop, frameDRight + 1, frameDBottom - 1, paint);
            canvas.drawRect(frameDLeft, frameDBottom - 1, frameDRight + 1, frameDBottom + 1, paint);
....

Original issue reported on code.google.com by sbmcdes...@gmail.com on 29 Apr 2013 at 10:13

GoogleCodeExporter commented 8 years ago

Original comment by phishman3579@gmail.com on 1 Jun 2013 at 9:21

GoogleCodeExporter commented 8 years ago
I have made rectangle right in the center but unable to scan as the circles are 
still scanning in bottom right ..Please provide me the remaining code.

Original comment by jshubha...@gmail.com on 1 Jul 2013 at 10:35