public void startTextAnimation() { mTxtTitle.setText(mConfigSplash.getTitleSplash()); mSubTxtTitle.setText(mConfigSplash.getSubTitleSplash()); mTxtTitle.setTextSize(mConfigSplash.getTitleTextSize()); mTxtTitle.setTextColor(getResources().getColor(mConfigSplash.getTitleTextColor())); if (!mConfigSplash.getTitleFont().isEmpty()) setFont(mConfigSplash.getTitleFont()); if (!mConfigSplash.getSubTitleFont().isEmpty()) setSubFont(mConfigSplash.getSubTitleFont()); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); params.addRule(RelativeLayout.BELOW, R.id.flCentral); params.addRule(RelativeLayout.CENTER_HORIZONTAL); mTxtTitle.setLayoutParams(params); mTxtTitle.setVisibility(View.VISIBLE); mSubTxtTitle.setVisibility(View.VISIBLE); YoYo.with(mConfigSplash.getAnimTitleTechnique()) .withListener( new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) {} @Override public void onAnimationEnd(Animator animation) { animationsFinished(); } @Override public void onAnimationCancel(Animator animation) {} @Override public void onAnimationRepeat(Animator animation) {} }) .duration(mConfigSplash.getAnimTitleDuration()) .playOn(mTxtTitle); YoYo.with(mConfigSplash.getAnimTitleTechnique()) .withListener( new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) {} @Override public void onAnimationEnd(Animator animation) { animationsFinished(); } @Override public void onAnimationCancel(Animator animation) {} @Override public void onAnimationRepeat(Animator animation) {} }) .duration(mConfigSplash.getAnimTitleDuration()) .playOn(mSubTxtTitle); }
private void hideProgress() { progressBar.setVisibility(View.GONE); upload.setVisibility(View.GONE); }
private void showProgress() { progressBar.setVisibility(View.VISIBLE); upload.setVisibility(View.VISIBLE); }