Hi guys.
 my code snippet is working fine for the imageview zooming in out. but
i want to take the camera preview for zooming,

my code snippet is havingmBitmap which is taking image from drawable..
i want to place the surface view/ or camera preview for the same.

please suggest how to replace bitmap by the preview????

 @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.cameralayout);

        mZoomControl = new DynamicZoomControl();


//        preview = (SurfaceView) findViewById(R.id.zoomview);
//              previewHolder = (preview).getHolder();
//              previewHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

        mBitmap = BitmapFactory.decodeResource(getResources(),
R.drawable.image);

        mZoomListener = new
LongPressZoomListener(getApplicationContext());
        mZoomListener.setZoomControl(mZoomControl);

        mZoomView = (SurfaceView)findViewById(R.id.zoomview);
        mZoomView.setZoomState(mZoomControl.getZoomState());
        mZoomView.setImage(mBitmap);
        mZoomView.setOnTouchListener(mZoomListener);

        mZoomControl.setAspectQuotient(mZoomView.getAspectQuotient());

        resetZoomState();
    }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to