top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Children in TextureView in android

+2 votes
410 views

I have a TextureView and I want to add children (couple of Buttons and TextView) for texture view. I could not find any good answer in google. Please help.

posted Aug 10, 2016 by Vijay

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

No, TextureView is self-closing view and it is neither a layout nor a container view. It is an element / component that doesn't support children. If you wish to place buttons and textviews in textureview, I assume that is because you want them positioned (visually) inside the textureview. If so, I would suggest using a RelativeLayout as a parent for the TextureView and place the textviews and buttons in the relative layout.

<RelativeLayout
    <TextureView  />
    <Button /> <!--...etc.,-->
</RelativeLayout>

Hope this helps.

answer Aug 10, 2016 by Vinod Kumar K V
...