Code example for Stack

Methods: clear

0
	/** 
	 * Clears the activity stack 
	 */ 
 
	private void clearActivityStack(){ 
		activityStack.clear();
		activitiesStoredInActivityStack.clear();
	} 
 
	/** 
	 * Finishes an activity 
	 *  
	 * @param activity the activity to finish 
	 */ 
 
	private void finishActivity(Activity activity){
		if(activity != null) {
			try{ 
				activity.finish();
			}catch(Throwable e){
				e.printStackTrace();