2

I am using CommonsWare's Android CWAC-Camera Library and trying to use my own UI for the camera fragment. Please forgive me if this is a dumb question. I am following the README file specifically this part:

"You can subclass CameraFragment and override onCreateView(). Chain to the superclass to get the CameraFragment's own UI, then wrap that in your own container with additional widgets, and return the combined UI from your onCreateView()."

Has anyone used this and can provide an example? Thanks!

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
IZI_Shadow_IZI
  • 1,921
  • 4
  • 30
  • 59

1 Answers1

4

They mean something like this:

public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  View camera = super.onCreateView(inflater, container, savedInstanceState);

  // wrap camera in some other container that you inflate or instantiate

  return yourView;
}
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
Rene M.
  • 2,660
  • 15
  • 24