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