package org.commcare.android.adapters;

/**
 * 
 * The ArrayAdapter used by AppManagerActivity to display all installed CommCare apps
 * on the manager screen.
 * 
 * 
 * @author amstone326
 */

import org.commcare.android.database.global.models.ApplicationRecord;
import org.commcare.dalvik.R;
import org.commcare.dalvik.activities.AppManagerActivity;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class AppManagerAdapter extends ArrayAdapter<ApplicationRecord> {

    private final AppManagerActivity context;

    public AppManagerAdapter(Context context, int resource, ApplicationRecord[] objects) {
        super(context, resource, objects);
        this.context = (AppManagerActivity) context;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View v = convertView;
        if (v == null) {
            v = View.inflate(context, R.layout.app_title_view, null);
        }
        ApplicationRecord toDisplay = this.getItem(position);
        TextView appName = (TextView) v.findViewById(R.id.app_name);
        appName.setText(toDisplay.getDisplayName());
        v.setContentDescription(toDisplay.getUniqueId());
        return v;
    }

}

@@ -37,163 +37,8 @@
 s;%0A%0A
-/**%0A * %0A * The ArrayAdapter used by AppManagerActivity to display all installed CommCare apps%0A * on the manager screen.%0A * %0A * %0A * @author amstone326%0A */%0A%0A
 impo
@@ -350,16 +350,161 @@
 tView;%0A%0A
+/**%0A * The ArrayAdapter used by AppManagerActivity to display all installed%0A * CommCare apps on the manager screen.%0A *%0A * @author amstone326%0A */%0A
 public c
@@ -675,16 +675,45 @@
 esource,
+%0A                            
  Applica
@@ -822,17 +822,16 @@
 ctivity)
- 
 context;
@@ -1162,17 +1162,16 @@
 extView)
- 
 v.findVi
@@ -1328,11 +1328,10 @@
 ;%0A    %7D%0A
-%0A
 %7D%0A

Comment ordering in file