android - Fully opaque ImageButtons layered over a CameraPreview -


i have framelayout containing camerapreview , relativelayout. relativelayout contains imagebuttons. thus:

<framelayout>   <camerapreview/>   <relativelayout>     <imagebutton/>     <imagebutton/>   </relativelayout> </framelayout> 

i'm using camerapreview live-preview image coming camera. works correctly. imagebuttons 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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -