This is the usual problem with making a custom camera with Android in portrait mode. You likely have a SurfaceView that is being used to display your camera preview. I add the following line of code to my surfaceCreated
method:
camera.setDisplayOrientation(90);
For more info, check out some other answers on this topic (here is one, and another). Basically, the Android camera is set to display in Landscape mode, so you need to rotate the orientation if the Activity is in portrait mode to accomodate this.