android - ImageView on top of SurfaceView -
i have following layout,
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <com.example.linux.camtest.camerapreview android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/camera_surfaceview" android:layout_alignparentleft="true" android:layout_alignparentstart="true" android:layout_centervertical="true"/> <imageview android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/image" android:layout_alignparenttop="true" android:layout_alignparentleft="true" android:layout_alignparentstart="true" android:adjustviewbounds="true" /> <button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="new button" android:id="@+id/takepicturebutton" android:layout_alignparentbottom="true" android:layout_centerhorizontal="true"/> </relativelayout>
after taking picture image.setimagebitmap(bitmap), problem picture being displayed in small area while set image match_parent, , tried fill_parent , didn't work also.
what need have image view set same size of surfaceview, when take picture , load imageview cover surfaceview
remove
android:adjustviewbounds="true"
and add
android:scaletype="fitxy"
to imageview
Comments
Post a Comment