ZXing生成的一维条码可以显示数字吗?

发布于 2025-01-03 12:55:42 字数 163 浏览 2 评论 0原文

我目前在 Android 应用程序中使用 ZXing 来生成一维条形码(EAN_13 和 CODE_39)。 结果看起来不错,但我想在条形码下方显示数字,如下所示: 在此处输入图像描述

是否可行?

I'm currently using ZXing in my Android app to generate a one-dimension barcode (EAN_13 and CODE_39).
The result is looking good but I'd like to display numbers below the barcode, like that:
enter image description here

Is it doable?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

栖竹 2025-01-10 12:55:42

您只需添加一个在 xzing 条形码下方对齐的 TextView,然后将数字放入其中即可。

如果您确实关心特定的外观(数字在条形码内部稍微对齐) - 您可以为 TextView 设置白色背景,并使用负对齐将其稍微向上移动到条形码中。

不知道xzing是否支持你想要的答案。祝你好运。

You could simply just add a TextView aligned below|center of the xzing barcode, and put the numbers in there.

If you really care about the specific look (with the numbers aligned slightly inside the barcode) - you could set a white background to the TextView, and use a negative alignment to move it up slightly into the barcode.

Don't know answer if xzing supports what you want. Good Luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文