public void onPictureUpdated() {
   if (mPicture == null) return;
   ImageButton img = (ImageButton) findViewById(R.id.profile_picture);
   img.setImageBitmap(mPicture);
   img.invalidate();
   img.requestLayout();
 }
Exemple #2
0
 /** 暂停/播放 */
 public void showOrHindImage() {
   if (mPlayer.isPlaying()) {
     mPlayer.pause();
     isPause = true;
     controlAnimationShow();
     mPauseCenter.setVisibility(View.VISIBLE);
     mPauseCenter.requestLayout(); // 刷新view
     mPause.setBackgroundResource(R.drawable.mp_ctrl_play_sl);
   } else {
     mPlayer.start();
     isPause = false;
     controlAnimationHide();
     mPauseCenter.setVisibility(View.INVISIBLE);
     mPause.setBackgroundResource(R.drawable.mp_ctrl_pause_sl);
   }
 }