To realize the highlight of the TV main screen zoom

Source: Internet
Author: User

Precautions

1. If there is a button ImageButton in a layout, it is likely that the focus will be robbed, causing onfocuschanged not to be executed!!

2.setNextFocusRightId temporarily requires programly settings, and setting in XML has no effect.

Use of 3.Animator animations:

 private void ZoomIn () {//Zoom Out animation if (manimatorsetzoomin = = null) {manimatorsetzoomin = new Animat            Orset ();            Objectanimator Animatorx = Objectanimator.offloat (This, "ScaleX", 1.2f, 1.0f);            Objectanimator animatory = Objectanimator.offloat (This, "ScaleY", 1.2f, 1.0f);            Animatorx.setduration (300);            Animatory.setduration (300);        Manimatorsetzoomin.playtogether (Animatorx, animatory);    } manimatorsetzoomin.start ();  } private void Zoomout () {//Magnification animation if (manimatorsetzoomout = = null) {Manimatorsetzoomout =            New Animatorset ();            Objectanimator Animatorx = Objectanimator.offloat (This, "ScaleX", 1.0f, 1.2f);            Objectanimator animatory = Objectanimator.offloat (This, "ScaleY", 1.0f, 1.2f);            Animatorx.setduration (300);            Animatory.setduration (300);        Manimatorsetzoomout.playtogether (Animatorx, animatory); } ManimatorsetzooMout.start (); }



Address Https://github.com/sfshine/TVSelectorZoomView


To realize the highlight of the TV main screen zoom

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.