How to make Android child controls display beyond the range of parent controls

Let's take a look at a preview:

No more nonsense, just go to the code:

I just made this picture. The effect is completed with reference to the cool dog music player. I want to explain that the focus is on the navigation bar at the bottom: as shown in the figure

Another preview of the reverse effect:

How to make the blue round play key display beyond the pink range. Of course, such an effect can be achieved through reasonable layout, but there are simpler methods. That is, add an attribute from Android itself to the attribute of the root layout:

Attribute interpretation and Description:

1. Android: clipchildren means: whether to limit the child view to its range

2. You can use Android: Layout_ Gravity controls how the excess is displayed.

3. Just set Android: clipchildren to false on the root node, which is true by default

summary

The above is how to make the Android child control beyond the scope of the parent control. Have you learned it? I hope this article can help you.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>