use of android.widget.SeekBar.OnSeekBarChangeListener in project ticker by robinhood.
the class SlideActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_slide);
final TickerView ticker = findViewById(R.id.ticker);
final SeekBar seekBar = findViewById(R.id.seek);
seekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
ticker.setText("$" + (float) progress / 100);
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
});
}
use of android.widget.SeekBar.OnSeekBarChangeListener in project zype-android by zype.
the class VideoCastControllerActivity method loadAndSetupViews.
private void loadAndSetupViews() {
mPauseDrawable = getResources().getDrawable(R.drawable.ic_pause_circle_white_80dp);
mPlayDrawable = getResources().getDrawable(R.drawable.ic_play_circle_white_80dp);
mStopDrawable = getResources().getDrawable(R.drawable.ic_stop_circle_white_80dp);
mPageView = findViewById(R.id.pageview);
mPlayPause = (ImageButton) findViewById(R.id.play_pause_toggle);
mLiveText = (TextView) findViewById(R.id.live_text);
mStart = (TextView) findViewById(R.id.start_text);
mEnd = (TextView) findViewById(R.id.end_text);
mSeekbar = (SeekBar) findViewById(R.id.seekbar);
mLine2 = (TextView) findViewById(R.id.textview2);
mLoading = (ProgressBar) findViewById(R.id.progressbar1);
mControllers = findViewById(R.id.controllers);
mClosedCaptionIcon = (ImageButton) findViewById(R.id.cc);
mSkipNext = (ImageButton) findViewById(R.id.next);
mSkipPrevious = (ImageButton) findViewById(R.id.previous);
mPlaybackControls = findViewById(R.id.playback_controls);
mMini = (MiniController) findViewById(R.id.miniController1);
mMini.setCurrentVisibility(false);
setClosedCaptionState(CC_DISABLED);
mPlayPause.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
try {
mListener.onPlayPauseClicked(v);
} catch (TransientNetworkDisconnectionException e) {
LOGE(TAG, "Failed to toggle playback due to temporary network issue", e);
Utils.showToast(VideoCastControllerActivity.this, R.string.ccl_failed_no_connection_trans);
} catch (NoConnectionException e) {
LOGE(TAG, "Failed to toggle playback due to network issues", e);
Utils.showToast(VideoCastControllerActivity.this, R.string.ccl_failed_no_connection);
} catch (Exception e) {
LOGE(TAG, "Failed to toggle playback due to other issues", e);
Utils.showToast(VideoCastControllerActivity.this, R.string.ccl_failed_perform_action);
}
}
});
mSeekbar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
try {
if (mListener != null) {
mListener.onStopTrackingTouch(seekBar);
}
} catch (Exception e) {
LOGE(TAG, "Failed to complete seek", e);
finish();
}
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
try {
if (mListener != null) {
mListener.onStartTrackingTouch(seekBar);
}
} catch (Exception e) {
LOGE(TAG, "Failed to start seek", e);
finish();
}
}
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
mStart.setText(Utils.formatMillis(progress));
try {
if (mListener != null) {
mListener.onProgressChanged(seekBar, progress, fromUser);
}
} catch (Exception e) {
LOGE(TAG, "Failed to set the progress result", e);
}
}
});
mClosedCaptionIcon.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
try {
showTracksChooserDialog();
} catch (TransientNetworkDisconnectionException | NoConnectionException e) {
LOGE(TAG, "Failed to get the media", e);
}
}
});
mSkipNext.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
try {
mListener.onSkipNextClicked(v);
} catch (TransientNetworkDisconnectionException | NoConnectionException e) {
LOGE(TAG, "Failed to move to the next item in the queue", e);
}
}
});
mSkipPrevious.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
try {
mListener.onSkipPreviousClicked(v);
} catch (TransientNetworkDisconnectionException | NoConnectionException e) {
LOGE(TAG, "Failed to move to the previous item in the queue", e);
}
}
});
}
use of android.widget.SeekBar.OnSeekBarChangeListener in project LanSoEditor_advance by LanSoSdk.
the class CameraLayerRectActivity method initView.
private void initView() {
tvTime = (TextView) findViewById(R.id.id_cameralayer_timetv);
playVideo = (LinearLayout) findViewById(R.id.id_cameralayer_saveplay);
playVideo.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (SDKFileUtils.fileExist(dstPath)) {
Intent intent = new Intent(CameraLayerRectActivity.this, VideoPlayerActivity.class);
intent.putExtra("videopath", dstPath);
startActivity(intent);
} else {
Toast.makeText(CameraLayerRectActivity.this, "目标文件不存在", Toast.LENGTH_SHORT).show();
}
}
});
playVideo.setVisibility(View.GONE);
findViewById(R.id.id_cameralayer_flashlight).setOnClickListener(this);
findViewById(R.id.id_cameralayer_frontcamera).setOnClickListener(this);
findViewById(R.id.id_camerape_demo_selectbtn).setOnClickListener(this);
handler = new Handler(this);
AdjusterFilter = (SeekBar) findViewById(R.id.id_cameralayer_demo_seek1);
AdjusterFilter.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
// TODO Auto-generated method stub
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
// TODO Auto-generated method stub
}
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
// TODO Auto-generated method stub
if (mFilterAdjuster != null) {
mFilterAdjuster.adjust(progress);
}
}
});
}
use of android.widget.SeekBar.OnSeekBarChangeListener in project LanSoEditor_advance by LanSoSdk.
the class MoreLayHeadSeekActivity method initView.
private void initView() {
btnPlay = (LinearLayout) findViewById(R.id.id_videoLayer_saveplay);
btnPlay.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MoreLayHeadSeekActivity.this, VideoPlayerActivity.class);
intent.putExtra("videopath", dstPath);
startActivity(intent);
}
});
btnPlay.setVisibility(View.GONE);
skbTime = (SeekBar) findViewById(R.id.id_transform2_seekbar);
skbTime.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if (fromUser) {
Log.i(TAG, "seekbar progress " + progress);
seekTo(progress);
}
}
});
}
use of android.widget.SeekBar.OnSeekBarChangeListener in project LanSoEditor_advance by LanSoSdk.
the class BitmapLayerFilterDemoActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.bitmaplayer_filter_layout);
initView();
drawPadView = (DrawPadView) findViewById(R.id.DrawPad_view);
// 在手机的默认路径下创建一个文件名,用来保存生成的视频文件,(在onDestroy中删除)
dstPath = SDKFileUtils.newMp4PathInBox();
mContext = getApplicationContext();
findViewById(R.id.id_bitmapfilter_demo_selectbtn).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
selectFilter();
}
});
AdjusterFilter = (SeekBar) findViewById(R.id.id_bitmapfilter_demo_seek1);
AdjusterFilter.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if (mFilterAdjuster != null) {
mFilterAdjuster.adjust(progress);
}
}
});
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
initDrawPad();
}
}, 200);
}
Aggregations