Android Question Unload second Activity into Widget!


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:


...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?
(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



  • widget.png
    141.4 KB · Views: 168
  • MenuImg.png
    142 KB · Views: 166
  • menubar.png
    90.5 KB · Views: 160


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