Android TV interface Focusing effect---highlighting effect

Source: Internet
Author: User

When developing an Android TV-side application, the focus effect tends to be to make the icon big and show up to the top, such as the effect.

There are two possible implementations of the focus highlighting effect, but it's too cumbersome.

1) The full two-tier layout, the so-called full two-tier layout, is the icon display layer and focus highlighting layer apart, they are completely overlapping two layers. This approach is very difficult to do in the program, both to achieve focus transformation and to achieve the top of the highlighted control of the disappearance or non-vanishing state, the state and logic are very complex.

2) Part of the two-tier layout, the so-called partial two-level layout, is the bottom of the need to present the icon, the upper layer of only 2 movable icons, the bottom of which the icon to get the focus, then the top of the focus of the large icon immediately in the top of the focus to show and drive the picture, the focus of the zoom So again, this logic is a lot simpler than the first one.

A simple solution:

When I saw the View.bringtofront () method in the SDK API by chance, I burst into excitement and verified it. It seems to look at the API is the kingly way.

If you do not call View.bringtofront (), it will be the following result:


As you can see, this imageview is obscured by the imageview of the left and right, not at the top.

If you add View.bringtofront (), you will float to the top.

SOURCE download



Android TV interface Focusing effect---highlighting effect

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.