Java 类android.widget.SeekBar 实例源码

项目:Hello-Music-droid    文件:Timber6.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(
            R.layout.fragment_timber6, container, false);

    setMusicStateListener();
    setSongDetails(rootView);

    initGestures(rootView.findViewById(R.id.album_art));

    ((SeekBar) rootView.findViewById(R.id.song_progress)).getProgressDrawable().setColorFilter(new PorterDuffColorFilter(Color.WHITE, PorterDuff.Mode.MULTIPLY));
    ((SeekBar) rootView.findViewById(R.id.song_progress)).getThumb().setColorFilter(new PorterDuffColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP));

    nextSong = (TextView) rootView.findViewById(R.id.title_next);
    nextArt = (CircleImageView) rootView.findViewById(R.id.album_art_next);

    rootView.findViewById(R.id.nextView).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            MusicPlayer.setQueuePosition(MusicPlayer.getQueuePosition() + 1);
        }
    });

    return rootView;
}
项目:aos-Video    文件:FloatingPlayerService.java   
public void onStartTrackingTouch(SeekBar bar) {

            mHandler.removeMessages(MSG_HIDE_CONTROLLER);


            mDragging = true;
            mSeekComplete = false;

            // By removing these pending progress messages we make sure
            // that a) we won't update the progress while the user adjusts
            // the seekbar and b) once the user is done dragging the thumb
            // we will post one of these messages to the queue again and
            // this ensures that there will be exactly one message queued up.
            if (Player.sPlayer.isPlaying()) {
                mSeekWasPlaying = true;
                Player.sPlayer.pause();
            }
            else
                mSeekWasPlaying=false;
        }
项目:fullscreen-video-view    文件:VideoControllerView.java   
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
    if (videoMediaPlayer == null) {
        return;
    }

    if (!fromUser) {
        // We're not interested in programmatically generated changes to
        // the progress bar's position.
        return;
    }

    long duration = videoMediaPlayer.getDuration();
    long newPosition = (duration * progress) / Constants.ONE_MILLISECOND;
    videoMediaPlayer.seekTo((int) newPosition);
    if (currentTime != null) {
        currentTime.setText(stringForTime((int) newPosition));
    }
}
项目:CFAlertDialog    文件:ColorSelectionView.java   
private void bindViews() {

        selectedColorPreview = findViewById(R.id.selected_color_preview);

        seekBarRed = (SeekBar) findViewById(R.id.seekbar_red);
        seekBarRed.setMax(COLOR_MAX_VALUE);
        seekBarRed.setOnSeekBarChangeListener(this);
        seekBarBlue = (SeekBar) findViewById(R.id.seekbar_blue);
        seekBarBlue.setMax(COLOR_MAX_VALUE);
        seekBarBlue.setOnSeekBarChangeListener(this);
        seekBarGreen = (SeekBar) findViewById(R.id.seekbar_green);
        seekBarGreen.setMax(COLOR_MAX_VALUE);
        seekBarGreen.setOnSeekBarChangeListener(this);
        seekBarAlpha = (SeekBar) findViewById(R.id.seekbar_alpha);
        seekBarAlpha.setMax(COLOR_MAX_VALUE);
        seekBarAlpha.setProgress(COLOR_MAX_VALUE);
        seekBarAlpha.setOnSeekBarChangeListener(this);
    }
