ImageView/ImageButton overlay on camera preview not dislayed : A very standard overlay [tutorial][1] in this link was followed for developing the camera preview with overlay. However, when I change the `<Button/>` to `<ImageView/>` or `<ImageButton/>` the image doesn't get displayed. All I am getting is camera preview while using `<ImageView/>` and on using `<ImageButton/>` the images are not shown however little white lines at places where there should be images are displayed. The images are present in `mipmap-xxhdpi`. These buttons will be used to start another activity or take picture on click by user.

I've looked into many questions on StackOverFlow but solutions don't work for me. Answer [here][2] doesn't work for me.

**Other Relevant Details**

The minSdkVersion is 16 and compileSdkVersion is 25. When I run the app in emulator on API-21 or above all I am getting is a black screen.

***Q1:*** How to overlay `<ImageView/>` or `<ImageButton/>` on camera preview?

***Q2:*** Would getting black screen have something to do with Camera API (old) being deprecated and I have to build separate classes to take into account different API?

Like the code below
	
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
        //do something
    } else {
        //do something else
    }

[2]: https://stackoverflow.com/questions/13527943/overlay-a-static-drawable-image-over-camera-preview


  [1]: http://www.edumobile.org/android/overlay-on-camera-preview/