Android : display foreground (and views) in a camera preview in order to make an old camera back look -


i've got troubles camera preview (in framelayout). want achieve :

https://lh4.ggpht.com/afphmlynasaajv2er2ind9dlxs61sj-v1qyyecpfgmcpy18kgdqedioywkaxolweakm=h900-rw or : https://lh4.ggpht.com/_okn-o2mb3s4vo6qosj15ctdztbic_ji8-zgg16pmvffunwpqhfazun6ofwpwohhr34=h900-rw

but far, able : - full screen preview in framelayout - tiny preview misplaced (i want centered horizontally , @ 40 dp of top)

here layout far :

<framelayout 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" android:background="@drawable/background_app_photo_transparent" tools:context="jmf.net.testsapp.cameraactivity" > <framelayout android:layout_width="320dp" android:layout_height="240dp" android:layout_gravity="center_horizontal" android:layout_margintop="40dp" android:id="@+id/master_layout" /> </framelayout>

the first framelayout put 9 patch drawable must recover of camera preview. second framelayout (id/master_layout) 1 create surfaceview display camera preview.

but when try this, i've got camera preview in bottom left corner.

so guess started badly.

here question : how can manage layout , camera preview in order have in pictures below ?

have @ link , next time google! :p http://www.android-app-market.com/camera-access-in-android-development.html


Comments

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -