Example usage for android.view TextureView setSurfaceTextureListener

List of usage examples for android.view TextureView setSurfaceTextureListener

Introduction

In this page you can find the example usage for android.view TextureView setSurfaceTextureListener.

Prototype

public void setSurfaceTextureListener(SurfaceTextureListener listener) 

Source Link

Document

Sets the SurfaceTextureListener used to listen to surface texture events.

Usage

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());

}