Java 类android.database.DataSetObservable 实例源码

项目:twitter-kit-android    文件:TimelineDelegate.java   
TimelineDelegate(Timeline<T> timeline, DataSetObservable observable, List<T> items) {
    if (timeline == null) {
        throw new IllegalArgumentException("Timeline must not be null");
    }
    this.timeline = timeline;
    this.timelineStateHolder = new TimelineStateHolder();
    if (observable == null) {
        listAdapterObservable = new DataSetObservable();
    } else {
        listAdapterObservable = observable;
    }

    if (items == null) {
        itemList = new ArrayList<>();
    } else {
        itemList = items;
    }
}
项目:FMTech    文件:ImageStripAdapter.java   
public ImageStripAdapter(int paramInt, OnImageChildViewTapListener paramOnImageChildViewTapListener)
{
  this.mImageCount = paramInt;
  this.mImages = new Drawable[this.mImageCount];
  this.mImageDimensions = new Common.Image.Dimension[this.mImageCount];
  this.mDataSetObservable = new DataSetObservable();
  this.mImageChildTappedListener = paramOnImageChildViewTapListener;
}
项目:twitter-kit-android    文件:TimelineDelegateTest.java   
@Before
public void setUp() throws Exception {
    mockTimeline = mock(Timeline.class);
    mockObservable = mock(DataSetObservable.class);
    // lists of items ordered from larger id to smaller
    testItems.add(TEST_ITEM_2);
    testItems.add(TEST_ITEM_1);
    // extra result items ordered from larger id to smaller
    testExtraItems.add(TEST_ITEM_4);
    testExtraItems.add(TEST_ITEM_3);
    testResult = new Result<>(new TimelineResult<>(TEST_TIMELINE_CURSOR, testItems), null);
}
项目:aard2-android    文件:BaseDescriptorList.java   
BaseDescriptorList(Class<T> typeParameterClass, DescriptorStore<T> store) {
    this.typeParameterClass = typeParameterClass;
    this.store = store;
    this.dataSetObservable = new DataSetObservable();
    this.list = new ArrayList<T>();
    this.updating = 0;
}
项目:all-base-adapter    文件:BaseAdapter.java   
public BaseAdapter(Context context, List<T> datas) {
    mDatas = datas;
    mContext = context;
    mInflater = LayoutInflater.from(mContext);
    mDataSetObservable = new DataSetObservable();
}
项目:MiBandDecompiled    文件:PagerAdapter.java   
public PagerAdapter()
{
    a = new DataSetObservable();
}
项目:MyCTFWriteUps    文件:PagerAdapter.java   
public PagerAdapter()
{
    mObservable = new DataSetObservable();
}
项目:aard2-android    文件:BlobDescriptorList.java   
BlobDescriptorList(Application app, DescriptorStore<BlobDescriptor> store, int maxSize) {
    this.app = app;
    this.store = store;
    this.maxSize = maxSize;
    this.list = new ArrayList<BlobDescriptor>();
    this.filteredList = new ArrayList<BlobDescriptor>();
    this.dataSetObservable = new DataSetObservable();
    this.filter = "";
    keyComparator = Slob.Strength.QUATERNARY.comparator;

    nameComparatorAsc = new Comparator<BlobDescriptor>() {
        @Override
        public int compare(BlobDescriptor b1, BlobDescriptor b2) {
        return keyComparator.compare(b1.key, b2.key);
        }
    };

    nameComparatorDesc = Collections.reverseOrder(nameComparatorAsc);

    timeComparatorAsc = new Comparator<BlobDescriptor>() {
        @Override
        public int compare(BlobDescriptor b1, BlobDescriptor b2) {
        return Util.compare(b1.createdAt, b2.createdAt);
        }
    };

    timeComparatorDesc = Collections.reverseOrder(timeComparatorAsc);

    lastAccessComparator = new Comparator<BlobDescriptor>() {
        @Override
        public int compare(BlobDescriptor b1, BlobDescriptor b2) {
            return  Util.compare(b2.lastAccess, b1.lastAccess);
        }
    };

    order = SortOrder.TIME;
    ascending = false;
    setSort(order, ascending);

    try {
        filterCollator = (RuleBasedCollator) Collator.getInstance(Locale.ROOT).clone();
    } catch (CloneNotSupportedException e) {
        throw new RuntimeException(e);
    }
    filterCollator.setStrength(Collator.PRIMARY);
    filterCollator.setAlternateHandlingShifted(true);
    handler = new Handler(Looper.getMainLooper());
}
项目:dove    文件:ReaderActivity.java   
@Override
public DataSetObservable getAccountObservable() {
    return mAccountObservable;
}
项目:dove    文件:ReaderActivity.java   
@Override
public DataSetObservable getDrawerObservable() {
    return mDrawerObservable;
}
项目:dove    文件:AbstractActivityController.java   
@Override
public DataSetObservable getAccountObservable() {
    return mAccountObservable;
}
项目:dove    文件:AbstractActivityController.java   
@Override
public DataSetObservable getDrawerObserverable() {
    return mDrawerObservable;
}
项目:dove    文件:AbstractActivityController.java   
@Override
public DataSetObservable getFolderObserverable() {
    return mFolderObservable;
}
项目:greendao-cipher    文件:AbstractCursor.java   
/**
 * This is hidden until the data set change model has been re-evaluated.
 * @hide
 */
