这个显示黑色边框的9-png有什么问题? [英] What's the issue with this 9-png , showing black borders?

查看:80
本文介绍了这个显示黑色边框的9-png有什么问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力运行这九个补丁映像,方法是在所有情况下都向其添加补丁,但这是行不通的,我不知道为什么吗?任何建议都将受到高度赞赏.

I have been struggling for a week to run this nine patch image by adding patches to it with all case but it doesn't work , I can't figure out why ? Any suggestions are highly appreciated.

使用时它不应显示黑线.

It shouldn't show black lines when I am using it.

这是我使用此图片的布局代码,

This is the layout code where I use this image ,

                    <Button
                    android:id="@+id/answerA"
                    android:layout_width="fill_parent"
                    android:layout_height="match_parent"
                    android:layout_marginRight="2dp"
                    android:layout_weight="1"
                    android:background="@drawable/d_grey"
                    android:gravity="center"
                    android:onClick="AnswerCheck" />

-编辑-

正如一个答案中所建议的那样,我在ninepatch工具中打开了该图片,下面是该图片的屏幕截图,

As suggested in an answer I opened this image in ninepatch tool and below is the screenshot for the same,

推荐答案

可能的解决方案:-

  • 您是否已正确创建9补丁图像. 查看此网站 并创建9patch图像.
  • 请勿从sample.9.png之类的图片中删除.9扩展名
  • 创建9个补丁图像后,请勿调整图像大小.
  • 刷新-清理构建项目以应用您在资源中所做的更改 文件夹
  • Have you created 9-patch images properly. check out this site and create 9patch image.
  • donot remove .9 extension from image like sample.9.png
  • Donot resize image after creating 9 patch image.
  • Refresh-Clean-build project to apply changes you made in resource folders

希望这对您有帮助...

Hope this helps...

这篇关于这个显示黑色边框的9-png有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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