views:

43

answers:

2

Is there a way to show a TextView in front of a VideoView?

A: 

If a Custom Toast is not enough you can try with a Dialog.

Macarse
the toast would help if it could be completely transparent, showing just the text, and I could show 2 at a time. The transparency part looks like it is possible.. I'm trying here..
Tom Brito
I would like to show 2 of them, one in the top (on up key press), and one in the bottom (on down key press). They don't need to show at the same time. But Android dont let me use 2 toasts. When I tried using the same, just reseting the position and text, it works well, but if I press both keys in short time, both the informations will be shown in bottom or top, where it first appear. Any idea to solve this? Was I clear?
Tom Brito
+2  A: 

You can stack widgets on the Z-axis using RelativeLayout. Have your VideoView be the first child of the RelativeLayout. Have your TextView be the second child. Have their android:layout_ rules set up such that they overlap in the X/Y coordinate plane. The TextView will appear to float over the VideoView.

CommonsWare
In addiction to the answer: http://stackoverflow.com/questions/2614393/defining-z-order-of-views-of-relativelayout-in-android
Tom Brito