我正在为我的应用程序创建一个更新,在其中我有一个包含已保存图像的文件夹,我想在GridView中显示.我已经在使用Ion库了.图书馆的创建者(Koush Dutta)已经有一个样本做我想做的事情,并在GridView中显示SD卡的所有图像..
我想要做的是只显示GridView中SD卡(称为漫画)上特定文件夹的图像.我直接使用上面示例中的代码,只修改了一些名称.
我的问题是我不能只将SD卡中的图像放入GridView,目前它从SD卡中获取所有图像.我只想从文件夹/ sdcard/Comics /
码
public class SavedComics extends Activity {
private MyAdapter mAdapter;
// Adapter to populate and imageview from an url contained in the array adapter
private class MyAdapter extends ArrayAdapter<String> {
public MyAdapter(Context context) {
super(context, 0);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// see if we need to load more to get 40, otherwise populate the adapter
if (position > …Run Code Online (Sandbox Code Playgroud)