Android animation sample app -
i downloaded given sample animation app developer.android. in crossfadeactivity came across next piece of code. can please explain me in details these lines of code means ?
final view showview = contentloaded ? mcontentview : mloadingview; final view hideview = contentloaded ? mloadingview : mcontentview;
they create view objects can't reassigned later (that's final keyword does). if variable contentloaded true views set first alternative (either mcontentview showview or mloadingview hideview) , if false assigned opposing ones.
first line : if contentloaded true set object showview mcontentview. if contentloaded false set object showview mloadingview.
the sec line follows same logic. @ java's ternary operator here or here or here.
android android-animation
No comments:
Post a Comment