List of usage examples for android.database DataSetObservable DataSetObservable
DataSetObservable
From source file:com.granita.tasks.utils.ObservableSparseArrayCompat.java
public ObservableSparseArrayCompat() { super(); mDataSetObservable = new DataSetObservable(); }
From source file:com.android.mail.utils.ObservableSparseArrayCompat.java
public ObservableSparseArrayCompat() { super(); mDataSetObservable = new DataSetObservable(); }
From source file:com.granita.tasks.utils.ObservableSparseArrayCompat.java
public ObservableSparseArrayCompat(final int initialCapacity) { super(initialCapacity); mDataSetObservable = new DataSetObservable(); }
From source file:com.android.mail.utils.ObservableSparseArrayCompat.java
public ObservableSparseArrayCompat(final int initialCapacity) { super(initialCapacity); mDataSetObservable = new DataSetObservable(); }
From source file:com.twitter.sdk.android.tweetui.internal.TimelineDelegate.java
TimelineDelegate(Timeline<T> timeline, DataSetObservable observable, List<T> items, PagerAdapter pagerAdapter) { if (timeline == null) { throw new IllegalArgumentException("Timeline must not be null"); }// www.j ava 2s .c om this.timeline = timeline; this.timelineStateHolder = new TimelineStateHolder(); if (observable == null) { listAdapterObservable = new DataSetObservable(); } else { listAdapterObservable = observable; } this.pagerAdapter = pagerAdapter; if (items == null) { itemList = new ArrayList<>(); } else { itemList = items; } }
From source file:de.mrapp.android.adapter.expandablelist.AbstractExpandableListAdapter.java
/** * Creates a new adapter, whose underlying data is managed as a list of arbitrary group and * child items./*from ww w . j a v a 2 s .co m*/ * * @param context * The context, the adapter belongs to, as an instance of the class {@link Context}. The * context may not be null * @param decorator * The decorator, which should be used to customize the appearance of the views, which * are used to visualize the group and child items of the adapter, as an instance of the * generic type DecoratorType. The decorator may not be null * @param logLevel * The log level, which should be used for logging, as a value of the enum {@link * LogLevel}. The log level may not be null * @param groupAdapter * The adapter, which should manage the adapter's group items, as an instance of the * type {@link MultipleChoiceListAdapter}. The adapter may not be null * @param allowDuplicateChildren * True, if duplicate child items, regardless from the group they belong to, should be * allowed, false otherwise * @param notifyOnChange * True, if the method <code>notifyDataSetChanged():void</code> should be automatically * called when the adapter's underlying data has been changed, false otherwise * @param triggerGroupExpansionOnClick * True, if a group's expansion should be triggered, when it is clicked by the user, * false otherwise * @param itemClickListeners * A set, which contains the listeners, which should be notified, when an item of the * adapter has been clicked by the user, as an instance of the type {@link Set}, or an * empty set, if no listeners should be notified * @param itemLongClickListeners * A set, which contains the listeners, which should be notified, when an item of the * adapter has been long-clicked by the user, as an instance of the type {@link Set}, or * an empty set, if no listeners should be notified * @param adapterListeners * A set, which contains the listeners, which should be notified, when the adapter's * underlying data has been modified, as an instance of the type {@link Set}, or an * empty set, if no listeners should be notified * @param expansionListeners * A set, which contains the listeners, which should be notified, when a group item has * been expanded or collapsed, as an instance of the type {@link Set}, or an empty set, * if no listeners should be notified */ protected AbstractExpandableListAdapter(@NonNull final Context context, @NonNull final DecoratorType decorator, @NonNull final LogLevel logLevel, @NonNull final MultipleChoiceListAdapter<Group<GroupType, ChildType>> groupAdapter, final boolean allowDuplicateChildren, final boolean notifyOnChange, final boolean triggerGroupExpansionOnClick, @NonNull final Set<ExpandableListAdapterItemClickListener<GroupType, ChildType>> itemClickListeners, @NonNull final Set<ExpandableListAdapterItemLongClickListener<GroupType, ChildType>> itemLongClickListeners, @NonNull final Set<ExpandableListAdapterListener<GroupType, ChildType>> adapterListeners, @NonNull final Set<ExpansionListener<GroupType, ChildType>> expansionListeners) { ensureNotNull(context, "The context may not be null"); ensureNotNull(decorator, "The decorator may not be null"); ensureNotNull(itemClickListeners, "The item click listeners may not be null"); ensureNotNull(itemLongClickListeners, "The item long click listeners may not be null"); ensureNotNull(adapterListeners, "The adapter listeners may not be null"); ensureNotNull(expansionListeners, "The expansion listeners may not be null"); this.context = context; this.decorator = decorator; this.logger = new Logger(logLevel); this.dataSetObservable = new DataSetObservable(); this.groupAdapter = groupAdapter; this.groupAdapter.setLogLevel(LogLevel.OFF); this.groupAdapter.notifyOnChange(false); this.allowDuplicateChildren = allowDuplicateChildren; this.notifyOnChange = notifyOnChange; this.triggerGroupExpansionOnClick = triggerGroupExpansionOnClick; this.itemClickListeners = itemClickListeners; this.itemLongClickListeners = itemLongClickListeners; this.adapterListeners = adapterListeners; this.expansionListeners = expansionListeners; addItemClickListener(createGroupClickListener()); registerAdapterDataObserver(createAdapterDataSetObserver()); }