Hi, I have tried to add program stages activity in the Android skeleton app, it was working well until I added a program stages in the server. When I updated metadata, I found three program stages are repeating all the time. In the attached image, after blue rectangle area, first and last three stages are in repetition. Thank you for helping me out.
Sdk.d2().programModule().programStages()
.byProgramUid().eq(programUid)
.orderBySortOrder(RepositoryScope.OrderByDirection.ASC)
.getPaged(20).observe(this, programStagePagedList -> {
adapter.submitList(programStagePagedList);
findViewById(R.id.programStageNotificator).setVisibility(
programStagePagedList.isEmpty() ? View.VISIBLE : View.GONE);
});
Note, In debugger, I found five program stages in the contigouspagedlist.
One more thing, it seems that five stages loaded first, then after a fraction of second, the repeated items loaded in the list.