播放示例-如何使用Android res文件夹作为资源目录? [英] Playn Sample - How can I use Android res Folder as resources directory?

查看:135
本文介绍了播放示例-如何使用Android res文件夹作为资源目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单的故事::我试图使playn-showcase-android适合任何屏幕尺寸.并遇到了很多问题,例如我们不能使用9色块图像,并且如果我们进行缩放,则图像会模糊,当上面有文字时,scale9图像不能很好地拉伸..

Story in short: I was trying to make playn-showcase-android fit to any screen size. And came across many problems like we cant use 9-patch images, and if we go for scaling, it blur, scale9 images doesn't stretch well when there is text on it..

最后,我决定将我的Showcase-android res/文件夹设置为默认资源文件夹,至少对于Android版本而言.我曾尝试编辑playn源,但意识到它采用了来自类加载器的资源路径.

Finally I decided to make my showcase-android res/ folder to be default resource folder, at least for the Android version. I have tried to edit playn source, but realized that it takes the resources path from class loader.

对此有什么想法吗?如何在至少Android版本中使用res/drawable图像?就像以android特定的方式..这样我可以使UI更好.

Is there any thoughts about this? How can I use res/drawable Images for atleast Android version? like in the android specific way.. so that I can make the UI better.

推荐答案

blurPlayN中,您可以按以下方式禁用:

blur in PlayN you can disable as follows:

graphics().ctx()
.setTextureFilter(GLContext.Filter.NEAREST, GLContext.Filter.NEAREST);

这篇关于播放示例-如何使用Android res文件夹作为资源目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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