Skip to content

Commit

Permalink
Merge pull request opensrp#6 from radyalabs/bugfix/number_3
Browse files Browse the repository at this point in the history
fixing crash in; Opening the Anak Register.
  • Loading branch information
kiratheone authored Jan 7, 2021
2 parents 57bab36 + d125471 commit 09414d6
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.smartregister.adapter.SmartRegisterPaginatedAdapter;
import org.smartregister.bidan.R;
import org.smartregister.bidan.fragment.BaseSmartRegisterFragment;
import org.smartregister.bidan.sync.ClientProcessor;
import org.smartregister.bidan.utils.BidanFormUtils;
import org.smartregister.commonregistry.AllCommonsRepository;
import org.smartregister.commonregistry.CommonPersonObject;
Expand All @@ -29,7 +30,6 @@
import org.smartregister.enketo.view.fragment.DisplayFormFragment;
import org.smartregister.provider.SmartRegisterClientsProvider;
import org.smartregister.repository.DetailsRepository;
import org.smartregister.bidan.sync.ClientProcessor;
import org.smartregister.util.Log;
import org.smartregister.view.activity.SecuredNativeSmartRegisterActivity;
import org.smartregister.view.contract.SmartRegisterClient;
Expand All @@ -47,7 +47,6 @@
import java.util.Map;
import java.util.UUID;

import butterknife.Bind;
import butterknife.ButterKnife;

import static org.smartregister.util.Utils.getValue;
Expand All @@ -67,7 +66,6 @@ public class BaseRegisterActivity extends SecuredNativeSmartRegisterActivity imp

private final String TAG = BaseRegisterActivity.class.getName();
protected List<String> formNames;
@Bind(R.id.view_pager)
protected OpenSRPViewPager mPager;
protected int currentPage;
// private String[] formNames = new String[]{};
Expand All @@ -92,6 +90,7 @@ protected void onCreate(Bundle savedInstanceState) {
formNames = this.buildFormNameList();

// Instantiate a ViewPager and a PagerAdapter.
mPager = findViewById(R.id.view_pager);
mPagerAdapter = new EnketoRegisterPagerAdapter(getSupportFragmentManager(), formNames.toArray(new String[formNames.size()]), mBaseFragment());
mPager.setOffscreenPageLimit(formNames.size());
mPager.setAdapter(mPagerAdapter);
Expand Down

0 comments on commit 09414d6

Please sign in to comment.