@Override public void setPrimaryCallElapsedTime(boolean show, String callTimeElapsed) { if (show) { if (mElapsedTime.getVisibility() != View.VISIBLE) { AnimationUtils.Fade.show(mElapsedTime); } mElapsedTime.setText(callTimeElapsed); } else { // hide() animation has no effect if it is already hidden. AnimationUtils.Fade.hide(mElapsedTime, View.INVISIBLE); } }
private void setDrawableToImageView(ImageView view, Drawable photo) { if (photo == null) { photo = view.getResources().getDrawable(R.drawable.picture_unknown); } final Drawable current = view.getDrawable(); if (current == null) { view.setImageDrawable(photo); AnimationUtils.Fade.show(view); } else { AnimationUtils.startCrossFade(view, current, photo); view.setVisibility(View.VISIBLE); } }