java如何在包含资产文件夹安卓 studio的listview中获取文本文件
如何在Android Studio中将资产文件夹文件名显示到回收器视图中
“我的资产”文件夹中的文件是Apple。香蕉。json,猫。xml,狗。xml,大象。爪哇,福克斯。json,明白了。格拉德尔等 我只想要一个名字和它的类型在列表中像苹果。文本
你可以在下面搜索框中键入要查询的问题!
如何在Android Studio中将资产文件夹文件名显示到回收器视图中
“我的资产”文件夹中的文件是Apple。香蕉。json,猫。xml,狗。xml,大象。爪哇,福克斯。json,明白了。格拉德尔等 我只想要一个名字和它的类型在列表中像苹果。文本
# 1 楼答案
# 2 楼答案
您可以通过调用
AssetManager
提供的API来访问应用程序的原始资产文件获取包含根文件夹中所有资产的字符串数组后,可以将该数组传递给
RecyclerView.Adapter
,并将其绑定到onBindViewHolder
中的RecyclerView.ViewHolder