SquareCamera icon indicating copy to clipboard operation
SquareCamera copied to clipboard

Having problems using a tablet

Open Kwonjube opened this issue 9 years ago • 3 comments

I know that all the sizes are adjusted according to the device, however when im using a large 9.7" tablet there's no buttons, it only displays an image view of the camera, with no button/s to take a picture with. Any way around this?

Kwonjube avatar Apr 27 '16 04:04 Kwonjube

@Kwonjube did you figure out the alternate??? Facing the same issue in tablet. Any help will be much appreciated. Thanks.

HiteshShrestha avatar Jul 05 '16 06:07 HiteshShrestha

`` @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        //setups
        if(resultCode == RESULT_CANCELED){}
        else if (resultCode == RESULT_OK){

            //Crop.pickImage(this);
            if (requestCode == Crop.REQUEST_CROP && resultCode == RESULT_OK) {
                //doSomethingWithCroppedImage(outputUri);

                setResult(resultCode);

                LinearLayout leftLayout = (LinearLayout) findViewById(R.id.leftLayout);
                LinearLayout rightLayout = (LinearLayout) findViewById(R.id.rightLayout);

                String path = tempPicture[4];

                ImageView image = new ImageView(this);
                image.setRotation(90);
                Bitmap thumb = createThumbnailFromBitmap(path, 350, 350);
                image.setImageBitmap(thumb);
                if (leftSide == true) {
                    leftLayout.addView(image);
                } else {
                    rightLayout.addView(image);
                }

                temp = Integer.valueOf(tempPicture[0]);
                image.setId(temp);
                image.setTransitionName(path);
                image.setOnClickListener(ClickPic(image));
                addToTempList(tempPicture);

                if (leftSide == true) {
                    createEditableComment(tempPicture[0], leftLayout);
                } else {
                    createEditableComment(tempPicture[0], rightLayout);
                }

                leftSide = !leftSide;
            } else{
                File cropme = new File(tempPicture[4]);
                new Crop(Uri.fromFile(cropme)).output(Uri.fromFile(cropme)).asSquare().start(this);
            }
        }
    }

I did that. Sorry i cant find the tutorial or code but it uses compile 'com.soundcloud.android:android-crop:0.9.10@aar' to simply crop the image after the picture is taken

Kwonjube avatar Jul 05 '16 07:07 Kwonjube

@Kwonjube thanks for the prompt reply. Have been already using this library for cropping images selected from gallery by users... but need to have the camera module implemented in the app to capture square image directly without user having to crop the image after they have captured it.

HiteshShrestha avatar Jul 05 '16 08:07 HiteshShrestha