public void onStartTrackingTouch(SeekBar bar) { mDragging = true; show(3600000); mHandler.removeMessages(SHOW_PROGRESS); if (mInstantSeeking) mAM.setStreamMute(AudioManager.STREAM_MUSIC, true); }
public void onStopTrackingTouch(SeekBar bar) { if (!mInstantSeeking) mPlayer.seekTo(mDuration * bar.getProgress() / 1000); show(sDefaultTimeout); mHandler.removeMessages(SHOW_PROGRESS); mAM.setStreamMute(AudioManager.STREAM_MUSIC, false); mDragging = false; mHandler.sendEmptyMessageDelayed(SHOW_PROGRESS, 1000); } };
public void onStartTrackingTouch(SeekBar bar) { mDragging = true; show(3600000); mHandler.removeMessages(SHOW_PROGRESS); if (mInstantSeeking) { mAM.setStreamMute(AudioManager.STREAM_MUSIC, true); } if (mInfoView != null) { mInfoView.setText(""); mInfoView.setVisibility(View.VISIBLE); } }
public void onStopTrackingTouch(SeekBar bar) { if (!mInstantSeeking) { mPlayer.seekTo((mDuration * bar.getProgress()) / 1000); } if (mInfoView != null) { mInfoView.setText(""); mInfoView.setVisibility(View.GONE); } show(sDefaultTimeout); mHandler.removeMessages(SHOW_PROGRESS); mAM.setStreamMute(AudioManager.STREAM_MUSIC, false); mDragging = false; mHandler.sendEmptyMessageDelayed(SHOW_PROGRESS, 1000); } };
@Override public void onClick(View v) { if (isSound) { //静音 sound.setImageResource(R.mipmap.sound_mult_icon); audioManager.setStreamMute(AudioManager.STREAM_MUSIC, true); } else { //取消静音 sound.setImageResource(R.mipmap.sound_open_icon); audioManager.setStreamMute(AudioManager.STREAM_MUSIC, false); } isSound = !isSound; } });
public void onStartTrackingTouch(SeekBar bar) { mDragging = true; show(3600000); mHandler.removeMessages(SHOW_PROGRESS); if (mInstantSeeking) mAM.setStreamMute(AudioManager.STREAM_MUSIC, true); }
@Override public void onStartTrackingTouch(SeekBar seekBar) { setProgress(); isDragging = true; audioManager.setStreamMute(AudioManager.STREAM_MUSIC, true); handler.removeMessages(MESSAGE_SHOW_PROGRESS); show(); handler.removeMessages(SET_VIEW_HIDE); }
public void onStopTrackingTouch(SeekBar bar) { if (!mInstantSeeking) mPlayer.seekTo(mDuration * bar.getProgress() / 1000); show(sDefaultTimeout); mHandler.removeMessages(SHOW_PROGRESS); mAM.setStreamMute(AudioManager.STREAM_MUSIC, false); mDragging = false; mHandler.sendEmptyMessageDelayed(SHOW_PROGRESS, 1000); } };
@Override public void onStopTrackingTouch(SeekBar seekBar) { isDragging = false; videoView.seekTo((int) (duration * seekBar.getProgress() * 1.0f / 100)); handler.removeMessages(MESSAGE_SHOW_PROGRESS); audioManager.setStreamMute(AudioManager.STREAM_MUSIC, false); isDragging = false; handler.sendEmptyMessageDelayed(MESSAGE_SHOW_PROGRESS, 1000); show(); } });
public void onStartTrackingTouch(SeekBar bar) { mDragging = true; show(3600000); mHandler.removeMessages(SHOW_PROGRESS); if (mInstantSeeking) mAM.setStreamMute(AudioManager.STREAM_MUSIC, true); if (mInfoView != null) { mInfoView.setText(""); mInfoView.setVisibility(View.VISIBLE); } }
public void onStopTrackingTouch(SeekBar bar) { if (!mInstantSeeking) mPlayer.seekTo((mDuration * bar.getProgress()) / 1000); if (mInfoView != null) { mInfoView.setText(""); mInfoView.setVisibility(View.GONE); } show(sDefaultTimeout); mHandler.removeMessages(SHOW_PROGRESS); mAM.setStreamMute(AudioManager.STREAM_MUSIC, false); mDragging = false; mHandler.sendEmptyMessageDelayed(SHOW_PROGRESS, 1000); } };
public static void setVolumeMute(Context mc){ AudioManager am=(AudioManager)mc.getSystemService(Context.AUDIO_SERVICE); am.setStreamMute(AudioManager.STREAM_MUSIC, true); } public static void setVolumeUnmute(Context mc){
@Override public void onStartTrackingTouch(SeekBar seekBar) { isDragging = true; show(3600000); handler.removeMessages(MESSAGE_SHOW_PROGRESS); if (instantSeeking){ audioManager.setStreamMute(AudioManager.STREAM_MUSIC, true); } }
private void unmuteRinger() { if (isMuted) { AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { am.setStreamVolume(AudioManager.STREAM_RING, AudioManager.ADJUST_UNMUTE, 0); } else { am.setStreamMute(AudioManager.STREAM_RING, false); } isMuted = false; } }
@Override public void onStopTrackingTouch(SeekBar seekBar) { if (!instantSeeking){ videoView.seekTo((int) ((duration * seekBar.getProgress()*1.0) / 1000)); } show(defaultTimeout); handler.removeMessages(MESSAGE_SHOW_PROGRESS); audioManager.setStreamMute(AudioManager.STREAM_MUSIC, false); isDragging = false; handler.sendEmptyMessageDelayed(MESSAGE_SHOW_PROGRESS, 1000); } };
public static void setAudioManage(Context context) { AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); audioManager.setStreamMute(AudioManager.STREAM_SYSTEM, true); audioManager.setStreamMute(AudioManager.STREAM_MUSIC, true); audioManager.setStreamVolume(AudioManager.STREAM_ALARM, 0, 0); audioManager.setStreamVolume(AudioManager.STREAM_DTMF, 0, 0); audioManager.setStreamVolume(AudioManager.STREAM_NOTIFICATION, 0, 0); audioManager.setStreamVolume(AudioManager.STREAM_RING, 0, 0); } }
public void onStartTrackingTouch(SeekBar bar) { mDragging = true; show(3600000); mHandler.removeMessages(SHOW_PROGRESS); if (mInstantSeeking) mAM.setStreamMute(AudioManager.STREAM_MUSIC, true); if (mInfoView != null) { mInfoView.setText(""); mInfoView.setVisibility(View.VISIBLE); } }
public void onStartTrackingTouch(SeekBar bar) { mDragging = true; show(3600000); mHandler.removeMessages(SHOW_PROGRESS); if (mInstantSeeking) mAM.setStreamMute(AudioManager.STREAM_MUSIC, true); if (mInfoView != null) { mInfoView.setText(""); mInfoView.setVisibility(View.VISIBLE); } }
public void onStartTrackingTouch(SeekBar bar) { mDragging = true; show(3600000); mHandler.removeMessages(SHOW_PROGRESS); if (mInstantSeeking) mAM.setStreamMute(AudioManager.STREAM_MUSIC, true); if (mInfoView != null) { mInfoView.setText(""); mInfoView.setVisibility(View.VISIBLE); } }
public void onStartTrackingTouch(SeekBar bar) { mDragging = true; show(3600000); mHandler.removeMessages(SHOW_PROGRESS); if (mInstantSeeking) mAM.setStreamMute(AudioManager.STREAM_MUSIC, true); if (mInfoView != null) { mInfoView.setText(""); mInfoView.setVisibility(View.VISIBLE); } }