package com.github.mobile.android.gist;

import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import com.github.mobile.android.R;

import org.eclipse.egit.github.core.GistFile;

/**
 * Adapter for viewing the files in a Gist
 */
public class GistFileListAdapter extends ArrayAdapter<GistFile> {

    private final Activity activity;

    /**
     * Create adapter for files
     *
     * @param activity
     * @param files
     */
    public GistFileListAdapter(Activity activity, GistFile[] files) {
        super(activity, R.layout.gist_view_file_item, files);
        this.activity = activity;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        final GistFile file = getItem(position);
        final TextView view = (TextView) activity.getLayoutInflater().inflate(R.layout.gist_view_file_item, null);
        view.setText(file.getFilename());
        return view;
    }
}

@@ -223,16 +223,23 @@
 ndroid.R
+.layout
 ;%0A%0Aimpor
@@ -628,18 +628,16 @@
 tivity, 
-R.
 layout.g
@@ -799,57 +799,8 @@
 ) %7B%0A
-        final GistFile file = getItem(position);%0A
     
@@ -873,18 +873,16 @@
 inflate(
-R.
 layout.g
@@ -929,20 +929,42 @@
 setText(
-file
+%22%C2%BB   %22 + getItem(position)
 .getFile

Indent Gist file name with '»' character