List of usage examples for android.widget FrameLayout animate
public ViewPropertyAnimator animate()
From source file:com.sociablue.nanodegree_p1.MovieDetailPagerFragment.java
private void startEnterAnimations() { int id = mMovieList.get(mCurrentPosition).getId(); View currentPage = mPager.findViewWithTag(id); FrameLayout imgContainer = (FrameLayout) currentPage.findViewById(R.id.details_img_container); imgContainer.animate().translationY(0); LinearLayout contentContainer = (LinearLayout) currentPage.findViewById(R.id.details_copy_container); contentContainer.animate().translationY(0); }
From source file:com.osama.cgpacalculator.MainActivity.java
@SuppressLint("InflateParams") private void showAboutDialog() { final ScaleAnimation animation = new ScaleAnimation(0f, 1f, 0f, 1f); animation.setDuration(800);/* ww w. ja va 2 s . co m*/ Dialog dialog = new Dialog(this); dialog.setContentView(R.layout.about_dialog); final FrameLayout frame = ((FrameLayout) dialog.findViewById(R.id.about_content_layout)); frame.addView(getLayoutInflater().inflate(R.layout.intro_section_layout, null)); dialog.findViewById(R.id.credit_dialog_button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { frame.removeAllViews(); isShowingLi = false; if (!isShowingCr) { frame.addView(getLayoutInflater().inflate(R.layout.credits_layout, null)); isShowingCr = true; frame.setAnimation(animation); } else { frame.addView(getLayoutInflater().inflate(R.layout.intro_section_layout, null)); isShowingCr = false; frame.setAnimation(animation); } frame.animate(); } }); dialog.findViewById(R.id.license_dialog_button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { frame.removeAllViews(); isShowingCr = false; if (!isShowingLi) { frame.addView(getLayoutInflater().inflate(R.layout.license_layout, null)); isShowingLi = true; frame.setAnimation(animation); } else { frame.addView(getLayoutInflater().inflate(R.layout.intro_section_layout, null)); isShowingLi = false; frame.setAnimation(animation); } frame.animate(); } }); dialog.show(); }