项目:MontageCam    文件:PaintFragment.java   
private void initStokeWidthPopWindow() {
    popView = LayoutInflater.from(activity).
            inflate(R.layout.view_set_stoke_width, null);
    setStokenWidthWindow = new PopupWindow(popView, ViewGroup.LayoutParams.MATCH_PARENT,
            ViewGroup.LayoutParams.WRAP_CONTENT);

    mStokenWidthSeekBar = (SeekBar) popView.findViewById(R.id.stoke_width_seekbar);

    setStokenWidthWindow.setFocusable(true);
    setStokenWidthWindow.setOutsideTouchable(true);
    setStokenWidthWindow.setBackgroundDrawable(new BitmapDrawable());
    setStokenWidthWindow.setAnimationStyle(R.style.popwin_anim_style);


    mPaintModeView.setPaintStrokeColor(Color.RED);
    mPaintModeView.setPaintStrokeWidth(10);

    updatePaintView();
}
项目:tuxguitar    文件:TGToolbarPlayRateDialog.java   
@SuppressLint("InflateParams")
public Dialog onCreateDialog() {
    tgPlayRateList = generatePercent();

    final View view = getActivity().getLayoutInflater().inflate(R.layout.view_toolbar_playrate_dialog, null);
    this.seekBar = (SeekBar) view.findViewById(R.id.toolbar_percent_seekbar);
    this.textView = (TextView) view.findViewById(R.id.toolbar_percent_textview);

    this.seekBar.setMax(tgPlayRateList.size() - 1);
    this.initPlayRate();
    this.appendListeners(seekBar);

    AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
    builder.setTitle(R.string.toolbar_playrate_dlg_title);
    builder.setView(view);
    return builder.create();
}
项目:XposedNavigationBar    文件:LightAndVolumeController.java   
private ViewGroup getPanel(Context context, int type) {
    final ViewGroup mViewGroup = new LinearLayout(context);
    LinearLayout.LayoutParams btnParam =
            new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    //   btnParam.weight = 1;
    btnParam.gravity = Gravity.CENTER_VERTICAL;
    LinearLayout.LayoutParams seekBarParam =
            new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
    seekBarParam.weight = 1;
    seekBarParam.gravity = Gravity.CENTER;

    ImageButton btnBack = new ImageButton(context);
    btnBack.setImageBitmap(backBitmap);
    btnBack.setScaleType(ImageView.ScaleType.FIT_CENTER);
    btnBack.setBackgroundColor(Color.alpha(255));

    SeekBar seekBar = getSeekBar(context, type);

    ImageButton btnFunc = new ImageButton(context);
    btnFunc.setImageBitmap(funcBitmap);
    btnFunc.setScaleType(ImageView.ScaleType.FIT_CENTER);
    btnFunc.setBackgroundColor(Color.alpha(255));

    mViewGroup.addView(btnBack, btnParam);
    mViewGroup.addView(seekBar, seekBarParam);
    mViewGroup.addView(btnFunc, btnParam);

    final WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
    mViewGroup.setBackgroundColor(Color.BLACK);
    btnBack.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            wm.removeView(mViewGroup);
        }
    });

    return mViewGroup;
}
项目:chromium-for-android-56-debug-video    文件:DistilledPagePrefsView.java   
@Override
public void onFinishInflate() {
    super.onFinishInflate();
    mRadioGroup = (RadioGroup) findViewById(R.id.radio_button_group);
    mColorModeButtons.put(Theme.LIGHT,
            initializeAndGetButton(R.id.light_mode, Theme.LIGHT));
    mColorModeButtons.put(Theme.DARK,
            initializeAndGetButton(R.id.dark_mode, Theme.DARK));
    mColorModeButtons.put(Theme.SEPIA,
            initializeAndGetButton(R.id.sepia_mode, Theme.SEPIA));
    mColorModeButtons.get(mDistilledPagePrefs.getTheme()).setChecked(true);

    mFontScaleSeekBar = (SeekBar) findViewById(R.id.font_size);
    mFontScaleTextView = (TextView) findViewById(R.id.font_size_percentage);

    mFontFamilySpinner = (Spinner) findViewById(R.id.font_family);
    initFontFamilySpinner();

    // Setting initial progress on font scale seekbar.
    onChangeFontScaling(mDistilledPagePrefs.getFontScaling());
    mFontScaleSeekBar.setOnSeekBarChangeListener(this);
}
项目:rental-calc    文件:PropertyProjectionsActivityTest.java   
@Test
public void startWithDefaultProperty() throws Exception
{
    Property property = new Property();

    ActivityController controller = startWithProperty(property);
    Activity activity = (Activity)controller.get();
    SeekBar yearSeeker = (SeekBar)activity.findViewById(R.id.yearSeeker);

    // The first shown year should be year 1, or index 0.
    assertEquals(0, yearSeeker.getProgress());

    Map<Integer, String> expectedValues = new ImmutableMap.Builder<Integer, String>()
            .put(R.id.rentValue, "0")
            .put(R.id.vancancyValue, "0")
            .put(R.id.operatingIncomeValue, "0")
            .put(R.id.operatingExpensesValue, "0")
            .put(R.id.netOperatingIncomeValue, "0")
            .put(R.id.mortgageValue, "0")
            .put(R.id.cashFlowValue, "0")
            .put(R.id.afterTaxCashFlowValue, "0")
            .put(R.id.propertyValueValue, "0")
            .put(R.id.loanBalanceValue, "0")
            .put(R.id.totalEquityValue, "0")
            .put(R.id.depreciationValue, "0")
            .put(R.id.mortgageInterestValue, "0")
            .put(R.id.capitalizationRateValue, "0.0")
            .put(R.id.cashOnCashValue, "0.0")
            .put(R.id.rentToValueValue, "0.0")
            .put(R.id.grossRentMultiplierValue, "0.0")
            .build();

    checkFields(activity, expectedValues);
}
项目:MyFire    文件:JCVideoPlayer.java   
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
    Log.i(TAG, "bottomProgress onStartTrackingTouch [" + this.hashCode() + "] ");
    cancelProgressTimer();
    ViewParent vpdown = getParent();
    while (vpdown != null) {
        vpdown.requestDisallowInterceptTouchEvent(true);
        vpdown = vpdown.getParent();
    }
}
项目:BilibiliClient    文件:MediaController.java   
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);
    }
