小编use*_*040的帖子

Android按钮背景颜色

我试图在我的应用程序中设置按钮的背景颜色,我无法达到我想要的结果...

我试图设置的颜色是holo_green_light(#ff99cc00).为了做到这一点,我正在使用setColorFilter(0xff99cc00, PorterDuff.Mode.MULTIPLY);

我得到的颜色不仅仅是holo_green_lightlightgrey和holo_green_light.

我尝试过使用LightingColorFilter没有太大的成功.

有没有办法以编程方式进行,以便按钮看起来像一个按钮,而不是一个我需要的颜色的扁平矩形.

android button android-button

49
推荐指数
9
解决办法
16万
查看次数

Android - 具有不同背景颜色的TextView

是否可以使用具有不同背景颜色的TextView.例如.如果文本是"这是一个测试",是否可以为这四个单词设置不同的背景颜色?

android textview

3
推荐指数
1
解决办法
1792
查看次数

Apache FOP XSL/XSLT - 在生成的 PDF 中将文本设为粗体

我有一个像这样的xml:

<?xml version="1.0" encoding="UTF-8"?>
<TermsAndConditions>
        <clause><clausetext>Terms and Conditions of Supply - Please read carefully</clausetext></clause>
        <clause><clausetext>Available only to <bold>customers who have an existing</bold> account.</clausetext></clause>
</TermsAndConditions>
Run Code Online (Sandbox Code Playgroud)

样式表是:

<fo:page-sequence master-reference="simple" >
        <fo:flow flow-name="xsl-region-body">       
        <xsl:for-each select="data/TermsAndConditions/clause">
                <fo:block font-size="10pt" font-family="Arial" color="#6d6e71"><xsl:value-of select="clausetext" />
</fo:block>
                <fo:block font-size="10pt" font-family="Arial" line-height="10pt" space-after.optimum="3pt" text-align="justify">&#0160;</fo:block>
        </xsl:for-each>
    </fo:flow>
</fo:page-sequence>
Run Code Online (Sandbox Code Playgroud)

如何在生成的 pdf 中将标签 <bold></bold> 之间的文本设置为粗体?目前我可以看到条款,但文字一切正常。

除此之外,我使用 w3schools.com 的 tryit 编辑器尝试了类似的操作:[ http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=tryxsl_if ]

具有以下样式表:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
  <html>
  <body>
     <xsl:apply-templates mode="tttt" />
  </body>
  </html>
</xsl:template>

  <xsl:template match="bold" mode="tttt"> …
Run Code Online (Sandbox Code Playgroud)

xml apache xslt apache-fop

1
推荐指数
1
解决办法
3311
查看次数

标签 统计

android ×2

android-button ×1

apache ×1

apache-fop ×1

button ×1

textview ×1

xml ×1

xslt ×1