Usually in Surfaceview as a vector for previewing video frames, sometimes it is necessary to display the hint text above. Before I get all good, today suddenly found superimposed textview no matter how I get out of the text, with Surfaceview together in Framelayout also not, later thought of the merge layout, found also not. Uncle's, Strange Strange, and finally found the reason, the original is the order of the problem. That is, whether in the Relativelayout or the merge layout, the view is superimposed, one layer at a layer of the shop up. If you put TextView first, it must be covered by the full-screen surfaceview behind. With a conventional relativelayout or merge, you can achieve this by dealing with the order problem as well. The layout of this article is attached below:
<merge 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=". Cameraactivity "> <framelayout android:layout_width=" wrap_content "android:layout_height=" Wrap_cont Ent "> <surfaceview android:id=" @+id/previewsv "android:layout_width=" 0dip " android:layout_height= "0dip"/> </FrameLayout> <textview android:id= "@+id/tv_info" Android : layout_width= "match_parent" android:layout_height= "wrap_content" android:text= "Start detection ..." Android:text Color= "@android: Color/holo_blue_light" android:textsize= "25sp" android:visibility= "visible"/> <org . Yanzi.ui.HandView android:id= "@+id/hand_view" android:layout_width= "Match_parent" Android:layout_hei ght= "Match_parent"/> <imagebuttonAndroid:id= "@+id/photoimgbtn" android:layout_width= "wrap_content" android:layout_height= "Wrap_content" Android:layout_gravity= "Bottom|center_horizontal" android:background= "@drawable/photo_img_btn"/></MERGE&G T
Pass two photos:
Open hand, red picture frame:
Close your fingers and draw a blue frame: