// Path: app/src/main/java/discovery/contentful/CFApp.java
// public class CFApp extends Application {
//   public static CFApp sInstance;
// 
//   @Override
//   public void onCreate() {
//     super.onCreate();
// 
//     sInstance = this;
//   }
// 
//   public static CFApp getInstance() {
//     return sInstance;
//   }
// }
// 
// Path: app/src/main/java/discovery/contentful/ui/FieldViewHolder.java
// public class FieldViewHolder {
//   public @Bind(R.id.tv_title) CFTextView tvTitle;
//   public @Bind(R.id.tv_value) CFTextView tvValue;
//   public @Bind(R.id.iv_arrow) ImageView ivArrow;
// 
//   public FieldViewHolder(View v) {
//     ButterKnife.bind(this, v);
//   }
// }
// 
// Path: app/src/main/java/discovery/contentful/utils/ViewHelper.java
// public class ViewHelper {
//   private ViewHelper() {
//   }
// 
//   /**
//    * Register a callback to be invoked when the global layout state or the visibility of views
//    * within the view tree changes.
//    *
//    * @param v The View.
//    * @param listener The callback to add.
//    * @see #removeGlobalLayoutListener(View, ViewTreeObserver.OnGlobalLayoutListener).
//    */
//   public static void addGlobalLayoutListener(View v,
//       ViewTreeObserver.OnGlobalLayoutListener listener) {
//     ViewTreeObserver observer = v.getViewTreeObserver();
// 
//     if (observer == null || !observer.isAlive()) {
//       return;
//     }
// 
//     observer.addOnGlobalLayoutListener(listener);
//   }
// 
//   /**
//    * Remove a previously installed global layout callback.
//    *
//    * @param v The View.
//    * @param listener The callback to remove.
//    * @see #addGlobalLayoutListener(View, ViewTreeObserver.OnGlobalLayoutListener).
//    */
//   @SuppressWarnings("deprecation")
//   @SuppressLint("NewApi")
//   public static void removeGlobalLayoutListener(View v,
//       ViewTreeObserver.OnGlobalLayoutListener listener) {
//     ViewTreeObserver observer = v.getViewTreeObserver();
//     if (observer == null || !observer.isAlive()) {
//       return;
//     }
// 
//     if (Build.VERSION.SDK_INT < 16) {
//       observer.removeGlobalOnLayoutListener(listener);
//     } else {
//       observer.removeOnGlobalLayoutListener(listener);
//     }
//   }
// 
//   public static void setVisibility(View v, boolean show) {
//     if (show) {
//       v.setVisibility(View.VISIBLE);
//     } else {
//       v.setVisibility(View.GONE);
//     }
//   }
// }


import android.content.Context;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import discovery.contentful.CFApp;
import discovery.contentful.R;
import discovery.contentful.ui.FieldViewHolder;
import discovery.contentful.utils.ViewHelper;
import com.contentful.java.cda.CDAAsset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Map;
import org.apache.commons.io.FileUtils;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
package discovery.contentful.adapters;


public class AssetInfoAdapter extends BaseAdapter {
  private final Context context;

  private final ArrayList<Pair<String, String>> fields;

  private final static HashSet<String> CLICKABLE_TITLES =
      new HashSet<>(Arrays.asList(new String[] {
          CFApp.getInstance().getString(R.string.asset_info_title),
// Path: app/src/main/java/discovery/contentful/CFApp.java
// public class CFApp extends Application {
//   public static CFApp sInstance;
// 
//   @Override
//   public void onCreate() {
//     super.onCreate();
// 
//     sInstance = this;
//   }
// 
//   public static CFApp getInstance() {
//     return sInstance;
//   }
// }
// 
// Path: app/src/main/java/discovery/contentful/ui/FieldViewHolder.java
// public class FieldViewHolder {
//   public @Bind(R.id.tv_title) CFTextView tvTitle;
//   public @Bind(R.id.tv_value) CFTextView tvValue;
//   public @Bind(R.id.iv_arrow) ImageView ivArrow;
// 
//   public FieldViewHolder(View v) {
//     ButterKnife.bind(this, v);
//   }
// }
// 
// Path: app/src/main/java/discovery/contentful/utils/ViewHelper.java
// public class ViewHelper {
//   private ViewHelper() {
//   }
// 
//   /**
//    * Register a callback to be invoked when the global layout state or the visibility of views
//    * within the view tree changes.
//    *
//    * @param v The View.
//    * @param listener The callback to add.
//    * @see #removeGlobalLayoutListener(View, ViewTreeObserver.OnGlobalLayoutListener).
//    */
//   public static void addGlobalLayoutListener(View v,
//       ViewTreeObserver.OnGlobalLayoutListener listener) {
//     ViewTreeObserver observer = v.getViewTreeObserver();
// 
//     if (observer == null || !observer.isAlive()) {
//       return;
//     }
// 
//     observer.addOnGlobalLayoutListener(listener);
//   }
// 
//   /**
//    * Remove a previously installed global layout callback.
//    *
//    * @param v The View.
//    * @param listener The callback to remove.
//    * @see #addGlobalLayoutListener(View, ViewTreeObserver.OnGlobalLayoutListener).
//    */
//   @SuppressWarnings("deprecation")
//   @SuppressLint("NewApi")
//   public static void removeGlobalLayoutListener(View v,
//       ViewTreeObserver.OnGlobalLayoutListener listener) {
//     ViewTreeObserver observer = v.getViewTreeObserver();
//     if (observer == null || !observer.isAlive()) {
//       return;
//     }
// 
//     if (Build.VERSION.SDK_INT < 16) {
//       observer.removeGlobalOnLayoutListener(listener);
//     } else {
//       observer.removeOnGlobalLayoutListener(listener);
//     }
//   }
// 
//   public static void setVisibility(View v, boolean show) {
//     if (show) {
//       v.setVisibility(View.VISIBLE);
//     } else {
//       v.setVisibility(View.GONE);
//     }
//   }
// }


// Path: app/src/main/java/discovery/contentful/adapters/AssetInfoAdapter.java
import android.content.Context;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import discovery.contentful.CFApp;
import discovery.contentful.R;
import discovery.contentful.ui.FieldViewHolder;
import discovery.contentful.utils.ViewHelper;
import com.contentful.java.cda.CDAAsset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Map;
import org.apache.commons.io.FileUtils;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;

package discovery.contentful.adapters;


public class AssetInfoAdapter extends BaseAdapter {
  private final Context context;

  private final ArrayList<Pair<String, String>> fields;

  private final static HashSet<String> CLICKABLE_TITLES =
      new HashSet<>(Arrays.asList(new String[] {
          CFApp.getInstance().getString(R.string.asset_info_title),
          CFApp.getInstance().getString(R.string.asset_info_description)