android - How to animate change of background from one point -
i have button in activity. when click on it, want background color of activity change point clicked whole activity. should change circular animation starts @ point touched screen , expands until fills screen. way of doing this?
you can use material animation library,
this default enter animation
what happening step step is:
shared orange box transitioning mainactivity detailsactivity. detailsactivity background viewgroup visibility starts invisible.
<relativelayout android:layout_width="match_parent" android:id="@+id/backgroundviewgroup" android:visibility="invisible" ...
after sharedelemententertransition ends circularreveal animation takes place making background viewgroup visible.
transition entertransition = getwindow().getsharedelemententertransition(); entertransition.addlistener(new transition.transitionlistener() { @override public void ontransitionstart(transition transition) {} @override public void ontransitionend(transition transition) { animaterevealshow(bgviewgroup); } @override public void ontransitioncancel(transition transition) {} @override public void ontransitionpause(transition transition) {} @override public void ontransitionresume(transition transition) {} });
Comments
Post a Comment