English 中文(简体)
Xml 选择类型问题
原标题:Xml selector type question

整个Xml型的Hi I m新 st。 我为D1和Im建造了一张名为“原始来源”的光盘,该光盘旨在书写一种Xml,我想从框架-res中价值夹的可调xml中看到。

我想将其用于背景,我的想法是,挑选人,把形象描绘成一个背景,但如果图像没有黑色(#)。 图像被保存在框架-领域(P.apk)中,被点名为背景:dark.jpg

比如,这种说法有些(在这样的情况下,任何错误只是我的基本想法)

<?xml version="1.0" encoding="UTF-8"?>
<selector
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item "@drawable/background_dark.jpg"="true" 
android:screen_background_dark="@drawable/background_dark.jpg" />
    <item "@drawable/background_dark.jpg"="false" 
android:screen_background_dark="#ffffffff" />
</selector>

That however didn t work so what changes need to be made? Thank you for any help or alternatives it is much appreciated

最佳回答

您的XML并不有效,这是挑选人所要做的,Anderson族资源系统没有这样做。

XML属性被宣布为namespace:attributeName=“数值”。 你们不能用扼杀手指名。

选择者选择根据预先界定的州,如报界、有重点、有窗口、有功能等,选择可选取。 这些建议的用意是,从建筑时间已知的一套可提取物中选择。 你试图利用这些资源来检测是否存在资源,而这种资源系统在资源系统内并不具有意义。

可利用的资源 身份证的产生来自档案系统中作为图像档案或XML的资源。 如果存在XML资源参考资料@drawable/background_dark”,并且没有这种编号,那么便会无法完全建立你的资源。 这与你在宣布之前试图在 Java读一个变量一样。 现有档案是申报步骤。

问题回答

暂无回答




相关问题
how to represent it in dtd?

I have two element action and guid. guid is a required field when action is add. but when action is del it will not appear in file. How to represent this in dtd ?

.Net application configuration add xml-data

I need to add xml-content to my application configuration file. Is there a way to add it directly to the appSettings section or do I need to implement a configSection? Is it possible to add the xml ...

XStream serializing collections

I have a class structure that I would like to serialize with Xstream. The root class contains a collection of other objects (of varying types). I would like to only serialize part of the objects that ...

MS Word splits words in its XML format

I have a Word 2003 document saved as a XML in WordProcessingML format. It contains few placeholders which will be dynamically replaced by an appropriate content. But, the problem is that Word ...

Merging an XML file with a list of changes

I have two XML files that are generated by another application I have no control over. The first is a settings file, and the second is a list of changes that should be applied to the first. Main ...

How do I check if a node has no siblings?

I have a org.w3c.dom.Node object. I would like to see if it has any other siblings. Here s what I have tried: Node sibling = node.getNextSibling(); if(sibling == null) return true; else ...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

热门标签