Is it possible to have a split screen that would have a camera preview and a second activity in the same screen? Would fragments do the job? (I am new to android and never worked with fragments). I am converting the screen colors from RGB into HSV (using OpenCV) and would like to manipulate values of H, S and V using seek bars. At the moment I am doing this in the following way:
1)press button to go to a new activity and set the values using seek bars
2)press button to go back to camera preview and get the HSV values using intents
But this involves a lot of switching between activities and checking whether I achieved the desired effect and I would like to achieve a real time preview so when changing the values I immediately see the changes. Is there any way to do that?
The Camera preview simply writes on a
SurfaceView. You can put the preview anywhere you want and any size you want just like any other View object. I do think a current limitation is you can’t move the preview once it’s set without first disabling the camera (though not 100% sure).As such, you can put the
SurfaceViewand your otherViewin aLinearLayout. Give them both the same weight, and both views will take up half the screen (assuming they’re the only two in the layout).