protected DataSetObservable getDataSetObservable() {
    return mDataSetObservable;

}
项目:opentasks    文件:ObservableSparseArrayCompat.java   
public ObservableSparseArrayCompat()
{
    super();
    mDataSetObservable = new DataSetObservable();
}
项目:opentasks    文件:ObservableSparseArrayCompat.java   
public ObservableSparseArrayCompat(final int initialCapacity)
{
    super(initialCapacity);
    mDataSetObservable = new DataSetObservable();
}
项目:opentasks    文件:ObservableSparseArrayCompat.java   
public DataSetObservable getDataSetObservable()
{
    return mDataSetObservable;
}
项目:dobroreader-mod    文件:ExpandablePostAdapter.java   
protected DataSetObservable getDataSetObservable() {
    return dataSetObservable;
}
项目:AndroidAdapters    文件:AbstractExpandableListAdapter.java   
/**
 * Creates a new adapter, whose underlying data is managed as a list of arbitrary group and
 * child items.
 *
 * @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 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());
}
项目:dove    文件:AccountController.java   
/**
 * Get the account's {@link android.database.DataSetObservable}.
 * <em>
 * For a fragment, a folder {@link android.database.DataSetObserver} maybe need to be registered
 * when the fragment is created successfully, and to be unregistered when the fragment is to be destroyed.
 * </em>
 */
DataSetObservable getAccountObservable();
项目:dove    文件:DrawerController.java   
/**
 * Get the Drawer's {@link DataSetObservable}.
 * <em>
 * For a fragment, a drawer {@link android.database.DataSetObserver} maybe need to be registered
 * when the fragment is created successfully, and to be unregistered when the fragment is to be destroyed.
 * </em>
 * When the drawer's state changed, like opened or closed, the relative fragment should be notified to do data change.
 */
DataSetObservable getDrawerObservable();
项目:dove    文件:AccountController.java   
/**
 * Get the account's {@link DataSetObservable}. For a fragment, a folder
 * {@link DataSetObserver} may be need to be registered when the fragment is
 * created successfully, and to be unregistered when the fragment is to be
 * destroyed.
 */
DataSetObservable getAccountObservable();
项目:dove    文件:DrawerController.java   
/**
 * Get the Drawer's {@link DataSetObservable}.
 * <p>
 * For a fragment, a drawer {@link DataSetObserver} may be need to be
 * registered when the fragment is created successfully, and to be
 * unregistered when the fragment is to be destroyed.
 * <p/>
 * When the drawer's state chagned, like opened or closed, the relative
 * fragment should be notified to do data change.
 */
DataSetObservable getDrawerObserverable();
项目:dove    文件:FolderController.java   
/**
 * Get the folder's {@link DataSetObservable}. For a fragment, a folder
 * {@link DataSetObserver} may be need to be registered when the fragment is
 * created successfully, and to be unregistered when the fragment is to be
 * destroyed.
 */
DataSetObservable getFolderObserverable();