I have this little function here:
public Activity getRootActivity()
{
Activity a = this;
while (a.getParent() != null)
a = a.getParent();
return a;
}
But a.getParent() always returns null. It doesn't seem to matter how deep into my UI I go, it will always return null.
Anybody have any idea as to why?
EDIT
Here is how I am starting Activities (within other activities)
startActivity(new Intent(this, activityname.class));
Apparently that means I'm not 'embedding' them? How does one 'embed' them?