android
FrameLayout의 layout_gravity 설정
carbo
2017. 6. 1. 18:21
The layout_gravity
attribute lands on the FrameLayout.LayoutParams
, not on the view itself. You'll need something like:
mCameraPreview = new CameraPreview(this, recordMode);
FrameLayout preview = (FrameLayout) findViewById(R.id.camera_preview_wrapper);
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.WRAP_CONTENT,
FrameLayout.LayoutParams.WRAP_CONTENT,
Gravity.BOTTOM);
preview.addView(mCameraPreview, params);