reduce the bottom margin on devices with hardware navigation
This commit is contained in:
parent
9db80ebf70
commit
604dc90ab1
|
@ -159,6 +159,12 @@ public class MainActivity extends SimpleActivity
|
|||
setContentView(R.layout.activity_main);
|
||||
ButterKnife.bind(this);
|
||||
|
||||
if (Utils.hasNavBar(getResources())) {
|
||||
final View btnLayout = findViewById(R.id.btn_holder);
|
||||
final int bottomMargin = (int) getResources().getDimension(R.dimen.preview_btn_margin);
|
||||
((RelativeLayout.LayoutParams) btnLayout.getLayoutParams()).setMargins(0, 0, 0, bottomMargin);
|
||||
}
|
||||
|
||||
mCurrCamera = mConfig.getLastUsedCamera();
|
||||
mPreview = new Preview(this, (SurfaceView) findViewById(R.id.camera_view), this);
|
||||
mPreview.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="@dimen/preview_btn_margin"
|
||||
android:layout_marginBottom="@dimen/activity_margin"
|
||||
android:gravity="center_horizontal|bottom">
|
||||
|
||||
<ImageView
|
||||
|
|
Loading…
Reference in New Issue