项目:lineagex86    文件:IncreasingRingVolumePreference.java   
@Override
protected void onBindView(View view) {
    super.onBindView(view);
    getPreferenceManager().registerOnActivityStopListener(this);

    initHandler();

    final SeekBar seekBar = (SeekBar) view.findViewById(R.id.start_volume);
    if (seekBar == mStartVolumeSeekBar) return;

    mStartVolumeSeekBar = seekBar;
    mRampUpTimeSeekBar = (SeekBar) view.findViewById(R.id.ramp_up_time);
    mRampUpTimeValue = (TextView) view.findViewById(R.id.ramp_up_time_value);

    final ContentResolver cr = getContext().getContentResolver();
    float startVolume = CMSettings.System.getFloat(cr,
            CMSettings.System.INCREASING_RING_START_VOLUME, 0.1f);
    int rampUpTime = CMSettings.System.getInt(cr,
            CMSettings.System.INCREASING_RING_RAMP_UP_TIME, 10);

    mStartVolumeSeekBar.setProgress(Math.round(startVolume * 1000F));
    mStartVolumeSeekBar.setOnSeekBarChangeListener(this);
    mRampUpTimeSeekBar.setOnSeekBarChangeListener(this);
    mRampUpTimeSeekBar.setProgress((rampUpTime / 5) - 1);
    mRampUpTimeValue.setText(
            Formatter.formatShortElapsedTime(getContext(), rampUpTime * 1000));
}
项目:BilibiliClient    文件:MediaController.java   
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
    if (!mInstantSeeking)
        mPlayerListener.seekTo(mDuration * seekBar.getProgress() / 1000);
    if (mInfoView != null){
        mInfoView.setText("");
        mInfoView.setVisibility(GONE);
    }
    show(sDefaultTimeout);
    mHandler.removeMessages(SHOW_PROGRESS);
    mAudioManager.setStreamMute(AudioManager.STREAM_MUSIC, false);
    mDragging = false;
    mHandler.sendEmptyMessageDelayed(SHOW_PROGRESS, 1000);
}
项目:dkplayer    文件:FullScreenController.java   
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
    long duration = mediaPlayer.getDuration();
    long newPosition = (duration * seekBar.getProgress()) / videoProgress.getMax();
    mediaPlayer.seekTo((int) newPosition);
    isDragging = false;
    post(mShowProgress);
    show();
}
项目:Cable-Android    文件:AudioView.java   
public AudioView(Context context, AttributeSet attrs, int defStyleAttr) {
  super(context, attrs, defStyleAttr);
  inflate(context, R.layout.audio_view, this);

  this.container        = (ViewGroup) findViewById(R.id.audio_widget_container);
  this.controlToggle    = (AnimatingToggle) findViewById(R.id.control_toggle);
  this.playButton       = (ImageView) findViewById(R.id.play);
  this.pauseButton      = (ImageView) findViewById(R.id.pause);
  this.downloadButton   = (ImageView) findViewById(R.id.download);
  this.downloadProgress = (ProgressWheel) findViewById(R.id.download_progress);
  this.seekBar          = (SeekBar) findViewById(R.id.seek);
  this.timestamp        = (TextView) findViewById(R.id.timestamp);

  this.playButton.setOnClickListener(new PlayClickedListener());
  this.pauseButton.setOnClickListener(new PauseClickedListener());
  this.seekBar.setOnSeekBarChangeListener(new SeekBarModifiedListener());

  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    this.playButton.setImageDrawable(context.getDrawable(R.drawable.play_icon));
    this.pauseButton.setImageDrawable(context.getDrawable(R.drawable.pause_icon));
    this.playButton.setBackground(context.getDrawable(R.drawable.ic_circle_fill_white_48dp));
    this.pauseButton.setBackground(context.getDrawable(R.drawable.ic_circle_fill_white_48dp));
  }

  if (attrs != null) {
    TypedArray typedArray = context.getTheme().obtainStyledAttributes(attrs, R.styleable.AudioView, 0, 0);
    setTint(typedArray.getColor(R.styleable.AudioView_foregroundTintColor, Color.WHITE),
            typedArray.getColor(R.styleable.AudioView_backgroundTintColor, Color.WHITE));
    container.setBackgroundColor(typedArray.getColor(R.styleable.AudioView_widgetBackground, Color.TRANSPARENT));
    typedArray.recycle();
  }
}
项目:PLDroidShortVideo    文件:EyeAndThinView.java   
private void updateView() {
    mSwitchBeauty.setImageResource(isOpen ? R.drawable.kai : R.drawable.guan);
    for (SeekBarRow row : seekBarRowList) {
        SeekBar seekBar = row.seekBar;
        seekBar.setEnabled(isOpen);
    }
}
项目:TextEmoji    文件:EmojiFragment.java   
private void initOptions(View root) {
    mWithShadow = SharePreferencesUtils.withShadow(getActivity(), false);
    mTextSize = SharePreferencesUtils.textSize(getActivity(), mDefaultTextSize);

    SeekBar seekBar = (SeekBar) root.findViewById(R.id.text_size);
    seekBar.setProgress((mTextSize - mMinTextSize) / mSpanPerSegment);

    ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(getContext(), R.array.gif_source_array, android.R.layout.simple_spinner_dropdown_item);
    mGifSourceSpinner.setAdapter(adapter);

    int source = SharePreferencesUtils.getInt(getContext(), KEY_GIF_SORUCE);
    mGifSourceSpinner.setSelection(source);
}
项目:behe-keyboard    文件:SeekPreference.java   
@Override
protected void onBindView(View view) {
    super.onBindView(view);
    mSeekBar = (SeekBar) view.findViewById(R.id.seekbar);
    mSeekBar.setProgress(mProgress);
    mSeekBar.setOnSeekBarChangeListener(this);
}
项目:MobileMedia    文件:AudioPlayerActivity.java   
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
    if (fromUser) {
        try {
            mService.seekTo(progress);
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }
}
项目:xbot_head    文件:SeekbarPreference.java   
@Override
protected void onBindView(View view) {
    Log.i(TAG, "SeekbarPreference----onBindView");
    super.onBindView(view);

    progress = getPersistedInt(60);
    seekBar = (SeekBar) view.findViewById(R.id.id_seekbar_threshold);
    textView = (TextView) view.findViewById(R.id.id_tv_threshold_value);

    seekBar.setMax(maxValue);
    seekBar.setProgress(progress);
    seekBar.setEnabled(isEnabled());
    seekBar.setOnSeekBarChangeListener(this);
    textView.setText(getSummary());
}
项目:ceji_android    文件:PlaybackControlsFragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_playback_controls, container, false);

    mPlayPause = (ImageButton) rootView.findViewById(R.id.play_pause);
    mPlayPause.setEnabled(true);
    mPlayPause.setOnClickListener(mButtonListener);
    audioSeekBar = (SeekBar) rootView.findViewById(R.id.seekBar);

    mTitle = (TextView) rootView.findViewById(R.id.title);
    mSubtitle = (TextView) rootView.findViewById(R.id.artist);
    mExtraInfo = (TextView) rootView.findViewById(R.id.extra_info);
    mAlbumArt = (ImageView) rootView.findViewById(R.id.album_art);
    init();

    rootView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            List<MusicMedia> songList = MediaUtil.getInstacen().getSongList();
            Log.i(TAG,"songList="+songList.size());
            if(songList.size()>0){
                Intent playIntent = new Intent(getActivity(), FullScreenPlayerActivity.class);
                playIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
                if(MediaUtil.CURRENTPOS<0){
                    Toast.makeText(getActivity(),R.string.select_yinpin,0).show();
                    return;
                }
                playIntent.putExtra("music",songList.get(MediaUtil.CURRENTPOS));
                startActivity(playIntent);
            }else{
                Toast.makeText(getActivity(),R.string.select_yinpin,0).show();
            }


            //                playIntent.putExtra("position", position);
        }
    });
    return rootView;
}
项目:FilterPlayer    文件:MainActivity.java   
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        Log.d(TAG, "SAMPLE PAth: " + SAMPLE);
        setContentView(R.layout.activity_main);
        niceSpinner = (NiceSpinner)findViewById(R.id.cameraFilter_spinner);
        List<String> dataset = new LinkedList<>(Arrays.asList("正常 ","黑白 ", "模糊 ", "锐化 ", "边缘 ", "浮雕 "));
        niceSpinner.attachDataSource(dataset);
        listenControl = (LinearLayout)findViewById(R.id.listen_control);
        selectFileBtn = (Button)findViewById(R.id.open_file);
        control = (LinearLayout)findViewById(R.id.control);
        glSurfaceView = (GLSurfaceView) findViewById(R.id.glSurfaceView);
        SeekBar seekBar = (SeekBar) findViewById(R.id.seekbar);

        videoRenderer = new VideoRenderer(MainActivity.this, glSurfaceView, seekBar, videoPath);
        glSurfaceView.setEGLContextClientVersion(2);
        glSurfaceView.setRenderer(videoRenderer);
        glSurfaceView.setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
