Android Question Unload second Activity into Widget!

CyclopDroid

Well-Known Member
Licensed User
Longtime User
Hi. I've a problem.
My App have two Activity (Main, Menu) and one Service (srv).
Into srv i've insert ad image widget and, with a Click, it call the Activity Menu.
The Global variable is into Main Activity.
When I close then Activity Menu (with Back key), I write:

......
StartService(srv)
Activity.Finish


...but the activity Menu, not Close (it's present into app bar).
If I dragging it with the finger it...It closes the entire application but remains only the widget does not work. (In debug mode I see that will be closed.).
How to close the second Activity, and not all the app directly from code?
Thanks.
(PS: Sorry for my bad English)

The Widget




The Menu Activity (called when I click into Widget)




The Activity Menu (When I press Back or Home, into running App Bar).
I would like this to disappear and that remain active only the Main and srv

 

Attachments

  • widget.png
    widget.png
    141.4 KB · Views: 203
  • MenuImg.png
    MenuImg.png
    142 KB · Views: 201
  • menubar.png
    menubar.png
    90.5 KB · Views: 195

CyclopDroid

Well-Known Member
Licensed User
Longtime User
Thanks you Erel ;)
It's perfect. I've change the Main with the Menu, for hide the windows.
Thanks you again. :)
 
Upvote 0
Top