Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Android and the fly likes How do I set the activity of the Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "How do I set the activity of the "Up-button" programatically?" Watch "How do I set the activity of the "Up-button" programatically?" New topic
Author

How do I set the activity of the "Up-button" programatically?

Jonathan Wallace
Greenhorn

Joined: Aug 18, 2010
Posts: 18
Edit: Eh nevermind, seems the only problem was I was trying to use the *support* version: getSupportParentActivityIntent. Remove "support" and it works fine.


I need to be able to control dynamically to which activity the user goes "back", when they press the "Up" button.

It can be set statically in the manifest as follows:

It appears it is can be set programatically following the description here, but I can't seem to figure out how it works. Help anyone?
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42954
    
  73
Edit: Eh nevermind, seems the only problem was I was trying to use the *support* version: getSupportParentActivityIntent. Remove "support" and it works fine.

I need to be able to control dynamically to which activity the user goes "back", when they press the "Up" button.

It can be set statically in the manifest as follows:

It appears it is can be set programatically following the description here, but I can't seem to figure out how it works. Help anyone?

You could implement something even more dynamic by handling the back button directly:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I set the activity of the "Up-button" programatically?