How Cover the whole screen by textview irrespective of other elements present in the XML file?
-
23-12-2019 - |
Question
How can i cover the screen by TextView i written Below but it does not work I want the Facebook buttons to show sometimes i dont want them to show i just want to show a
Thank You for your help
Solution
Either re-order your RelativeLayout to place the element you want on top at the bottom of the layout list, or use a FrameLayout. A FrameLayout will allow you to overlay elements.
OTHER TIPS
The problem here is very simple. You are adding your TextView
first and then you are adding ImageView
. Both these are set to match parents width and height but since you are adding ImageView
later its z-index is greater than that of TextView
.
To confirm these just remove the ImageView and then check.
Hope this helps :)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow