Code example for Stack

Methods: add

0
	/** 
	 * 将当前Activity推入栈中  
	 */ 
	public void pushActivity(Activity activity) {
		if (activity != null) {
			activityStack.add(activity);
		} 
	} 
	 
	/** 
	 * 获取当前栈顶的Activity并移除它 
	 */ 
	public Activity popActivity() {
		if (!activityStack.isEmpty()) {
			return activityStack.pop();
		} 
		return null; 
	} 
 
	/** 
	 *	获取当前栈顶Activity