Search in sources :

Example 46 with SeekBar

use of android.widget.SeekBar in project cw-omnibus by commonsguy.

the class FragmentBase method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    setRetainInstance(true);
    View result = inflater.inflate(R.layout.scaleclip, container, false);
    SeekBar bar = ((SeekBar) result.findViewById(R.id.level));
    bar.setOnSeekBarChangeListener(this);
    image = (ImageView) result.findViewById(R.id.image);
    setImageBackground(image);
    image.setImageLevel(bar.getProgress());
    return (result);
}
Also used : SeekBar(android.widget.SeekBar) ImageView(android.widget.ImageView) View(android.view.View)

Example 47 with SeekBar

use of android.widget.SeekBar in project Depth-LIB-Android- by danielzeller.

the class WindFragment method setupSliders.

private void setupSliders() {
    SeekBar windSeekbar = (SeekBar) root.findViewById(R.id.wind_seekbar);
    final SeekBar flamesSeekbar = (SeekBar) root.findViewById(R.id.flames_seekbar);
    setProgressBarColor(windSeekbar, getResources().getColor(R.color.fab2));
    setProgressBarColor(flamesSeekbar, getResources().getColor(R.color.fab2));
    windSeekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {

        @Override
        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
            bearsScene.setWind(progress);
        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
        }

        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {
        }
    });
    flamesSeekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {

        @Override
        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
            bearsScene.setFlamesHeight(progress);
        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
        }

        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {
        }
    });
    bearsScene.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {

        @Override
        public void onGlobalLayout() {
            bearsScene.getViewTreeObserver().removeOnGlobalLayoutListener(this);
            flamesSeekbar.setProgress(FLAMES_INITIAL_HEIGHT);
        }
    });
}
Also used : SeekBar(android.widget.SeekBar) ViewTreeObserver(android.view.ViewTreeObserver)

Example 48 with SeekBar

use of android.widget.SeekBar in project android by owncloud.

the class MediaControlView method initControllerView.

private void initControllerView(View v) {
    mPauseButton = (ImageButton) v.findViewById(R.id.playBtn);
    if (mPauseButton != null) {
        mPauseButton.requestFocus();
        mPauseButton.setOnClickListener(this);
    }
    mFfwdButton = (ImageButton) v.findViewById(R.id.forwardBtn);
    if (mFfwdButton != null) {
        mFfwdButton.setOnClickListener(this);
    }
    mRewButton = (ImageButton) v.findViewById(R.id.rewindBtn);
    if (mRewButton != null) {
        mRewButton.setOnClickListener(this);
    }
    mProgress = (ProgressBar) v.findViewById(R.id.progressBar);
    if (mProgress != null) {
        if (mProgress instanceof SeekBar) {
            SeekBar seeker = (SeekBar) mProgress;
            DisplayUtils.colorPreLollipopHorizontalSeekBar(seeker);
            seeker.setOnSeekBarChangeListener(this);
        } else {
            DisplayUtils.colorPreLollipopHorizontalProgressBar(mProgress);
        }
        mProgress.setMax(1000);
    }
    mEndTime = (TextView) v.findViewById(R.id.totalTimeText);
    mCurrentTime = (TextView) v.findViewById(R.id.currentTimeText);
    mFormatBuilder = new StringBuilder();
    mFormatter = new Formatter(mFormatBuilder, Locale.getDefault());
}
Also used : SeekBar(android.widget.SeekBar) Formatter(java.util.Formatter)

Example 49 with SeekBar

use of android.widget.SeekBar in project StatusBarCompat by niorgai.

the class CommonFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    setStatusBar();
    SeekBar seekBar = (SeekBar) view.findViewById(R.id.seek_bar);
    seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {

        @Override
        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
            StatusBarCompat.setStatusBarColor(getActivity(), MainActivity.DEFAULT_COLOR, progress);
        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
        }

        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {
        }
    });
}
Also used : SeekBar(android.widget.SeekBar)

Example 50 with SeekBar

use of android.widget.SeekBar in project XobotOS by xamarin.

the class SeekBarPreference method onBindView.

@Override
protected void onBindView(View view) {
    super.onBindView(view);
    SeekBar seekBar = (SeekBar) view.findViewById(com.android.internal.R.id.seekbar);
    seekBar.setOnSeekBarChangeListener(this);
    seekBar.setMax(mMax);
    seekBar.setProgress(mProgress);
    seekBar.setEnabled(isEnabled());
}
Also used : SeekBar(android.widget.SeekBar)

Aggregations

SeekBar (android.widget.SeekBar)193 TextView (android.widget.TextView)90 View (android.view.View)64 ImageView (android.widget.ImageView)28 LinearLayout (android.widget.LinearLayout)22 FrameLayout (android.widget.FrameLayout)19 Intent (android.content.Intent)18 CompoundButton (android.widget.CompoundButton)18 OnSeekBarChangeListener (android.widget.SeekBar.OnSeekBarChangeListener)14 Paint (android.graphics.Paint)13 AdapterView (android.widget.AdapterView)13 AlertDialog (android.support.v7.app.AlertDialog)11 Button (android.widget.Button)11 DialogInterface (android.content.DialogInterface)10 CheckBox (android.widget.CheckBox)10 ToggleButton (android.widget.ToggleButton)10 SuppressLint (android.annotation.SuppressLint)9 EditText (android.widget.EditText)9 Spinner (android.widget.Spinner)7 SharedPreferences (android.content.SharedPreferences)6