Android Question Activity with no window

MrKim

Well-Known Member
Licensed User
Longtime User
I set a notification which requires SetInfo which requires an activity and all is well.

When the user selects my notification the activity code is run, it works fine.

The problem is the entire screen briefly flashes black when the code is run because it is an activity. Is there some way to prevent that?
I have

B4X:
#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: False
#End Region
set.

I do have code that needs to run, and possibly a Toastmessage, but I don't want a full screen.

Thanks for any help
 
Last edited:

barx

Well-Known Member
Licensed User
Longtime User
maybe look at making the activity transparent ;)
 
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
I also tried #FullScreen: True
thinking it was the title that did it but no luck there either.
 
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
I just created a layout in designer and set the alpha to 0 on the actvity. Then loadlayout in
Activity_Create.
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
Setting the activity attributes in the manifest xml instead of in code might be flicker free.
I think the xml is parsed before any code in your activity is executed.
 
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
Setting the activity attributes in the manifest xml instead of in code might be flicker free.
I think the xml is parsed before any code in your activity is executed.
You have the syntax for that? I have no clue.
 
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
Erel, sorry, I missed that link. The manifest entry:

B4X:
SetActivityAttribute(main, android:theme, @android:style/Theme.Translucent.NoTitleBar)

was all that was necessary. Just changed 'main' to the name of my Activity.

No need for a layout. Put my toastmessage in Activity_Resume

Thanks once again for your help!
 
Upvote 0
Top