Android Question background Activity transparent

powerino

Active Member
Licensed User
hello, I created 2 buttons with the designer and when I launch the application on the phone I see the breakthrough and above the buttons, but I would like to see only the buttons below the phone screen. What should I do? thank you
 

DonManfred

Expert
Licensed User
Longtime User
You need to much better describe the problem.
I for myself did not understand what you are asking.
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
If you need "background Activity transparent", add to manifest
B4X:
SetActivityAttribute (main, android:theme, "@style/Theme_Main")
CreateResource (values, theme_main.xml,
<resources>
  <style name="Theme_Main" parent="android:Theme">
    <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:windowIsFloating">true</item>
    <item name="android:backgroundDimEnabled">false</item>
  </style>
</resources>
)

Guess, it's possible to reduce, I simply copied from one my app.
 
Upvote 0

powerino

Active Member
Licensed User
this is ok, thanks!


SetActivityAttribute (main, android:theme, "@style/Theme_Main")
CreateResource (values, theme_main.xml,
<resources>
<style name="Theme_Main" parent="android:Theme">
<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:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
</resources>
)
 
Upvote 0
Top