//        Log.d(TAG, SAMPLE);

        niceSpinner.setOnTouchListener(this);
        niceSpinner.setOnItemSelectedListener(this);
        niceSpinner.dismissDropDown();
        pause = (Button) findViewById(R.id.pause);
        // avoid clicking without video

        pause.setEnabled(false);

        pause.setOnClickListener(this);
        selectFileBtn.setOnClickListener(this);
        glSurfaceView.setOnClickListener(this);


    }
项目:GitHub    文件:PiePolylineChartActivity.java   
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {

    tvX.setText("" + (mSeekBarX.getProgress()));
    tvY.setText("" + (mSeekBarY.getProgress()));

    setData(mSeekBarX.getProgress(), mSeekBarY.getProgress());
}
项目:sample-lowpan    文件:TransmitterActivity.java   
/**
 * Sends a new value of the seekbar to the connected device.
 */
private void onSeekBarValueChanged(int newValue) {
    onNewValue(String.valueOf(newValue));
    SeekBar seekBar = findViewById(R.id.seekBar);
    mSeekBarValue = newValue;
    seekBar.setProgress(mSeekBarValue);
    // Send a new value to connected devices
    mHandler.post(mUpdateSeekbarRunnable);
}
项目:buildAPKsApps    文件:VolumeDialog.java   
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
    mChecked = isChecked;

    // update flag immediately
    setUseRingerVolume(mChecked);

    SeekBar seek = mNotificationHolder.seek;
    if (isChecked) {
        seek.setEnabled(false);
        seek.setProgress(mRingerHolder.seek.getProgress());
        mNotificationHolder.text.setText(mRingerHolder.text.getText());
    } else {
        seek.setEnabled(true);
    }
}
项目:Guanajoven    文件:IdiomasAdicionalesPorcentajesFragment.java   
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
    int id = seekBar.getId();
    if (id == seekBarConversacion.getId()) {
        tvPorcentajeConversacion.setText(String.valueOf(progress) + "%");
    } else if (id == seekBarLectura.getId()) {
        tvPorcentajeLectura.setText(String.valueOf(progress) + "%");
    } else if (id == seekBarEscritura.getId()) {
        tvPorcentajeEscritura.setText(String.valueOf(progress) + "%");
    }
}
项目:TextReader    文件:ReadActivity.java   
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
    if (seekBar.getId() == seekbarFontSize.getId() && fromUser) {
        calcFontSize(progress);
    } else if (seekBar.getId() == seekbarLightness.getId() && fromUser
            && !SettingManager.getInstance().isAutoBrightness()) { // 非自动调节模式下 才可调整屏幕亮度
        ScreenUtils.saveScreenBrightnessInt100(progress, ReadActivity.this);
        //SettingManager.getInstance().saveReadBrightness(progress);
    }
}
项目:alreon    文件:fgAnalogSerial.java   
@Override
public void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) {
    switch (arg0.getId()) {
    case idSeekBarRudder:
        gearRudder = (float) ((float) (arg1 - 50) / 50);
        break;
    case idSeekBarThrottle:
        gearThrottle = (float) ((float) arg1 / 100);
        break;
    }
}
项目:GitHub    文件:BarStatusColorFragment.java   
@Override
public void initView(Bundle savedInstanceState, View view) {
    fakeStatusBar = view.findViewById(R.id.fake_status_bar);
    view.findViewById(R.id.btn_random_color).setOnClickListener(this);
    view.findViewById(R.id.btn_set_transparent).setOnClickListener(this);
    mTvStatusAlpha = (TextView) view.findViewById(R.id.tv_status_alpha);
    sbChangeAlpha = (SeekBar) view.findViewById(R.id.sb_change_alpha);
    sbChangeAlpha.setOnSeekBarChangeListener(colorListener);
    mTvStatusAlpha.setText(String.valueOf(mAlpha));

    updateFakeStatusBar();
}
项目:QSVideoPlayer    文件:QSVideoViewHelp.java   
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
    if (getDuration() > 1) {
        int time = seekBar.getProgress() * (getDuration() / progressMax);
        seekTo(time);
    }
    startProgressTimer();
    if (currentState == STATE_PLAYING)
        startDismissControlViewTimer(1314);
}
项目:Edu    文件:JCVideoPlayerSimple.java   
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
    if (fromUser) {
        if (currentState == CURRENT_STATE_NORMAL) {
            Toast.makeText(getContext(), "Play video first", Toast.LENGTH_SHORT).show();
            return;
        }
    }
    super.onProgressChanged(seekBar, progress, fromUser);
}
项目:grafika    文件:TextureFromCameraActivity.java   
@Override   // SeekBar.OnSeekBarChangeListener
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
    if (mRenderThread == null) {
        // Could happen if we programmatically update the values after setting a listener
        // but before starting the thread.  Also, easy to cause this by scrubbing the seek
        // bar with one finger then tapping "recents" with another.
        Log.w(TAG, "Ignoring onProgressChanged received w/o RT running");
        return;
    }
    RenderHandler rh = mRenderThread.getHandler();

    // "progress" ranges from 0 to 100
    if (seekBar == mZoomBar) {
        //Log.v(TAG, "zoom: " + progress);
        rh.sendZoomValue(progress);
    } else if (seekBar == mSizeBar) {
        //Log.v(TAG, "size: " + progress);
        rh.sendSizeValue(progress);
    } else if (seekBar == mRotateBar) {
        //Log.v(TAG, "rotate: " + progress);
        rh.sendRotateValue(progress);
    } else {
        throw new RuntimeException("unknown seek bar");
    }

    // If we're getting preview frames quickly enough we don't really need this, but
    // we don't want to have chunky-looking resize movement if the camera is slow.
    // OTOH, if we get the updates too quickly (60fps camera?), this could jam us
    // up and cause us to run behind.  So use with caution.
    rh.sendRedraw();
}
项目:BilibiliClient    文件:MediaController.java   
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);
      }
    }
