This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pipe, PipeTransform } from '@angular/core'; | |
import { DatePipe } from '@angular/common'; | |
import { RelativeDatePipe } from './relative-date.pipe'; // https://gist.github.com/JonCatmull/e00afb1c96298a4e386ea1b5d091702a | |
const secondsInAday = 86400; | |
/* | |
* Turn Date into realtive date (e.g. "5 days ago") unless date is | |
* more than relativeMax days ago. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class BaseAllAdapters<T> extends BaseAdapter { | |
protected Context mContext; | |
protected LongSparseArray<DelegateAdapter> mDelegateAdapterSparseArray; | |
private int mViewLayoutId = 0; | |
private List<ListItem<T>> mItems; | |
/*Constructor if we dont use mutiple view types in the list*/ | |
public BaseAllAdapters(Context context, int viewLayoutId) { | |
mContext = context; |