private void createDownloadView() { if (mDownloadView == null) { mDownloadView = LayoutInflater.from(getContext()) .inflate(R.layout.story_media_bitwise_placeholder, this, false); } mDownloadView.setOnClickListener(this); ImageView iv = ((ImageView) mDownloadView.findViewById(R.id.ivDownloadIcon)); iv.setImageResource( mMediaViewCollection.isFirstViewVideo() ? R.drawable.ic_load_video : R.drawable.ic_load_photo); this.addView(mDownloadView); iv.clearAnimation(); }
private void createDownloadingView(boolean useFinalSize) { if (mDownloadView == null) { mDownloadView = LayoutInflater.from(getContext()) .inflate(R.layout.story_media_bitwise_placeholder, this, false); } if (useFinalSize) mDownloadView.getLayoutParams().height = LayoutParams.MATCH_PARENT; else mDownloadView.getLayoutParams().height = UIHelpers.dpToPx(50, getContext()); mDownloadView.setOnClickListener(null); ImageView iv = ((ImageView) mDownloadView.findViewById(R.id.ivDownloadIcon)); iv.setImageResource( mMediaViewCollection.isFirstViewVideo() ? R.drawable.ic_load_video : R.drawable.ic_context_load); this.addView(mDownloadView); iv.startAnimation(AnimationUtils.loadAnimation(getContext(), R.anim.rotate)); }