Inheritance: android.widget.AbsSeekBar
コード例 #1
0
		public override void onStopTrackingTouch(SeekBar seekBar)
		{
			// Seek to requested position
			int position = seekBar.Progress;
			mPlayerController.seek(position);
			mState.mPosition = position;
			// Re-enable refreshing current position.
			mUpdateEventHandler.sendEmptyMessage(PositionUpdater.START_POLLING);
		}
コード例 #2
0
		// ////////////////////////////////////////////////////////////////////////
		// These methods handle the seek bar events
		// ////////////////////////////////////////////////////////////////////////

		public override void onProgressChanged(SeekBar seekBar, int progress, bool fromUser)
		{
			// Do nothing
		}
コード例 #3
0
		public override void onStartTrackingTouch(SeekBar seekBar)
		{
			// Block refreshing seek bar, to avoid flickering.
			mUpdateEventHandler.sendEmptyMessage(PositionUpdater.STOP_POLLING);
		}
コード例 #4
0
		/// <summary>
		/// Sets the global references to UI elements and event handlers for those elements.
		/// </summary>
		private void setupViewElements()
		{
			mTitleText = (TextView) findViewById(R.id.titleText);
			mArtistText = (TextView) findViewById(R.id.artistText);
			mCoverArt = (ImageView) findViewById(R.id.coverImage);
			mSeekBar = (SeekBar) findViewById(R.id.musicPosition);
			mPlayButton = (ImageButton) findViewById(R.id.playPause);
			mMuteButton = (ImageButton) findViewById(R.id.mute);
			mPositionText = (TextView) findViewById(R.id.positionText);
			mDurationText = (TextView) findViewById(R.id.durationText);

			mSeekBar.OnSeekBarChangeListener = this;
			mPlayButton.OnClickListener = this;
			mMuteButton.OnClickListener = this;
			mPositionText.Text = "00:00";

			mProgressDialog = new ProgressDialog(this);
			mProgressDialog.Message = "Buffering...";
			mProgressDialog.Cancelable = true;
			mProgressDialog.OnCancelListener = new OnCancelListenerAnonymousInnerClassHelper(this);

			View stopButton = findViewById(R.id.stop);
			stopButton.OnClickListener = this;

			mDevicePicker = (DevicePicker) FragmentManager.findFragmentById(R.id.playerPicker);
			mDevicePicker.DeviceType = SmcDevice.TYPE_AVPLAYER;
			mDevicePicker.DeviceSelectedListener = this;
		}