List of usage examples for android.view TextureView setSurfaceTextureListener
public void setSurfaceTextureListener(SurfaceTextureListener listener)
From source file:com.google.android.apps.gutenberg.ScannerFragment.java
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { mViewfinder = (ViewfinderView) view.findViewById(R.id.viewfinder); TextureView preview = (TextureView) view.findViewById(R.id.preview); preview.setSurfaceTextureListener(this); }
From source file:com.aengbee.android.leanback.ui.PlaybackOverlayFragment_WebView.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mAudioManager = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE); // Initialize instance variables. TextureView textureView = (TextureView) getActivity().findViewById(R.id.texture_view); textureView.setSurfaceTextureListener(this); setBackgroundType(BACKGROUND_TYPE);/*from w w w . ja v a 2 s . c o m*/ // Set up listener. setOnItemViewClickedListener(new ItemViewClickedListener()); }
From source file:com.aengbee.android.leanback.ui.PlaybackOverlayCustomFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mAudioManager = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE); // Initialize instance variables. TextureView textureView = (TextureView) getActivity().findViewById(R.id.texture_view); textureView.setSurfaceTextureListener(this); setBackgroundType(BACKGROUND_TYPE);/* w w w. j ava 2 s . c om*/ // Set up listener. setOnItemViewClickedListener(new ItemViewClickedListener()); }