Search in sources :

Example 36 with DataSetObserver

use of android.database.DataSetObserver in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class DotsPageIndicator method setViewPager.

public void setViewPager(ViewPager viewPager) {
    this.viewPager = viewPager;
    viewPager.setOnPageChangeListener(this);
    setPageCount(viewPager.getAdapter().getCount());
    viewPager.getAdapter().registerDataSetObserver(new DataSetObserver() {

        @Override
        public void onChanged() {
            setPageCount(DotsPageIndicator.this.viewPager.getAdapter().getCount());
        }
    });
    setCurrentPageImmediate();
}
Also used : DataSetObserver(android.database.DataSetObserver)

Aggregations

DataSetObserver (android.database.DataSetObserver)36 View (android.view.View)14 AdapterView (android.widget.AdapterView)9 ImageView (android.widget.ImageView)9 TextView (android.widget.TextView)9 OnClickListener (android.view.View.OnClickListener)8 ListView (android.widget.ListView)8 Calendar (android.icu.util.Calendar)5 PrintManager (android.print.PrintManager)5 PrinterInfo (android.print.PrinterInfo)5 PrintServiceInfo (android.printservice.PrintServiceInfo)5 SearchView (android.widget.SearchView)5 Intent (android.content.Intent)3 Calendar (java.util.Calendar)3 Bitmap (android.graphics.Bitmap)2 DisplayMetrics (android.util.DisplayMetrics)2 ViewGroup (android.view.ViewGroup)2 ScrollView (android.widget.ScrollView)2 HowaboutApplication (io.recom.howabout.HowaboutApplication)2 ArrayList (java.util.ArrayList)2