Code example for TextureView

Methods: setSurfaceTextureListener

0
 
	@Override 
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		 
		textureView = new TextureView(this);
		textureView.setSurfaceTextureListener(this);
		setContentView(textureView);
		 
//		setContentView(R.layout.activity_main); 
//		findViewById(R.id.button1).setOnClickListener(new OnClickListener() { 
//			 
//			@Override 
//			public void onClick(View v) { 
//				Intent intent = new Intent(); 
//				intent.setClass(getApplicationContext(), TextureListActivity.class); 
//				startActivity(intent); 
//			} 
//		}); 
	}