本文整理匯總了Java中android.opengl.GLSurfaceView.setOnClickListener方法的典型用法代碼示例。如果您正苦於以下問題:Java GLSurfaceView.setOnClickListener方法的具體用法?Java GLSurfaceView.setOnClickListener怎麽用?Java GLSurfaceView.setOnClickListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.opengl.GLSurfaceView
的用法示例。
在下文中一共展示了GLSurfaceView.setOnClickListener方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreate
import android.opengl.GLSurfaceView; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Log.d(TAG, "SAMPLE PAth: " + SAMPLE);
setContentView(R.layout.activity_main);
niceSpinner = (NiceSpinner)findViewById(R.id.cameraFilter_spinner);
List<String> dataset = new LinkedList<>(Arrays.asList("正常 ","黑白 ", "模糊 ", "銳化 ", "邊緣 ", "浮雕 "));
niceSpinner.attachDataSource(dataset);
listenControl = (LinearLayout)findViewById(R.id.listen_control);
selectFileBtn = (Button)findViewById(R.id.open_file);
control = (LinearLayout)findViewById(R.id.control);
glSurfaceView = (GLSurfaceView) findViewById(R.id.glSurfaceView);
SeekBar seekBar = (SeekBar) findViewById(R.id.seekbar);
videoRenderer = new VideoRenderer(MainActivity.this, glSurfaceView, seekBar, videoPath);
glSurfaceView.setEGLContextClientVersion(2);
glSurfaceView.setRenderer(videoRenderer);
glSurfaceView.setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
// Log.d(TAG, SAMPLE);
niceSpinner.setOnTouchListener(this);
niceSpinner.setOnItemSelectedListener(this);
niceSpinner.dismissDropDown();
pause = (Button) findViewById(R.id.pause);
// avoid clicking without video
pause.setEnabled(false);
pause.setOnClickListener(this);
selectFileBtn.setOnClickListener(this);
glSurfaceView.setOnClickListener(this);
}