Overlap other views on Camera Preview in android -


i'm following android developer's guide camera api (using v1 right now). can't find way overlap view (in case imagebutton/imageview on top of preview). i'm using framelayout. here's layout code.

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     tools:context="com.blackfruit.camfilters.cameraactivity"     android:orientation="vertical"  >   <framelayout      android:layout_width="match_parent"      android:layout_height="match_parent"      android:id="@+id/camerapreview"      android:layout_weight="1">    <imageview       android:layout_width="wrap_content"       android:layout_height="wrap_content"       android:id="@+id/imageview"       android:src="@drawable/snap"       android:layout_gravity="bottom|center"       android:layout_marginbottom="20dp"       />   </framelayout> </relativelayout> 

i know there other ways example using surfaceview , linearlayout. i'm figuring out problem approach. i've seen people saying works mine doesn't meaning see camera preview , not buttons or image overlapping it. can me out?

with trial , error. somehow managed solve issue. used myimageview.bringtofront();

which solved problem.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -