将文本添加到android drawable xml [英] Add text to android drawable xml

查看:151
本文介绍了将文本添加到android drawable xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用android drawable xml.

I am trying to use an android drawable xml.

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
    <item android:drawable="@color/colorPrimary"/>
    <item>
        <bitmap
            android:src="@drawable/ic_logo_black"
            android:gravity="center"/>
    </item>
    <Text is it possible to insert some text here???/>
</layer-list>

出于品牌目的,我想在此xml中插入一些文本.(是否翻译文本对我来说都没有关系.我只想要它,以便每当我使用此可绘制xml时,在我指定的区域中插入一些文本)

For branding purposes, I would like to insert some text into this xml. (It doesn't even matter to me if the text is translated. I just want it so that whenever I am using this drawable xml, there are some text inserted in an area i specify)

这甚至有可能吗?我是否可以实际将文本/字符放在drawable.xml中?是我修改图像并以这种方式添加文本的唯一方法吗?

Is this even possible? Can I actually put texts/characters in an drawable.xml? Is the only way for me to modify the image and add in text that way?

谢谢

推荐答案

不幸的是,您不能这样做,有关更多信息

Unfortunately, you can't do that, For more Refer here.

这篇关于将文本添加到android drawable xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