show an AutoFitTextureView on Lollipop+
This commit is contained in:
parent
22d463f0e0
commit
77fb00097c
|
@ -189,6 +189,9 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave
|
|||
setContentView(R.layout.activity_main)
|
||||
initButtons()
|
||||
|
||||
camera_surface_view.beVisibleIf(!isLollipopPlus())
|
||||
camera_texture_view.beVisibleIf(isLollipopPlus())
|
||||
|
||||
(btn_holder.layoutParams as RelativeLayout.LayoutParams).setMargins(0, 0, 0, (navBarHeight + resources.getDimension(R.dimen.activity_margin)).toInt())
|
||||
|
||||
mPreview = if (isLollipopPlus()) PreviewCameraTwo(this) else PreviewCameraOne(this, camera_surface_view, this)
|
||||
|
|
|
@ -9,6 +9,12 @@
|
|||
<SurfaceView
|
||||
android:id="@+id/camera_surface_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<com.simplemobiletools.camera.views.AutoFitTextureView
|
||||
android:id="@+id/camera_texture_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ImageView
|
||||
|
|
Loading…
Reference in New Issue