@Override public void onMapClick(LatLng latLng) { if (event_pager.getVisibility() == View.VISIBLE) { event_pager.startAnimation(slide_out_down); slide_out_down.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation arg0) { } @Override public void onAnimationRepeat(Animation arg0) { } @Override public void onAnimationEnd(Animation arg0) { event_pager.setVisibility(View.GONE); event_pager.clearAnimation(); } }); } } });
private void updateFindFiles(List<String> tmp) { files = tmp; SectionsPagerAdapter mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager(), files); mViewPager.setAdapter(mSectionsPagerAdapter); Animation fadeIn = AnimationUtils.loadAnimation(this, android.R.anim.fade_in); Animation fadeOut = AnimationUtils.loadAnimation(this, android.R.anim.fade_out); if (files == null || files.size() == 0) { if (fadeIn != null) { mEmptyView.startAnimation(fadeIn); } mEmptyView.setVisibility(View.VISIBLE); if (fadeOut != null) { mLoadingView.startAnimation(fadeOut); } mLoadingView.setVisibility(View.GONE); } else { mEmptyView.setVisibility(View.GONE); mLoadingView.setVisibility(View.GONE); if (fadeIn != null) { mViewPager.startAnimation(fadeIn); } mViewPager.setVisibility(View.VISIBLE); } }
private void setupViewPager(final ViewPager viewPager) { ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager()); adapter.addFragment(new TabFragment(), "OVERVIEW"); adapter.addFragment(new TabFragment(), "USAGE"); adapter.addFragment(new TabFragment(), "STYLE"); viewPager.setAdapter(adapter); Animation bottomUp = AnimationUtils.loadAnimation(DetailActivity.this, R.anim.bottom_up); viewPager.startAnimation(bottomUp); }
event_pager.startAnimation(slide_in_up); slide_in_up.setAnimationListener(new Animation.AnimationListener() { @Override
codePager.startAnimation(new ResizeAnimation<LinearLayout>(codePager, ResizeAnimation.DEFAULT, ResizeAnimation.DEFAULT, ResizeAnimation.DEFAULT, totalHeight)); console.startAnimation(new ResizeAnimation<LinearLayout>(console, ResizeAnimation.DEFAULT, ResizeAnimation.DEFAULT, ResizeAnimation.DEFAULT, 0)); } else { codePager.startAnimation(new ResizeAnimation<LinearLayout>(codePager, ResizeAnimation.DEFAULT, ResizeAnimation.DEFAULT, ResizeAnimation.DEFAULT, oldCodeHeight, false)); consoleArea.startAnimation(new ResizeAnimation<LinearLayout>(consoleArea, ResizeAnimation.DEFAULT, totalHeight - codePager.getHeight(), ResizeAnimation.DEFAULT, totalHeight - oldCodeHeight, false));
public void close() { if (findReplaceToolbar != null) { ViewPager codePager = context.getEditor().getCodePager(); ResizeAnimation<LinearLayout> resize = new ResizeAnimation<LinearLayout>(findReplaceToolbar, LinearLayout.LayoutParams.MATCH_PARENT, ResizeAnimation.DEFAULT, LinearLayout.LayoutParams.MATCH_PARENT, 0); resize.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { } @Override public void onAnimationEnd(Animation animation) { contentView.removeView(findReplaceToolbar); context.getEditor().setExtraHeaderView(null); // context.getEditor().refreshMessageAreaLocation(); clearHighlights(); context.getCodeArea().removeTextChangedListener(codeWatcher); } @Override public void onAnimationRepeat(Animation animation) {} }); findReplaceToolbar.startAnimation(resize); codePager.startAnimation(new ResizeAnimation<LinearLayout>(codePager, LinearLayout.LayoutParams.MATCH_PARENT, ResizeAnimation.DEFAULT, LinearLayout.LayoutParams.MATCH_PARENT, codePager.getHeight() + findReplaceToolbar.getHeight())); } }
resizeConsole = new ResizeAnimation<LinearLayout>(console, LinearLayout.LayoutParams.MATCH_PARENT, ResizeAnimation.DEFAULT, LinearLayout.LayoutParams.MATCH_PARENT, console.getHeight() - (height - codePager.getHeight()), false); codePager.startAnimation(resizeCode); if (resizeConsole != null) { console.startAnimation(resizeConsole);