Skip to content
Snippets Groups Projects
Commit 0631c292 authored by seven332's avatar seven332
Browse files

调整阅读界面滑调消失显示动画

parent fbd9e935
No related branches found
No related tags found
No related merge requests found
......@@ -86,26 +86,30 @@ public class GalleryActivity extends Activity
void setFullScreen(final boolean fullScreen) {
mFullScreenHelper.setFullScreen(fullScreen);
AlphaAnimation aa = fullScreen ? new AlphaAnimation(1.0f, 0.0f) : new AlphaAnimation(0.0f, 1.0f);
aa.setDuration(Constants.ANIMATE_TIME);
aa.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
mFooter.setVisibility(View.VISIBLE);
}
@Override
public void onAnimationEnd(Animation animation) {
if (fullScreen)
mFooter.setVisibility(View.INVISIBLE);
}
@Override
public void onAnimationRepeat(Animation animation) {
// Empty
}
});
mFooter.startAnimation(aa);
if (!(fullScreen && mFooter.getVisibility() == View.GONE) &&
!(!fullScreen && mFooter.getVisibility() == View.VISIBLE)) {
AlphaAnimation aa = fullScreen ? new AlphaAnimation(1.0f, 0.0f) :
new AlphaAnimation(0.0f, 1.0f);
aa.setDuration(Constants.ANIMATE_TIME);
aa.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
mFooter.setVisibility(View.VISIBLE);
}
@Override
public void onAnimationEnd(Animation animation) {
if (fullScreen)
mFooter.setVisibility(View.GONE);
}
@Override
public void onAnimationRepeat(Animation animation) {
// Empty
}
});
mFooter.startAnimation(aa);
}
if (!fullScreen)
startFullScreenTask();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment