Search in sources :

Example 96 with SeekBar

use of android.widget.SeekBar in project UltimateAndroid by cymcsg.

the class DetailFragment method createFolderSeekBar.

private void createFolderSeekBar(View view, final DriveImageView imageView) {
    SeekBar folderSeekBar = (SeekBar) view.findViewById(R.id.detail_drive_folder);
    folderSeekBar.setMax(FOLDER_SEEKBAR_MAX);
    folderSeekBar.setProgress(FOLDER_SEEKBAR_PROGRESS);
    folderSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {

        @Override
        public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
            imageView.setFolderCorner(Float.valueOf(i));
        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
        }

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

Example 97 with SeekBar

use of android.widget.SeekBar in project AnimeTaste by daimajia.

the class PlayActivity method registerCallbackForControls.

private void registerCallbackForControls() {
    OnSeekBarChangeListener seekBarChangeListener = new OnSeekBarChangeListener() {

        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
            updateTextViewWithTimeFormat(mCurPosition, progress);
        }

        public void onStartTrackingTouch(SeekBar seekBar) {
            mUIHandler.removeMessages(UI_EVENT_UPDATE_CURRPOSITION);
        }

        public void onStopTrackingTouch(SeekBar seekBar) {
            int seekPosition = seekBar.getProgress();
            mVV.seekTo(seekPosition);
            mUIHandler.sendEmptyMessage(UI_EVENT_UPDATE_CURRPOSITION);
        }
    };
    mProgress.setOnSeekBarChangeListener(seekBarChangeListener);
}
Also used : SeekBar(android.widget.SeekBar) OnSeekBarChangeListener(android.widget.SeekBar.OnSeekBarChangeListener) SuppressLint(android.annotation.SuppressLint)

Example 98 with SeekBar

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

the class PlayGroundActivity method setupRotationXSeekbar.

private SeekBar setupRotationXSeekbar() {
    SeekBar rotationX = (SeekBar) findViewById(R.id.rotation_x_seekbar);
    WindFragment.setProgressBarColor(rotationX, seekbarColor);
    rotationX.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {

        @Override
        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
            depthView.setRotationX(-MAX_ROTATION_X + (MAX_ROTATION_X * 2f) * ((float) progress / (float) seekBar.getMax()));
        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
        }

        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {
        }
    });
    rotationX.setProgress((int) (rotationX.getMax() * 0.1f));
    return rotationX;
}
Also used : SeekBar(android.widget.SeekBar)

Example 99 with SeekBar

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

the class PlayGroundActivity method setupElevationSeekbar.

private void setupElevationSeekbar() {
    SeekBar elevation = (SeekBar) findViewById(R.id.elevation_seekbar);
    elevation.setProgress(0);
    WindFragment.setProgressBarColor(elevation, seekbarColor);
    elevation.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {

        @Override
        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
            depthView.setCustomShadowElevation((MAX_ELEVATION * ((float) progress / (float) seekBar.getMax())) * getResources().getDisplayMetrics().density);
        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
        }

        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {
        }
    });
    elevation.setProgress((int) (elevation.getMax() * 0.5f));
}
Also used : SeekBar(android.widget.SeekBar)

Example 100 with SeekBar

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

the class PlayGroundActivity method setupRotationZSeekbar.

private void setupRotationZSeekbar() {
    SeekBar rotation = (SeekBar) findViewById(R.id.rotation_z_seekbar);
    rotation.setProgress(0);
    WindFragment.setProgressBarColor(rotation, seekbarColor);
    rotation.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {

        @Override
        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
            depthView.setRotation(-MAX_ROTATION_Z * ((float) progress / (float) seekBar.getMax()));
        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
        }

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

Aggregations

SeekBar (android.widget.SeekBar)184 TextView (android.widget.TextView)85 View (android.view.View)59 ImageView (android.widget.ImageView)26 LinearLayout (android.widget.LinearLayout)21 FrameLayout (android.widget.FrameLayout)19 CompoundButton (android.widget.CompoundButton)18 Intent (android.content.Intent)15 Paint (android.graphics.Paint)13 OnSeekBarChangeListener (android.widget.SeekBar.OnSeekBarChangeListener)13 AdapterView (android.widget.AdapterView)12 ToggleButton (android.widget.ToggleButton)10 AlertDialog (android.support.v7.app.AlertDialog)9 Button (android.widget.Button)9 CheckBox (android.widget.CheckBox)9 DialogInterface (android.content.DialogInterface)8 Spinner (android.widget.Spinner)7 SuppressLint (android.annotation.SuppressLint)6 SharedPreferences (android.content.SharedPreferences)6 Bundle (android.os.Bundle)6