项目:GiraffePlayer2    文件:DefaultMediaController.java   
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
    if (!videoView.isCurrentActivePlayer()) {
        return;
    }
    GiraffePlayer player = videoView.getPlayer();
    if (!instantSeeking) {
        player.seekTo((int) ((player.getDuration() * 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);
}
项目:SmingZZick_App    文件:FontControl.java   
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
    int id = seekBar.getId();
    if (seekBar == textStrokeSeekBar) {
        textPreviewView.setTextStrokeRatio((float) progress / seekBar.getMax());
    }
    update();
}
项目:buildAPKsApps    文件:VolumeSettingHandler.java   
public boolean prepareDialog() {

        // local cache
        final AudioManager manager = (AudioManager) mActivity.getSystemService(Activity.AUDIO_SERVICE);
        final SeekBar[] seekBars = mSeekBars;
        final TextView[] valueViews = mValueViews;
        final int[] volumes = mVolumes;
        final int length = seekBars.length;
        final int[] streamTypes = STREAM_TYPES;

        for (int i=0; i<length; i++) {

            // get value and max value
            int volume = manager.getStreamVolume(streamTypes[i]);
            int max = manager.getStreamMaxVolume(streamTypes[i]);

            // update values
            final TextView valueView = valueViews[i];
            valueView.setText(volume + "/" + max);

            // update seekbar
            SeekBar seekBar = seekBars[i];
            seekBar.setMax(max);
            seekBar.setProgress(volume);

            volumes[i] = volume; // store initial volume

            //Log.d(TAG, "prepare: index: " + i + ", value: " + volume + ", max: " + max + ", seekbar: " + seekBar);
        }
        return true;
    }
项目:DOUSalaries    文件:SalaryWidgetFragment.java   
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
项目:MontageCam    文件:BeautyFragment.java   
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
    doBeautyTask();
}
项目:BatteryAlert    文件:MainActivity.java   
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
    textView.setText(String.format(getString(R.string.text_alert_value), progress));
    prefs.edit().putInt(KEY_BATTERY_PERCENT, progress).apply();
}
项目:RealityCheck    文件:VrActivity.java   
@Override
public void onStartTrackingTouch(SeekBar seekBar) { }