use of com.example.advanceDemo.view.HorizontalListView in project LanSoEditor_advance by LanSoSdk.
the class Demo3LayerFilterActivity method initView.
private void initView() {
findViewById(R.id.id_filterLayer_demo_next).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (mplayer != null) {
mplayer.stop();
mplayer.release();
mplayer = null;
}
drawPadView.stopDrawPad();
filterExecute();
}
});
listFilterView = (HorizontalListView) findViewById(R.id.id_filterlayer_filterlist);
listFilterView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
if (filterLayer != null) {
GPUImageFilter filter = filterList.getFilter(getApplicationContext(), arg2);
currrentFilterName = filterList.getName(arg2);
filterLayer.switchFilterTo(filter);
}
}
});
drawPadView = (DrawPadView) findViewById(R.id.id_filterLayer_demo_view);
skbarFilterAdjuster = (SeekBar) findViewById(R.id.id_filterLayer_demo_seek1);
skbarFilterAdjuster.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);
}
}
});
skbarFilterAdjuster.setMax(100);
findViewById(R.id.id_filterLayer_demo_selectbtn).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
selectFilter();
}
});
findViewById(R.id.id_filterdemo_saveplay).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (SDKFileUtils.fileExist(dstPath)) {
Intent intent = new Intent(Demo3LayerFilterActivity.this, VideoPlayerActivity.class);
intent.putExtra("videopath", dstPath);
startActivity(intent);
} else {
Toast.makeText(Demo3LayerFilterActivity.this, "目标文件不存在", Toast.LENGTH_SHORT).show();
}
}
});
findViewById(R.id.id_filterdemo_saveplay).setVisibility(View.GONE);
}
Aggregations