展现在res文件夹中的所有XML文件名列表为Android应用程序 [英] Show a list of all XML filenames in the res folder for an Android application

查看:182
本文介绍了展现在res文件夹中的所有XML文件名列表为Android应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是试图让我的RES / XML文件夹中所有的XML文件的列表。我曾尝试使用资产管理.LIST()函数,但是这似乎并没有返回任何东西。我曾尝试其他的方法,但没有一个似乎工作。他们要么失败,或者返回任何结果。

I'm simply trying to get a list of all the XML files in my res/xml folder. I have tried to use the asset manager .list() function, but that doesn't seem to return anything. I have tried other methods, but none seem to work. They either fail, or return nothing.

这简直是让我可以告诉它包含每个文件的名称一个ListView。

This is simply so I can show a ListView which contains the name of each file.

有没有人有什么必要做任何想法?

Does anyone have any ideas of what is necessary to do this?

推荐答案

将它们移动到资产/ XML ,那么你可以用 assetManager一一列举.LIST(XML)

Move them to assets/xml, then you can list them with assetManager.list("xml")

这篇关于展现在res文件夹中的所有XML文件名列表为Android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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