List of usage examples for android.database DataSetObserver DataSetObserver
DataSetObserver
From source file:com.farukcankaya.rtlviewpager.PagerAdapterWrapper.java
protected PagerAdapterWrapper(@NonNull PagerAdapter adapter) { this.adapter = adapter; this.adapter.registerDataSetObserver(new DataSetObserver() { @Override// ww w .j a v a 2 s .c o m public void onChanged() { PagerAdapterWrapper.super.notifyDataSetChanged(); dataSetObservable.notifyChanged(); } @Override public void onInvalidated() { dataSetObservable.notifyInvalidated(); } }); }
From source file:com.pregnant.health.view.convenientbanner.CBLoopPagerAdapterWrapper.java
CBLoopPagerAdapterWrapper(PagerAdapter adapter) { this.mAdapter = adapter; adapter.registerDataSetObserver(new DataSetObserver() { public void onChanged() { notifyDataSetChanged();/*from www . j av a 2 s . com*/ } }); }
From source file:com.example.paidelidemo.utils.view.convenientbanner.CBLoopPagerAdapterWrapper.java
CBLoopPagerAdapterWrapper(PagerAdapter adapter) { this.mAdapter = adapter; adapter.registerDataSetObserver(new DataSetObserver() { @Override/*from w ww.jav a2s. c o m*/ public void onChanged() { notifyDataSetChanged(); } }); }
From source file:yang.mobile.widget.viewpager.LoopPagerAdapterWrapper.java
LoopPagerAdapterWrapper(PagerAdapter adapter) { this.mAdapter = adapter; mAdapter.registerDataSetObserver(new DataSetObserver() { public void onChanged() { notifyDataSetChanged();//w w w . j a v a2 s. c o m } public void onInvalidated() { notifyDataSetChanged(); } }); }
From source file:com.eccyan.widget.LoopPagerAdapterWrapper.java
LoopPagerAdapterWrapper(PagerAdapter adapter) { this.mAdapter = adapter; adapter.registerDataSetObserver(new DataSetObserver() { public void onChanged() { notifyDataSetChanged();//from w w w .j a va2 s. com } }); }
From source file:asiantech.dev.yalypro.Helper.LoopPagerAdapter.java
LoopPagerAdapter(PagerAdapter adapter) { this.mAdapter = adapter; adapter.registerDataSetObserver(new DataSetObserver() { public void onChanged() { notifyDataSetChanged();//from w w w .j av a 2s . c o m } }); }
From source file:com.android.hcframe.ad.LoopPagerAdapterWrapper.java
public LoopPagerAdapterWrapper(PagerAdapter adapter, boolean canLoop) { mAdapter = adapter;/* ww w . jav a 2s . com*/ mCanLoop = canLoop; adapter.registerDataSetObserver(new DataSetObserver() { public void onChanged() { notifyDataSetChanged(); } }); }
From source file:com.google.blockly.model.VariableCategoryFactory.java
@Override public BlocklyCategory obtainCategory(String customType) { BlocklyCategory category = new BlocklyCategory(); rebuildItems(category);// w w w . j av a 2 s. c o m final WeakReference<BlocklyCategory> catRef = new WeakReference<>(category); mVariableNameManager.registerObserver(new DataSetObserver() { @Override public void onChanged() { BlocklyCategory category = catRef.get(); if (category == null) { // If the category isn't being used anymore clean up this observer. mVariableNameManager.unregisterObserver(this); } else { // Otherwise, update the category's list. rebuildItems(category); } } }); return category; }
From source file:com.bridgeconn.autographago.ui.customviews.TabLayoutHelper.java
/** * Constructor.//from w w w .ja va 2s.co m * * @param tabLayout TabLayout instance * @param viewPager ViewPager instance */ public TabLayoutHelper(@NonNull TabLayout tabLayout, @NonNull ViewPager viewPager) { PagerAdapter adapter = viewPager.getAdapter(); if (adapter == null) { throw new IllegalArgumentException("ViewPager does not have a PagerAdapter set"); } mTabLayout = tabLayout; mViewPager = viewPager; mInternalDataSetObserver = new DataSetObserver() { @Override public void onChanged() { handleOnDataSetChanged(); } }; mInternalOnTabSelectedListener = new TabLayout.OnTabSelectedListener() { @Override public void onTabSelected(TabLayout.Tab tab) { handleOnTabSelected(tab); } @Override public void onTabUnselected(TabLayout.Tab tab) { handleOnTabUnselected(tab); } @Override public void onTabReselected(TabLayout.Tab tab) { handleOnTabReselected(tab); } }; mInternalTabLayoutOnPageChangeListener = new FixedTabLayoutOnPageChangeListener(mTabLayout); setupWithViewPager(mTabLayout, mViewPager); }
From source file:rtandroid.benchmark.ui.ResultFragment.java
@Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mAdapter = mListener.getResultAdapter(); mAdapter.registerDataSetObserver(new DataSetObserver() { @Override/*from w w w . j ava2s . co m*/ public void onChanged() { mSpinner.setSelection(mAdapter.getCount() - 1); } }); View view = getView(); if (view == null) { return; } mSpinner = (Spinner) getView().findViewById(R.id.run_benchmark_list); mSpinner.setAdapter(mAdapter); mSpinner.setOnItemSelectedListener(this); }