// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final String FILETYPE_KML         = ".kml";
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final String FILETYPE_GPX         = ".gpx";


import static eu.basicairdata.graziano.gpslogger.GPSApplication.FILETYPE_KML;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.FILETYPE_GPX;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.ArrayList;
    public Object getItem(int position) {
        return listData.get(position);
    }

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

    /**
     * Returns the View of the given position.
     *
     * @param position the position of the view
     * @param convertView the view
     * @param parent the parent ViewGroup
     */
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder;
        if (convertView == null) {
            convertView = layoutInflater.inflate(R.layout.appdialog_list_row, null);
            holder = new ViewHolder();
            holder.icon = convertView.findViewById(R.id.id_appdialog_row_imageView_icon);
            holder.description = convertView.findViewById(R.id.id_appdialog_row_textView_description);
            holder.format = convertView.findViewById(R.id.id_appdialog_row_textView_format);
            convertView.setTag(holder);
        } else {
            holder = (ViewHolder) convertView.getTag();
        }
        holder.icon.setImageDrawable(listData.get(position).icon);
        holder.description.setText(listData.get(position).label);
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final String FILETYPE_KML         = ".kml";
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final String FILETYPE_GPX         = ".gpx";


// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/ExternalViewerAdapter.java
import static eu.basicairdata.graziano.gpslogger.GPSApplication.FILETYPE_KML;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.FILETYPE_GPX;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.ArrayList;

    public Object getItem(int position) {
        return listData.get(position);
    }

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

    /**
     * Returns the View of the given position.
     *
     * @param position the position of the view
     * @param convertView the view
     * @param parent the parent ViewGroup
     */
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder;
        if (convertView == null) {
            convertView = layoutInflater.inflate(R.layout.appdialog_list_row, null);
            holder = new ViewHolder();
            holder.icon = convertView.findViewById(R.id.id_appdialog_row_imageView_icon);
            holder.description = convertView.findViewById(R.id.id_appdialog_row_textView_description);
            holder.format = convertView.findViewById(R.id.id_appdialog_row_textView_format);
            convertView.setTag(holder);
        } else {
            holder = (ViewHolder) convertView.getTag();
        }
        holder.icon.setImageDrawable(listData.get(position).icon);
        holder.description.setText(listData.get(position).label);
        holder.format.setText(listData.get(position).fileType.equals(FILETYPE_GPX) ? "GPX" : listData.get(position).fileType.equals(FILETYPE_KML) ? "KML" : "");