package com.sims.topaz.utils;

import java.util.ArrayList;
import java.util.List;

import com.sims.topaz.R;

public class TagUtils {
	
	public static final String TAG_SUN="tag_sun";
	public static final String TAG_RESTAURANT="tag_restaurant";
	public static final String TAG_PARTY="tag_party";
	public static final String TAG_PIZZA="tag_pizza";
	public static final String TAG_SHOPPING="tag_shopping";
	public static final String TAG_SCHOOL="tag_school";
	public static final String TAG_TOILETS="tag_toilet";
	public static final String TAG_HOSPITAL="tag_hospital";
	public static final String TAG="tag";
	
	
	public static List<String> getAllTags(){
		List<String> tagList = new ArrayList<String>();
		tagList.add(TagUtils.TAG_RESTAURANT);
		tagList.add(TagUtils.TAG_PARTY);
		tagList.add(TagUtils.TAG_PIZZA);
		tagList.add(TagUtils.TAG_SHOPPING);
		tagList.add(TagUtils.TAG_SCHOOL);
		tagList.add(TagUtils.TAG_TOILETS);
		tagList.add(TagUtils.TAG_HOSPITAL);
		tagList.add(TagUtils.TAG_SUN);
		return tagList;
	}
	
	public static int getDrawableForString(String text){
		String finalTag=TagUtils.TAG;
		for(String tag:getAllTags()){
			if(text.contains(tag) || tag.contains(text)){
				finalTag = tag;
				break;
			}
		}
		return getDrawableForTag(finalTag);
	}
	
    public static int getDrawableForTag(String tag){
    	if(tag.equals(TagUtils.TAG_PARTY))
    		return R.drawable.tag_party;
    	if(tag.equals(TagUtils.TAG_HOSPITAL))
    		return R.drawable.tag_hospital;
    	if(tag.equals(TagUtils.TAG_PIZZA))
    		return R.drawable.tag_pizza;
    	if(tag.equals(TagUtils.TAG_RESTAURANT))
    		return R.drawable.tag_restaurant;
    	if(tag.equals(TagUtils.TAG_SCHOOL))
    		return R.drawable.tag_school;
    	if(tag.equals(TagUtils.TAG_SHOPPING))
    		return R.drawable.tag_shopping;
    	if(tag.equals(TagUtils.TAG_TOILETS))
    		return R.drawable.tag_toilet;
    	if(tag.equals(TagUtils.TAG_SUN))
    		return R.drawable.tag_sun;
    	return R.drawable.tag;
    }
}

@@ -1095,16 +1095,95 @@
 ls.TAG;%0A
+%09%09if(text==null %7C%7C text.isEmpty()) %0A%09%09%09return getDrawableForTag(TagUtils.TAG);%0A
 %09%09for(St

Fix draw Burger