Skip to content

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

Description

@GoogleCodeExporter
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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions