android - Fully opaque ImageButtons layered over a CameraPreview -
i have framelayout
containing camerapreview
, relativelayout
. relativelayout
contains imagebutton
s. thus:
<framelayout> <camerapreview/> <relativelayout> <imagebutton/> <imagebutton/> </relativelayout> </framelayout>
i'm using camerapreview
live-preview image coming camera. works correctly. imagebutton
s display drawable bitmaps, , appear on camera preview.
the problem buttons semi-transparent: camera image visible in background. want them fully-opaque make them more visible. how do this?
i've tried calling setalpha() on buttons doesn't appear have effect.
can suggest how can make buttons opaque?
the problem turned-out image buttons had no background drawable resource , weren't inheriting 1 of views in parent hierarchy.
adding android:background="@android:drawable/btn_default"
imagebutton
's xml definition solved problem.
Comments
Post a Comment