diff --git a/gradle.properties b/gradle.properties index 3db174d..63344cd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,4 +13,4 @@ POM_SETTING_DEVELOPER_ID=opensrp POM_SETTING_DEVELOPER_NAME=OpenSRP Onadev POM_SETTING_NAME=OpenSRP Client Chw malaria POM_SETTING_ARTIFACT_ID=opensrp-client-chw-malaria -POM_SETTING_PACKAGING=aar \ No newline at end of file +POM_SETTING_PACKAGING=aar diff --git a/opensrp-chw-malaria/src/main/ic_arrow_back_white_24dp-web.png b/opensrp-chw-malaria/src/main/ic_arrow_back_white_24dp-web.png new file mode 100644 index 0000000..e5a91cf Binary files /dev/null and b/opensrp-chw-malaria/src/main/ic_arrow_back_white_24dp-web.png differ diff --git a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaProfileActivity.java b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaProfileActivity.java new file mode 100644 index 0000000..4478962 --- /dev/null +++ b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaProfileActivity.java @@ -0,0 +1,132 @@ +package org.smartregister.chw.malaria.activity; + +import android.app.Activity; +import android.content.Context; +import android.content.Intent; +import android.graphics.PorterDuff; +import android.graphics.drawable.Drawable; +import android.os.Build; +import android.support.design.widget.AppBarLayout; +import android.support.v4.view.ViewPager; +import android.support.v7.app.ActionBar; +import android.support.v7.widget.Toolbar; +import android.view.View; +import android.view.ViewOutlineProvider; +import android.widget.TextView; +import org.joda.time.DateTime; +import org.joda.time.Period; +import org.smartregister.chw.malaria.contract.MalariaProfileContract; +import org.smartregister.chw.malaria.domain.MemberObject; +import org.smartregister.chw.malaria.presenter.BaseMalariaProfilePresenter; +import org.smartregister.chw.malaria.util.Constants; +import org.smartregister.helper.ImageRenderHelper; +import org.smartregister.malaria.R; +import org.smartregister.view.activity.BaseProfileActivity; + +import java.lang.ref.WeakReference; + +public class BaseMalariaProfileActivity extends BaseProfileActivity implements MalariaProfileContract.View, MalariaProfileContract.Presenter { + private Context context; + protected MemberObject MEMBER_OBJECT; + private WeakReference view; + + public static void startProfileActivity(Activity activity, MemberObject memberObject) { + Intent intent = new Intent(activity, BaseMalariaProfileActivity.class); + intent.putExtra(Constants.MALARIA_MEMBER_OBJECT.MEMBER_OBJECT, memberObject); + activity.startActivity(intent); + } + + @Override + protected void onCreation() { + setContentView(R.layout.activity_malaria_profile); + Toolbar toolbar = findViewById(R.id.collapsing_toolbar); + setSupportActionBar(toolbar); + + MEMBER_OBJECT = (MemberObject) getIntent().getSerializableExtra(Constants.MALARIA_MEMBER_OBJECT.MEMBER_OBJECT); + + ActionBar actionBar = getSupportActionBar(); + if (actionBar != null) { + actionBar.setDisplayHomeAsUpEnabled(true); + Drawable upArrow = getResources().getDrawable(R.drawable.ic_arrow_back_white_24dp); + upArrow.setColorFilter(getResources().getColor(R.color.text_blue), PorterDuff.Mode.SRC_ATOP); + actionBar.setHomeAsUpIndicator(upArrow); + } + + toolbar.setNavigationOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + BaseMalariaProfileActivity.this.finish(); + } + }); + appBarLayout = (AppBarLayout)this.findViewById(R.id.collapsing_toolbar_appbarlayout); + if (Build.VERSION.SDK_INT >= 21) { + appBarLayout.setOutlineProvider((ViewOutlineProvider)null); + } + + imageRenderHelper = new ImageRenderHelper(this); + setupViews(); + } + + @Override + protected void setupViews() { + int age = new Period(new DateTime(MEMBER_OBJECT.getAge()), new DateTime()).getYears(); + + TextView textViewName = findViewById(R.id.textview_name); + textViewName.setText(String.format("%s %s %s, %d", MEMBER_OBJECT.getFirstName(), MEMBER_OBJECT.getMiddleName(), MEMBER_OBJECT.getLastName(), age)); + + TextView textViewGender = findViewById(R.id.textview_gender); + textViewGender.setText(MEMBER_OBJECT.getGender()); + + TextView textViewLocation = findViewById(R.id.textview_address); + textViewLocation.setText(MEMBER_OBJECT.getAddress()); + + TextView textViewUniqueID = findViewById(R.id.textview_id); + textViewUniqueID.setText(MEMBER_OBJECT.getUniqueId()); + } + + @Override + public Context getContext() { + return context; + } + + @Override + public MalariaProfileContract.View getView() { + if(view != null) { + return view.get(); + } else { + return null; + } + } + + @Override + public MalariaProfileContract.Presenter presenter() { + return (MalariaProfileContract.Presenter) presenter; + } + + + @Override + protected void initializePresenter() { + presenter = new BaseMalariaProfilePresenter(this, MEMBER_OBJECT); + } + + @Override + protected ViewPager setupViewPager(ViewPager viewPager) { + return null; + } + + @Override + protected void fetchProfileData() { + //fetch profile data + } + + @Override + public void onClick(View view) { + if(view.getId() == R.id.title_layout) { + onBackPressed(); + } + } + + @Override + public void onDestroy(boolean b) { + // + } +} diff --git a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaRegisterActivity.java b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaRegisterActivity.java index ad4f3b6..3572e9a 100644 --- a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaRegisterActivity.java +++ b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaRegisterActivity.java @@ -148,10 +148,10 @@ protected void registerBottomNavigation() { if (bottomNavigationView != null) { bottomNavigationView.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_LABELED); - bottomNavigationView.getMenu().removeItem(R.id.action_clients); + bottomNavigationView.getMenu().removeItem(org.smartregister.R.id.action_clients); bottomNavigationView.getMenu().removeItem(R.id.action_register); - bottomNavigationView.getMenu().removeItem(R.id.action_search); - bottomNavigationView.getMenu().removeItem(R.id.action_library); + bottomNavigationView.getMenu().removeItem(org.smartregister.R.id.action_search); + bottomNavigationView.getMenu().removeItem(org.smartregister.R.id.action_library); bottomNavigationView.inflateMenu(getMenuResource()); bottomNavigationHelper.disableShiftMode(bottomNavigationView); @@ -162,6 +162,7 @@ protected void registerBottomNavigation() { } } + @MenuRes public int getMenuResource() { return R.menu.bottom_nav_family_menu; diff --git a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/contract/MalariaProfileContract.java b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/contract/MalariaProfileContract.java new file mode 100644 index 0000000..2879045 --- /dev/null +++ b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/contract/MalariaProfileContract.java @@ -0,0 +1,18 @@ +package org.smartregister.chw.malaria.contract; + +import android.content.Context; +import org.smartregister.view.contract.BaseProfileContract; + +public interface MalariaProfileContract { + interface View { + Context getContext(); + + MalariaProfileContract.View getView(); + + MalariaProfileContract.Presenter presenter(); + + } + + interface Presenter extends BaseProfileContract.Presenter { + } +} \ No newline at end of file diff --git a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/domain/MemberObject.java b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/domain/MemberObject.java new file mode 100644 index 0000000..47250b0 --- /dev/null +++ b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/domain/MemberObject.java @@ -0,0 +1,134 @@ +package org.smartregister.chw.malaria.domain; + +import org.smartregister.chw.malaria.util.DBConstants; +import org.smartregister.commonregistry.CommonPersonObjectClient; + +import java.io.Serializable; + +public class MemberObject implements Serializable { + private String firstName; + private String middleName; + private String lastName; + private String address; + private String gender; + private String uniqueId; + private String age; + private String baseEntityId; + private String relationalId; + private String primaryCareGiver; + private String familyHead; + private String familyBaseEntityId; + + public MemberObject(CommonPersonObjectClient client) { + firstName = client.getColumnmaps().get(DBConstants.KEY.FIRST_NAME) != null ? client.getColumnmaps().get(DBConstants.KEY.FIRST_NAME) : ""; + middleName = client.getColumnmaps().get(DBConstants.KEY.MIDDLE_NAME) != null ? client.getColumnmaps().get(DBConstants.KEY.MIDDLE_NAME) : ""; + lastName = client.getColumnmaps().get(DBConstants.KEY.LAST_NAME) != null ? client.getColumnmaps().get(DBConstants.KEY.LAST_NAME) : ""; + address = client.getColumnmaps().get(DBConstants.KEY.VILLAGE_TOWN) != null ? client.getColumnmaps().get(DBConstants.KEY.VILLAGE_TOWN) : ""; + gender = client.getColumnmaps().get(DBConstants.KEY.GENDER) != null ? client.getColumnmaps().get(DBConstants.KEY.GENDER) : ""; + age = client.getColumnmaps().get(DBConstants.KEY.DOB) != null ? client.getColumnmaps().get(DBConstants.KEY.DOB) : ""; + uniqueId = client.getColumnmaps().get(DBConstants.KEY.UNIQUE_ID); + baseEntityId = client.getColumnmaps().get(DBConstants.KEY.BASE_ENTITY_ID); + relationalId = client.getColumnmaps().get(DBConstants.KEY.RELATIONAL_ID); + primaryCareGiver = client.getColumnmaps().get(DBConstants.KEY.PRIMARY_CARE_GIVER); + familyHead = client.getColumnmaps().get(DBConstants.KEY.FAMILY_HEAD); + familyBaseEntityId = client.getColumnmaps().get(DBConstants.KEY.FAMILY_BASE_ENTITY_ID); + } + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getMiddleName() { + return middleName; + } + + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getAge() { + return age; + } + + public void setAge(String age) { + this.age = age; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public String getUniqueId() { + return uniqueId; + } + + public void setUniqueId(String uniqueId) { + this.uniqueId = uniqueId; + } + + public String getBaseEntityId() { + return baseEntityId; + } + + public void setBaseEntityId(String baseEntityId) { + this.baseEntityId = baseEntityId; + } + + public String getRelationalId() { + return relationalId; + } + + public void setRelationalId(String relationalId) { + this.relationalId = relationalId; + } + + public String getFamilyBaseEntityId() { + return familyBaseEntityId; + } + + public void setFamilyBaseEntityId(String familyBaseEntityId) { + this.familyBaseEntityId = familyBaseEntityId; + } + + public String getPrimaryCareGiver() { + return primaryCareGiver; + } + + public void setPrimaryCareGiver(String primaryCareGiver) { + this.primaryCareGiver = primaryCareGiver; + } + + public String getFamilyHead() { + return familyHead; + } + + public void setFamilyHead(String familyHead) { + this.familyHead = familyHead; + } + + + +} diff --git a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/fragment/BaseMalariaRegisterFragment.java b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/fragment/BaseMalariaRegisterFragment.java index 9cb06a5..674ce1d 100644 --- a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/fragment/BaseMalariaRegisterFragment.java +++ b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/fragment/BaseMalariaRegisterFragment.java @@ -3,10 +3,13 @@ import android.widget.ImageView; import android.widget.TextView; +import org.smartregister.chw.malaria.activity.BaseMalariaProfileActivity; import org.smartregister.chw.malaria.contract.MalariaRegisterFragmentContract; +import org.smartregister.chw.malaria.domain.MemberObject; import org.smartregister.chw.malaria.model.BaseMalariaRegisterFragmentModel; import org.smartregister.chw.malaria.presenter.BaseMalariaRegisterFragmentPresenter; import org.smartregister.chw.malaria.provider.MalariaRegisterProvider; +import org.smartregister.commonregistry.CommonPersonObjectClient; import org.smartregister.configurableviews.model.View; import org.smartregister.cursoradapter.RecyclerViewPaginatedAdapter; import org.smartregister.malaria.R; @@ -18,9 +21,10 @@ import java.util.Set; public class BaseMalariaRegisterFragment extends BaseRegisterFragment implements MalariaRegisterFragmentContract.View { + public static final String CLICK_VIEW_NORMAL = "click_view_normal"; @Override public void initializeAdapter(Set visibleColumns) { - MalariaRegisterProvider malariaRegisterProvider = new MalariaRegisterProvider(getActivity(), paginationViewHandler,visibleColumns,commonRepository()); + MalariaRegisterProvider malariaRegisterProvider = new MalariaRegisterProvider(getActivity(), paginationViewHandler,registerActionHandler, visibleColumns,commonRepository()); clientAdapter = new RecyclerViewPaginatedAdapter(null, malariaRegisterProvider, context().commonrepository(this.tablename)); clientAdapter.setCurrentlimit(20); clientsView.setAdapter(clientAdapter); @@ -31,13 +35,13 @@ public void setupViews(android.view.View view) { super.setupViews(view); // Update top left icon - qrCodeScanImageView = view.findViewById(R.id.scanQrCode); + qrCodeScanImageView = view.findViewById(org.smartregister.R.id.scanQrCode); if (qrCodeScanImageView != null) { qrCodeScanImageView.setVisibility(android.view.View.GONE); } // Update Search bar - android.view.View searchBarLayout = view.findViewById(R.id.search_bar_layout); + android.view.View searchBarLayout = view.findViewById(org.smartregister.R.id.search_bar_layout); searchBarLayout.setBackgroundResource(R.color.customAppThemeBlue); if (getSearchView() != null) { @@ -46,13 +50,13 @@ public void setupViews(android.view.View view) { } // Update sort filter - TextView filterView = view.findViewById(R.id.filter_text_view); + TextView filterView = view.findViewById(org.smartregister.R.id.filter_text_view); if (filterView != null) { filterView.setText(getString(R.string.sort)); } // Update title name - ImageView logo = view.findViewById(R.id.opensrp_logo_image_view); + ImageView logo = view.findViewById(org.smartregister.R.id.opensrp_logo_image_view); if (logo != null) { logo.setVisibility(android.view.View.GONE); } @@ -107,11 +111,23 @@ protected void startRegistration() { @Override protected void onViewClicked(android.view.View view) { -// implement onclick actions + if (getActivity() == null) { + return; + } + + if (view.getTag() instanceof CommonPersonObjectClient && view.getTag(R.id.VIEW_ID) == CLICK_VIEW_NORMAL) { + openProfile((CommonPersonObjectClient) view.getTag()); + } + } + + protected void openProfile(CommonPersonObjectClient client) { + BaseMalariaProfileActivity.startProfileActivity(getActivity(), new MemberObject(client)); } @Override public void showNotFoundPopup(String s) { // implement dialog } + + } diff --git a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/presenter/BaseMalariaProfilePresenter.java b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/presenter/BaseMalariaProfilePresenter.java new file mode 100644 index 0000000..da3a191 --- /dev/null +++ b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/presenter/BaseMalariaProfilePresenter.java @@ -0,0 +1,42 @@ +package org.smartregister.chw.malaria.presenter; + +import android.content.Context; +import org.smartregister.chw.malaria.contract.MalariaProfileContract; +import org.smartregister.chw.malaria.domain.MemberObject; + +import java.lang.ref.WeakReference; + +public class BaseMalariaProfilePresenter implements MalariaProfileContract.Presenter, MalariaProfileContract.View { + protected WeakReference view; + protected MemberObject memberObject; + + public BaseMalariaProfilePresenter(MalariaProfileContract.View contractView, MemberObject memberObject) { + this.view = new WeakReference<>(contractView); + this.memberObject = memberObject; + + } + + @Override + public Context getContext() { + return null; + } + + @Override + public MalariaProfileContract.View getView() { + if(view != null) { + return view.get(); + } + return null; + } + + @Override + public MalariaProfileContract.Presenter presenter() { + return null; + } + + + @Override + public void onDestroy(boolean b) { + //destroy + } +} diff --git a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/provider/MalariaRegisterProvider.java b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/provider/MalariaRegisterProvider.java index 6ba163c..4c9025b 100644 --- a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/provider/MalariaRegisterProvider.java +++ b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/provider/MalariaRegisterProvider.java @@ -11,6 +11,7 @@ import org.joda.time.DateTime; import org.joda.time.Period; +import org.smartregister.chw.malaria.fragment.BaseMalariaRegisterFragment; import org.smartregister.chw.malaria.util.DBConstants; import org.smartregister.commonregistry.CommonPersonObject; import org.smartregister.commonregistry.CommonPersonObjectClient; @@ -35,15 +36,17 @@ public class MalariaRegisterProvider implements RecyclerViewProvider visibleColumns; - public MalariaRegisterProvider(Context context, View.OnClickListener paginationClickListener, Set visibleColumns, CommonRepository commonRepository) { + public MalariaRegisterProvider(Context context, View.OnClickListener paginationClickListener, View.OnClickListener onClickListener, Set visibleColumns, CommonRepository commonRepository) { inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); this.paginationClickListener = paginationClickListener; + this.onClickListener = onClickListener; this.visibleColumns = visibleColumns; this.context = context; this.commonRepository = commonRepository; @@ -56,14 +59,11 @@ public void getView(Cursor cursor, SmartRegisterClient smartRegisterClient, Regi if (visibleColumns.isEmpty()) { populatePatientColumn(pc, registerViewHolder); populateLastColumn(pc, registerViewHolder); - - return; } } private void populatePatientColumn(CommonPersonObjectClient pc, final RegisterViewHolder viewHolder) { - String fname = getName( Utils.getValue(pc.getColumnmaps(), DBConstants.KEY.FIRST_NAME, true), Utils.getValue(pc.getColumnmaps(), DBConstants.KEY.MIDDLE_NAME, true)); @@ -76,9 +76,33 @@ private void populatePatientColumn(CommonPersonObjectClient pc, final RegisterVi viewHolder.textViewGender.setText(Utils.getValue(pc.getColumnmaps(), DBConstants.KEY.GENDER, true)); viewHolder.textViewVillage.setText(Utils.getValue(pc.getColumnmaps(), DBConstants.KEY.VILLAGE_TOWN, true)); +// add onclick listener to patient column and tag it with the client object + viewHolder.patientColumn.setOnClickListener(onClickListener); + viewHolder.patientColumn.setTag(pc); + viewHolder.patientColumn.setTag(R.id.VIEW_ID, BaseMalariaRegisterFragment.CLICK_VIEW_NORMAL); + + viewHolder.dueButton.setOnClickListener(onClickListener); + viewHolder.dueButton.setTag(pc); + viewHolder.dueButton.setTag(R.id.VIEW_ID, BaseMalariaRegisterFragment.CLICK_VIEW_NORMAL); + viewHolder.registerColumns.setOnClickListener(onClickListener); + + viewHolder.registerColumns.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + viewHolder.patientColumn.performClick(); + } + }); + + viewHolder.registerColumns.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + viewHolder.dueButton.performClick(); + } + }); } + private void populateLastColumn(CommonPersonObjectClient pc, RegisterViewHolder viewHolder) { if (commonRepository != null) { CommonPersonObject commonPersonObject = commonRepository.findByBaseEntityId(pc.entityId()); @@ -183,6 +207,4 @@ public FooterViewHolder(View view) { pageInfoView = view.findViewById(org.smartregister.R.id.txt_page_info); } } - - } diff --git a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/util/Constants.java b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/util/Constants.java index ba48eb7..ef0c54b 100644 --- a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/util/Constants.java +++ b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/util/Constants.java @@ -14,10 +14,11 @@ interface JSON_FORM_EXTRA { interface EVENT_TYPE { String MALARIA_CONFIRMATION = "Malaria Confirmation"; + String UPDATE_MALARIA_CONFIRMATION = "update malaria confirmation"; } interface FORMS { - String MALARIA_REGISTRATION = "malaria_registration"; + String MALARIA_REGISTRATION = "malaria_confirmation"; } interface TABLES { @@ -37,4 +38,8 @@ interface CONFIGURATION { String MALARIA_CONFIRMATION = "malaria_confirmation"; } + interface MALARIA_MEMBER_OBJECT { + String MEMBER_OBJECT = "memberObject"; + } + } diff --git a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/util/DBConstants.java b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/util/DBConstants.java index 29f3f8a..f3ec49e 100644 --- a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/util/DBConstants.java +++ b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/util/DBConstants.java @@ -10,6 +10,7 @@ public final class KEY { public static final String MIDDLE_NAME = "middle_name"; public static final String LAST_NAME = "last_name"; public static final String BASE_ENTITY_ID = "base_entity_id"; + public static final String FAMILY_BASE_ENTITY_ID = "family_base_entity_id"; public static final String DOB = "dob";//Date Of Birth public static final String DOD = "dod"; public static final String UNIQUE_ID = "unique_id"; @@ -17,5 +18,8 @@ public final class KEY { public static final String VILLAGE_TOWN = "village_town"; public static final String DATE_REMOVED = "date_removed"; public static final String GENDER = "gender"; + public static final String RELATIONAL_ID = "relational_id"; + public static final String FAMILY_HEAD = "family_head"; + public static final String PRIMARY_CARE_GIVER = "primary_caregiver"; } } diff --git a/opensrp-chw-malaria/src/main/res/drawable/ic_arrow_back_white_24dp.xml b/opensrp-chw-malaria/src/main/res/drawable/ic_arrow_back_white_24dp.xml new file mode 100644 index 0000000..71d5bbd --- /dev/null +++ b/opensrp-chw-malaria/src/main/res/drawable/ic_arrow_back_white_24dp.xml @@ -0,0 +1,5 @@ + + + diff --git a/opensrp-chw-malaria/src/main/res/drawable/record_btn_selector.xml b/opensrp-chw-malaria/src/main/res/drawable/record_btn_selector.xml new file mode 100644 index 0000000..6f05a11 --- /dev/null +++ b/opensrp-chw-malaria/src/main/res/drawable/record_btn_selector.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/opensrp-chw-malaria/src/main/res/layout-v21/activity_malaria_profile.xml b/opensrp-chw-malaria/src/main/res/layout-v21/activity_malaria_profile.xml new file mode 100644 index 0000000..70cb016 --- /dev/null +++ b/opensrp-chw-malaria/src/main/res/layout-v21/activity_malaria_profile.xml @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-chw-malaria/src/main/res/layout/activity_malaria_profile.xml b/opensrp-chw-malaria/src/main/res/layout/activity_malaria_profile.xml new file mode 100644 index 0000000..ca1bc7c --- /dev/null +++ b/opensrp-chw-malaria/src/main/res/layout/activity_malaria_profile.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-chw-malaria/src/main/res/layout/view_record_malaria.xml b/opensrp-chw-malaria/src/main/res/layout/view_record_malaria.xml new file mode 100644 index 0000000..d4b0719 --- /dev/null +++ b/opensrp-chw-malaria/src/main/res/layout/view_record_malaria.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-chw-malaria/src/main/res/mipmap-hdpi/ic_arrow_back_white_24dp.png b/opensrp-chw-malaria/src/main/res/mipmap-hdpi/ic_arrow_back_white_24dp.png new file mode 100644 index 0000000..d9e6149 Binary files /dev/null and b/opensrp-chw-malaria/src/main/res/mipmap-hdpi/ic_arrow_back_white_24dp.png differ diff --git a/opensrp-chw-malaria/src/main/res/mipmap-mdpi/ic_arrow_back_white_24dp.png b/opensrp-chw-malaria/src/main/res/mipmap-mdpi/ic_arrow_back_white_24dp.png new file mode 100644 index 0000000..8c6c7ae Binary files /dev/null and b/opensrp-chw-malaria/src/main/res/mipmap-mdpi/ic_arrow_back_white_24dp.png differ diff --git a/opensrp-chw-malaria/src/main/res/mipmap-xhdpi/ic_arrow_back_white_24dp.png b/opensrp-chw-malaria/src/main/res/mipmap-xhdpi/ic_arrow_back_white_24dp.png new file mode 100644 index 0000000..b30ba68 Binary files /dev/null and b/opensrp-chw-malaria/src/main/res/mipmap-xhdpi/ic_arrow_back_white_24dp.png differ diff --git a/opensrp-chw-malaria/src/main/res/mipmap-xxhdpi/ic_arrow_back_white_24dp.png b/opensrp-chw-malaria/src/main/res/mipmap-xxhdpi/ic_arrow_back_white_24dp.png new file mode 100644 index 0000000..d354e8b Binary files /dev/null and b/opensrp-chw-malaria/src/main/res/mipmap-xxhdpi/ic_arrow_back_white_24dp.png differ diff --git a/opensrp-chw-malaria/src/main/res/mipmap-xxxhdpi/ic_arrow_back_white_24dp.png b/opensrp-chw-malaria/src/main/res/mipmap-xxxhdpi/ic_arrow_back_white_24dp.png new file mode 100644 index 0000000..943e023 Binary files /dev/null and b/opensrp-chw-malaria/src/main/res/mipmap-xxxhdpi/ic_arrow_back_white_24dp.png differ diff --git a/opensrp-chw-malaria/src/main/res/values/colors.xml b/opensrp-chw-malaria/src/main/res/values/colors.xml index 079570a..6dd30b3 100644 --- a/opensrp-chw-malaria/src/main/res/values/colors.xml +++ b/opensrp-chw-malaria/src/main/res/values/colors.xml @@ -18,4 +18,9 @@ #FAFAFA #218CC5 + + #218CC5 + #000000 + #FAFAFA + @android:color/holo_blue_light diff --git a/opensrp-chw-malaria/src/main/res/values/strings.xml b/opensrp-chw-malaria/src/main/res/values/strings.xml index 604796a..82ff0e5 100644 --- a/opensrp-chw-malaria/src/main/res/values/strings.xml +++ b/opensrp-chw-malaria/src/main/res/values/strings.xml @@ -13,8 +13,13 @@ Saving \u00b7 FOLLOWUP\nVisit - - + Patient Name, Age + Record malaria follow-up + Male + Address #24 + ID:123456 + \u00b7 + Return diff --git a/opensrp-chw-malaria/src/main/res/values/styles.xml b/opensrp-chw-malaria/src/main/res/values/styles.xml new file mode 100644 index 0000000..618ed87 --- /dev/null +++ b/opensrp-chw-malaria/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file diff --git a/opensrp-chw-malaria/src/main/res/values/tags.xml b/opensrp-chw-malaria/src/main/res/values/tags.xml new file mode 100644 index 0000000..4bf163b --- /dev/null +++ b/opensrp-chw-malaria/src/main/res/values/tags.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/sample/src/main/java/org/smartregister/chw/malaria/activity/MalariaRegisterActivity.java b/sample/src/main/java/org/smartregister/chw/malaria/activity/MalariaRegisterActivity.java index 136c93c..db4fe0b 100644 --- a/sample/src/main/java/org/smartregister/chw/malaria/activity/MalariaRegisterActivity.java +++ b/sample/src/main/java/org/smartregister/chw/malaria/activity/MalariaRegisterActivity.java @@ -18,4 +18,5 @@ protected void registerBottomNavigation() { bottomNavigationView.getMenu().removeItem(org.smartregister.R.id.action_library); } } + } \ No newline at end of file