Android Gesture Recognition display text layout Considerations on the Camera Preview screen (merge layout)

Source: Internet
Author: User

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"/&GT;&LT;/MERGE&G T

Pass two photos:

Open hand, red picture frame:



Close your fingers and draw a blue frame:


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.