How can i change custom SurfaceView width and height. is this possible?
I had the same problem. But this should definitely work, just need to check what kind of LaoutParams you are setting. I had the same problem because I am using FrameLaoutPrams instead LayoutParams. I needed to set it like this :
android.widget.FrameLayout.LayoutParams params = new android.widget.FrameLayout.LayoutParams(width, height);
surface.setLayoutParams(params);
This is the right way to do it :
surfaceView.getHolder().setFixedSize(width, height);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With