SetActivityAttribute(main, android:theme, @android:style/Theme.Translucent.NoTitleBar)
Activity.Color = Colors.Transparent
Hi could you post your code for the solution?Found the answers to the above -
The half screen was the camera panel (which is not transparent).
To inhibit the transparency of the main activity I add a panel under all views so it is shown normally.
Edit:
The camera will not take a picture if the panel used by the camera is not visible ( either visible = false or out of the active screen area) but it works if the panel is partially visible, even if partially is one pixel !!!
So I put the panel in left = Activity.Width - 1, top = Activity.Height - 1 . This way the activity is transparent, the panel hides only one pixel.
could you post your code for the solution?
Sub Activity_Create(FirstTime As Boolean)
Activity.Color = Colors.Transparent
photopanel.Initialize("")
Activity.AddView(photopanel,Activity.Width - 1dip,Activity.Height - 1dip,480,480)'ignore
End Sub
B4X:Sub Activity_Create(FirstTime As Boolean) Activity.Color = Colors.Transparent photopanel.Initialize("") Activity.AddView(photopanel,Activity.Width - 1dip,Activity.Height - 1dip,480,480)'ignore End Sub
I have not mentioned that my application uses a service to take the picture. Actually it is impossible, like Erel said in this link :Sorry but could you post an example b4a project that takes a picture from service as you described?
Yes, my app is a security app. I need it for the same reason you do!I have not mentioned that my application uses a service to take the picture. Actually it is impossible, see this link :
http://www.b4x.com/android/forum/threads/take-a-picture-from-a-service.39075/
The solution describes the way to use an activity but not show the picture while taking it. My application takes picture in the front camera and sends it to my email (with position from GPS and address) every few seconds - for the case the phone is lost or stolen...
SetActivityAttribute(Main, android:theme, @style/CustomActTheme)
CreateResource(values, theme.xml,
<resources>
<style name="CustomActTheme" parent="@android:style/Theme.Holo">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources>
)
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?