mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
add comments
This commit is contained in:
parent
63c2679c33
commit
1753e2f07a
2 changed files with 10 additions and 1 deletions
|
@ -270,8 +270,9 @@ public abstract class Reading extends NbActivity implements OnPageChangeListener
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//NB: this implicitly calls readingAdapter.notifyDataSetChanged();
|
|
||||||
if (readingAdapter != null) {
|
if (readingAdapter != null) {
|
||||||
|
// swapCursor() will asynch process the new cursor and fully update the pager,
|
||||||
|
// update child fragments, and then call pagerUpdated()
|
||||||
readingAdapter.swapCursor(cursor, pager);
|
readingAdapter.swapCursor(cursor, pager);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -284,6 +285,9 @@ public abstract class Reading extends NbActivity implements OnPageChangeListener
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* notify the activity that the dataset for the pager has fully been updated
|
||||||
|
*/
|
||||||
public void pagerUpdated() {
|
public void pagerUpdated() {
|
||||||
// see if we are just starting and need to jump to a target story
|
// see if we are just starting and need to jump to a target story
|
||||||
skipPagerToStoryHash();
|
skipPagerToStoryHash();
|
||||||
|
|
|
@ -24,6 +24,11 @@ import java.util.Map;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An adapter to display stories in a ViewPager. Loosely based upon FragmentStatePagerAdapter, but
|
||||||
|
* with enhancements to correctly handle item insertion / removal and to pass invalidation down
|
||||||
|
* to child fragments during updates.
|
||||||
|
*/
|
||||||
public class ReadingAdapter extends PagerAdapter {
|
public class ReadingAdapter extends PagerAdapter {
|
||||||
|
|
||||||
private String sourceUserId;
|
private String sourceUserId;
|
||||||
|
|
Loading…
Add table
Reference in a new issue