Skip to content

Commit

Permalink
standards
Browse files Browse the repository at this point in the history
  • Loading branch information
whoisladleo committed Jun 17, 2019
1 parent 3a2312d commit 623458d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
import android.support.v4.view.ViewPager;
import org.smartregister.chw.malaria.contract.MalariaProfileContract;
import org.smartregister.commonregistry.CommonPersonObject;
import org.smartregister.commonregistry.CommonPersonObjectClient;
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;
private CommonPersonObjectClient client;
private WeakReference<MalariaProfileContract.View> view;

@Override
Expand All @@ -35,7 +37,7 @@ public MalariaProfileContract.View getView() {
}

@Override
public void getProfileData(CommonPersonObject client) {
public void getProfileData(CommonPersonObjectClient client) {
//feed the view with the processed data
}

Expand All @@ -52,12 +54,14 @@ public void startProfileActivity(Intent intent) {
@Override
public void fetchProfileData(Intent intent) {
//process profile data from the intent
this.client = (CommonPersonObjectClient) intent.getSerializableExtra("client");
getProfileData(this.client);
}


@Override
protected void initializePresenter() {

//initialize presenter
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import android.support.design.bottomnavigation.LabelVisibilityMode;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.widget.Toast;

import com.vijay.jsonwizard.constants.JsonFormConstants;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import android.content.Context;
import android.content.Intent;
import org.smartregister.commonregistry.CommonPersonObject;
import org.smartregister.commonregistry.CommonPersonObjectClient;

public interface MalariaProfileContract {
interface View {
Context getContext();
MalariaProfileContract.View getView();
void getProfileData(CommonPersonObject client);
void getProfileData(CommonPersonObjectClient client);

}

Expand Down

0 comments on commit 623458d

Please sign in to comment.