Android Open Source - filelistview File List Adapter






From Project

Back to project page filelistview.

License

The source code is released under:

MIT License

If you think the Android project filelistview listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.jcw.andriod.fileListView;/*
 * Author - Woodruff/*w w  w.j av a2  s . c o m*/
 * 
 */

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import java.io.File;

public class FileListAdapter extends BaseAdapter {
    Context context;
    File[] files;

    public FileListAdapter(Context context, File[] files) {
        this.files = files;
        this.context = context;
    }

    @Override
    public int getCount() {
        return files.length;
    }

    @Override
    public Object getItem(int location) {
        return files[location];
    }

    @Override
    public long getItemId(int i) {
        return 0;
    }

    @Override
    public View getView(int index, View view, ViewGroup parent) {
        LayoutInflater inflater = LayoutInflater.from(context);
        FileListItemView rowView = new FileListItemView(context);

        rowView.setFile(files[index]);
        return rowView;
    }
}




Java Source Code List

com.jcw.andriod.fileListView.FileListAdapter.java
com.jcw.andriod.fileListView.FileListItemView.java
com.jcw.andriod.fileListView.FileListView.java
com.jcw.andriod.fileListView.FileOpenView.java
com.jcw.andriod.fileListView.FileSaveView.java
com.jcw.andriod.fileListView.FileUtils.java
com.jcw.andriod.fileListView.ListUtils.java
com.jcw.andriod.fileListView.MainActivity.java
com.jcw.andriod.fileListView.PictureGenerator.java
com.jcw.andriod.fileListView.dialogs.FileSelectDialog.java