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) {
}
});
}
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);
}
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;
}
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));
}
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) {
}
});
}
Aggregations