|
@@ -3,6 +3,7 @@ package com.dbs.mplus.knuh.activity;
|
|
|
import androidx.appcompat.app.AppCompatActivity;
|
|
|
import androidx.appcompat.widget.AppCompatRadioButton;
|
|
|
import androidx.core.content.ContextCompat;
|
|
|
+import androidx.recyclerview.widget.RecyclerView;
|
|
|
import androidx.viewpager.widget.ViewPager;
|
|
|
|
|
|
import android.content.Context;
|
|
@@ -14,6 +15,7 @@ import android.util.Log;
|
|
|
import android.view.Gravity;
|
|
|
import android.view.View;
|
|
|
import android.widget.Button;
|
|
|
+import android.widget.CheckBox;
|
|
|
import android.widget.EditText;
|
|
|
import android.widget.ImageView;
|
|
|
import android.widget.LinearLayout;
|
|
@@ -32,11 +34,13 @@ import com.dbs.mplus.knuh.activity.activityEvent.TapMenu;
|
|
|
import com.dbs.mplus.knuh.activity.activityEvent.TopMenu;
|
|
|
import com.dbs.mplus.knuh.adapter.ViewPagerAdapter;
|
|
|
import com.dbs.mplus.knuh.consent.sign.SignWrapper;
|
|
|
+import com.dbs.mplus.knuh.customView.CustomAlertDialog;
|
|
|
import com.dbs.mplus.knuh.customView.CustomRadioGroup;
|
|
|
import com.dbs.mplus.knuh.customView.LoadingProgress;
|
|
|
import com.dbs.mplus.knuh.fragment.HistoryFragment;
|
|
|
import com.dbs.mplus.knuh.fragment.MarkerFragment;
|
|
|
import com.dbs.mplus.knuh.fragment.SearchFragment;
|
|
|
+import com.dbs.mplus.knuh.util.ConsentConfig;
|
|
|
import com.dbs.mplus.knuh.util.Util;
|
|
|
|
|
|
public class ConsentActivity extends AppCompatActivity {
|
|
@@ -45,6 +49,7 @@ public class ConsentActivity extends AppCompatActivity {
|
|
|
public AppCompatActivity mActivity;
|
|
|
public Context mContext;
|
|
|
private LoadingProgress loadingProgress;
|
|
|
+ private CustomAlertDialog csAlert;
|
|
|
private TopMenu topMenu;
|
|
|
private TapMenu tapMenu;
|
|
|
private LeftMenu leftMenu;
|
|
@@ -103,6 +108,10 @@ public class ConsentActivity extends AppCompatActivity {
|
|
|
|
|
|
public EditText etPatientId;
|
|
|
public LinearLayout patientSearchLayout;
|
|
|
+
|
|
|
+ public RecyclerView patientRecyclerView;
|
|
|
+ public TextView patientEmpty;
|
|
|
+ public CheckBox chkMyPatient;
|
|
|
/** left Menu **/
|
|
|
|
|
|
/** Right Menu **/
|
|
@@ -141,6 +150,7 @@ public class ConsentActivity extends AppCompatActivity {
|
|
|
mContext = this;
|
|
|
|
|
|
loadingProgress = new LoadingProgress(mContext);
|
|
|
+ csAlert = new CustomAlertDialog(mContext);
|
|
|
topMenu = new TopMenu(mContext, mActivity);
|
|
|
tapMenu = new TapMenu(mContext, mActivity);
|
|
|
leftMenu = new LeftMenu(mContext, mActivity);
|
|
@@ -262,6 +272,10 @@ public class ConsentActivity extends AppCompatActivity {
|
|
|
etPatientId = (EditText) findViewById(R.id.etPatientId);
|
|
|
patientSearchLayout = (LinearLayout) findViewById(R.id.patientSearchLayout);
|
|
|
|
|
|
+ patientRecyclerView = (RecyclerView) findViewById(R.id.patientRecyclerView);
|
|
|
+ patientEmpty = (TextView) findViewById(R.id.patientEmpty);
|
|
|
+ chkMyPatient = (CheckBox) findViewById(R.id.chkMyPatient);
|
|
|
+
|
|
|
leftMenu.setRadioGroupDraw(indexPage);
|
|
|
|
|
|
if (!indexPage.equals("I")) {
|
|
@@ -331,6 +345,17 @@ public class ConsentActivity extends AppCompatActivity {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ public void showSingButtonDialog(String message) {
|
|
|
+ csAlert.show();
|
|
|
+ csAlert.setContent(message, ConsentConfig.ALERT_BTN_TYPE);
|
|
|
+ csAlert.btnConfirm2.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ csAlert.dismiss();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
public void showProgress() {
|
|
|
if (!loadingProgress.isShowing()) {
|
|
|
loadingProgress.show();
|