Code example for Stack

Methods: push

0
	/** 
	 * Creates a new activity stack and pushes the start activity  
	 */ 
 
	private void createStackAndPushStartActivity(){ 
		activityStack = new Stack<WeakReference<Activity>>();
		if (activity != null){
			WeakReference<Activity> weakReference = new WeakReference<Activity>(activity);
			activity = null;
			activityStack.push(weakReference);
		} 
	} 
 
	/** 
	 * Returns a {@code List} of all the opened/active activities. 
	 *  
	 * @return a {@code List} of all the opened/active activities 
	 */ 
 
	public ArrayList<Activity> getAllOpenedActivities()
	{