Android Question Set wallpaper as activity background

apty

Active Member
Licensed User
Longtime User
I am trying to set wallpaper as my activity background but the bottom navigation bar still shows up with some color. I would like the bottom navigation bar to also have the wallpaper as a background (the way launcher apps appear). I would like an effect like the one on the screen below:

hjiLN.png


I have checked how to set navigation bar color on the link https://www.b4x.com/android/forum/threads/theme-colors.87716/#content but i don't want to use a color, instead i want to use a wallpaper as background.

How do i achieve this in B4A?
 

MarkusR

Well-Known Member
Licensed User
Longtime User
is it possible to set the background navigation bar to transparent color (alpha value)?
 
Upvote 0

apty

Active Member
Licensed User
Longtime User
setting it to transparent shows a black navigation bar. It does not pick the wallpaper as background
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Full screen activity:

SS-2018-11-18_09.25.24.png


B4X:
#Region  Activity Attributes
   #FullScreen: true
   #IncludeTitle: false
#End Region

Sub Process_Globals

End Sub

Sub Globals
End Sub

Sub Activity_Create(FirstTime As Boolean)
   Dim context As JavaObject
   context.InitializeContext
   Dim window As JavaObject = context.RunMethod("getWindow", Null)
   window.RunMethod("addFlags", Array(0x80000000)) 'FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
   window.RunMethod("addFlags", Array(0x00000200)) 'FLAG_LAYOUT_NO_LIMITS
   Activity.Height = GetDeviceLayoutValues.Height + 48dip
   Activity.LoadLayout("1")
End Sub

If you want to add the action bar then you should use AppCompat (I haven't tried it with AppCompat).
 
Upvote 0
Top