/**
* Starts the enter animations for various UI components of the toolbar subreddit search
*
* @param ANIMATION_DURATION duration of the animation in ms
* @param SUGGESTIONS_BACKGROUND background of subreddit suggestions list
* @param GO_TO_SUB_FIELD search field in toolbar
* @param CLOSE_BUTTON button that clears the search and closes the search UI
*/
public void enterAnimationsForToolbarSearch(final long ANIMATION_DURATION,
final CardView SUGGESTIONS_BACKGROUND, final AutoCompleteTextView GO_TO_SUB_FIELD,
final ImageView CLOSE_BUTTON) {
SUGGESTIONS_BACKGROUND.animate()
.translationY(headerHeight)
.setInterpolator(new AccelerateDecelerateInterpolator())
.setDuration(ANIMATION_DURATION + ANIMATE_DURATION_OFFSET)
.start();
GO_TO_SUB_FIELD.animate()
.alpha(1f)
.setInterpolator(new AccelerateDecelerateInterpolator())
.setDuration(ANIMATION_DURATION)
.start();
CLOSE_BUTTON.animate()
.alpha(1f)
.setInterpolator(new AccelerateDecelerateInterpolator())
.setDuration(ANIMATION_DURATION)
.start();
}
MainActivity.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:Slide-RSS
作者:
评论列表
文章目录