Exemplo n.º 1
0
	public static AN_PropertyTemplate GetLauncherPropertyTemplate() {
		AN_PropertyTemplate launcher = new AN_PropertyTemplate ("intent-filter");

		AN_PropertyTemplate prop = new AN_PropertyTemplate ("action");
		prop.SetValue ("android:name", "android.intent.action.MAIN");
		launcher.AddProperty ("action", prop);

		prop = new AN_PropertyTemplate ("category");
		prop.SetValue ("android:name", "android.intent.category.LAUNCHER");
		launcher.AddProperty ("category", prop);

		return launcher;
	}
    public static AN_PropertyTemplate GetLauncherPropertyTemplate()
    {
        AN_PropertyTemplate launcher = new AN_PropertyTemplate("intent-filter");

        AN_PropertyTemplate prop = new AN_PropertyTemplate("action");

        prop.SetValue("android:name", "android.intent.action.MAIN");
        launcher.AddProperty("action", prop);

        prop = new AN_PropertyTemplate("category");
        prop.SetValue("android:name", "android.intent.category.LAUNCHER");
        launcher.AddProperty("category", prop);

        return(launcher);
    }
Exemplo n.º 3
0
	public AN_PropertyTemplate GetOrCreateIntentFilterWithName(string name) {
		AN_PropertyTemplate filter = GetIntentFilterWithName(name);
		if(filter == null) {
			filter =  new AN_PropertyTemplate("intent-filter");
			AN_PropertyTemplate action = new AN_PropertyTemplate("action");
			action.SetValue("android:name", name);
			filter.AddProperty(action);
			AddProperty(filter);
		}

		return filter;
	}
Exemplo n.º 4
0
    public AN_PropertyTemplate GetOrCreateIntentFilterWithName(string name)
    {
        AN_PropertyTemplate filter = GetIntentFilterWithName(name);

        if (filter == null)
        {
            filter = new AN_PropertyTemplate("intent-filter");
            AN_PropertyTemplate action = new AN_PropertyTemplate("action");
            action.SetValue("android:name", name);
            filter.AddProperty(action);
            AddProperty(filter);
        }

        return(filter);
    }
Exemplo n.º 5
0
    private static AN_PropertyTemplate ParseProperty(XmlNode node)
    {
        AN_PropertyTemplate property = new AN_PropertyTemplate(node.Name);

        //Get Values
        foreach (XmlAttribute attr in node.Attributes)
        {
            property.SetValue(attr.Name, attr.Value);
        }
        //Get Properties
        foreach (XmlNode n in node.ChildNodes)
        {
            property.AddProperty(n.Name, ParseProperty(n));
        }

        return(property);
    }
Exemplo n.º 6
0
	private static AN_PropertyTemplate ParseProperty(XmlNode node) {
		AN_PropertyTemplate property = new AN_PropertyTemplate (node.Name);
		//Get Values
		foreach (XmlAttribute attr in node.Attributes) {
			property.SetValue(attr.Name, attr.Value);
		}
		//Get Properties
		foreach (XmlNode n in node.ChildNodes) {
			if (!n.Name.Equals("#comment")) {
				property.AddProperty(n.Name, ParseProperty(n));
			}
		}

		return property;
	}