瀏覽代碼

소스 오류 수정

songjunekeun 5 年之前
父節點
當前提交
6b85daf6a0

+ 0 - 79
app/src/main/java/com/dbs/mplus/knuh/adapter/ConsentFormListAdapter.java

@@ -1,79 +0,0 @@
-package com.dbs.mplus.knuh.adapter;
-
-import android.content.Context;
-import android.text.Layout;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Button;
-import android.widget.CheckBox;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import com.dbs.mplus.knuh.R;
-import com.dbs.mplus.knuh.model.ConsentFormListVO;
-
-import java.util.ArrayList;
-
-import androidx.annotation.NonNull;
-import androidx.appcompat.app.AppCompatActivity;
-import androidx.recyclerview.widget.RecyclerView;
-
-public class ConsentFormListAdapter extends RecyclerView.Adapter<ConsentFormListAdapter.ViewHolder> {
-
-  private AppCompatActivity            mActivity;
-  public  ArrayList<ConsentFormListVO> arrayList;
-
-  public ConsentFormListAdapter(AppCompatActivity mActivity, ArrayList<ConsentFormListVO> arrayList) {
-    this.mActivity = mActivity;
-    this.arrayList = arrayList;
-  }
-
-  public class ViewHolder extends RecyclerView.ViewHolder {
-
-    private LinearLayout consentLayout;
-    private CheckBox     consentCheckBox;
-    private TextView     tvConsentTitle;
-    private Button       btnConsent;
-
-
-    public ViewHolder(@NonNull View itemView) {
-      super(itemView);
-    }
-  }
-
-  @NonNull
-  @Override
-  public ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
-
-    View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.consent_list_item, viewGroup, false);
-    ViewHolder holder = new ViewHolder(view);
-
-    holder.consentLayout = (LinearLayout) view.findViewById(R.id.consentLayout);
-    holder.consentCheckBox = (CheckBox) view.findViewById(R.id.consentCheckBox);
-    holder.tvConsentTitle = (TextView) view.findViewById(R.id.tvConsentTitle);
-    holder.btnConsent = (Button) view.findViewById(R.id.btnConsent);
-
-    holder.consentLayout.setTag(holder);
-
-    return holder;
-  }
-
-  @Override
-  public void onBindViewHolder(@NonNull ViewHolder holder, int i) {
-
-    final ConsentFormListVO consentFormListVO = arrayList.get(i);
-
-    String formName = consentFormListVO.getFormName();
-
-    holder.tvConsentTitle.setText(formName);
-
-  }
-
-  @Override
-  public int getItemCount() {
-    return 0;
-  }
-
-
-}

+ 0 - 21
app/src/main/java/com/dbs/mplus/knuh/fragment/SearchFragment.java

@@ -21,7 +21,6 @@ import android.widget.TextView;
 import com.dbs.mplus.knuh.BuildConfig;
 import com.dbs.mplus.knuh.R;
 import com.dbs.mplus.knuh.adapter.CategoryAdapter;
-import com.dbs.mplus.knuh.adapter.ConsentFormListAdapter;
 import com.dbs.mplus.knuh.httpTask.CallBack;
 import com.dbs.mplus.knuh.httpTask.SoapParser;
 import com.dbs.mplus.knuh.model.CategoryVO;
@@ -42,7 +41,6 @@ public class SearchFragment extends Fragment {
   private Context mContext;
 
   private CategoryAdapter categoryAdapter;
-  private ConsentFormListAdapter consentAdapter;
   private RecyclerView searchRecyclerView;
   private LinearLayout searchClickLayout;
 
@@ -53,9 +51,6 @@ public class SearchFragment extends Fragment {
 
   private String keyWord = "";
 
-  private EditText etPatientId;
-  private String keyWord = "";
-
   public SearchFragment() {
   }
   // 테스트
@@ -171,7 +166,6 @@ public class SearchFragment extends Fragment {
 
         if (result == null || result.toString().indexOf("null") > 0 ) {
           ArrayList<ConsentFormListVO> arrayList = SoapParser.getConsentList(result);
-          setConsentAdapter(arrayList);
         }
 
       }
@@ -197,19 +191,4 @@ public class SearchFragment extends Fragment {
     Util.callHttp(mContext, ConsentConfig.HOST_CONSENT, ConsentConfig.GET_CONSENT_SEARCH, mData, callBack);
   }
 
-  private void setConsentAdapter(final ArrayList arrayList) {
-    mActivity.runOnUiThread(new Runnable() {
-      @Override
-      public void run() {
-        if (consentAdapter == null) {
-          consentAdapter = new ConsentFormListAdapter(mActivity, arrayList);
-          searchRecyclerView.setAdapter(consentAdapter);
-        } else {
-          consentAdapter.arrayList = arrayList;
-          consentAdapter.notifyDataSetChanged();
-        }
-      }
-    });
-  }
-
 }

+ 0 - 41
app/src/main/java/com/dbs/mplus/knuh/httpTask/SoapParser.java

@@ -234,46 +234,5 @@ public class SoapParser {
 
     return arrayList;
   }
-
-  public static ArrayList<ConsentFormListVO> getConsentList(SoapObject object) {
-
-    ArrayList<ConsentFormListVO> arrayList = new ArrayList<ConsentFormListVO>();
-
-    int total = 0;
-    if (object != null) {
-      total = object.getPropertyCount();
-      if(total == 1) {
-        if(object.getProperty(0) == null) {
-          total = 0;
-        }
-      }
-    }
-    if(total == 0) {
-    } else {
-      for(int i = 0; i < total; i++) {
-        SoapObject so = (SoapObject) object.getProperty(i);
-
-        String consentMstRid = so.getProperty("consentMstRid").toString().trim();
-        String pid           = so.getProperty("pid").toString().trim();
-        String consentState  = so.getProperty("consentState").toString().trim();
-        String formCd        = so.getProperty("formCd").toString().trim();
-        String formGuid      = so.getProperty("formGuid").toString().trim();
-        String formName      = so.getProperty("formName").toString().trim();
-        String formId        = so.getProperty("formId").toString().trim();
-        String printOnly     = so.getProperty("printOnly").toString().trim();
-        String ocrTagPrntYn  = so.getProperty("ocrTagPrntYn").toString().trim();
-        String formPrntNm    = so.getProperty("formPrntNm").toString().trim();
-        String certUseYn     = so.getProperty("certUseYn").toString().trim();
-        String opDiagNm      = so.getProperty("opDiagNm").toString().trim();
-        String opNm          = so.getProperty("opNm").toString().trim();
-        String userDrFlag    = so.getProperty("userDrFlag").toString().trim();
-        String linkFormCd    = so.getProperty("linkFormCd").toString().trim();
-
-        arrayList.add(new ConsentFormListVO(consentMstRid, pid, consentState, formCd, formGuid, formName, formId, printOnly, ocrTagPrntYn, formPrntNm, certUseYn, opDiagNm, opNm, userDrFlag, linkFormCd));
-      }
-    }
-
-    return arrayList;
-  }
 }
 

+ 59 - 41
app/src/main/res/layout/consent_list_item.xml

@@ -2,60 +2,78 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="horizontal">
+    android:orientation="vertical">
 
-    <LinearLayout
-        android:id="@+id/consentLayout"
+    <RelativeLayout
+        android:id="@+id/listLayer"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:orientation="horizontal">
+        android:background="@drawable/patient_ripple"
+        android:paddingTop="8dp"
+        android:paddingBottom="8dp"
+        android:paddingLeft="8dp"
+        android:paddingRight="8dp">
 
-        <LinearLayout
+        <CheckBox
+            android:id="@+id/chkConsent"
             android:layout_width="wrap_content"
-            android:layout_height="wrap_content">
-            <CheckBox
-                android:id="@+id/consentCheckBox"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:theme="@style/CheckBoxTheme" />
-        </LinearLayout>
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:visibility="visible"
+            android:buttonTint="@color/darkGray" />
+
+        <!--android:visibility="gone"-->
 
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_weight="1">
+            android:layout_centerVertical="true"
+            android:layout_toLeftOf="@+id/tvTemp"
+            android:layout_toRightOf="@+id/chkConsent"
+            android:layout_marginLeft="8dp"
+            android:orientation="vertical"
+            >
+
+            <!--android:layout_toRightOf="@+id/chkConsent"-->
+
             <TextView
-                android:id="@+id/tvConsentTitle"
+                android:id="@+id/tvPatientName"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:text="테스트입니다"
-                android:textSize="24sp" />
-        </LinearLayout>
+                android:text="!!!!!!!!!!!!!!!!!"
+                android:textColor="@color/black"
+                android:textSize="16sp" />
 
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_weight="3">
-            <Button
-                android:id="@+id/btnConsent"
-                android:layout_width="wrap_content"
+            <TextView
+                android:id="@+id/tvConsentName"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:text="추가" />
+                android:text="asdfasdfa"
+                android:textColor="@color/black"
+                android:textSize="16sp" />
+
         </LinearLayout>
 
-    </LinearLayout>
-</LinearLayout>
-
-
-    <!--        <CheckBox-->
-    <!--            android:layout_width="wrap_content"-->
-    <!--            android:layout_height="wrap_content" />-->
-    <!--        -->
-    <!--        <TextView-->
-    <!--            android:layout_width="wrap_content"-->
-    <!--            android:layout_height="wrap_content" />-->
-    <!--        -->
-    <!--        <Button-->
-    <!--            android:layout_width="wrap_content"-->
-    <!--            android:layout_height="wrap_content"-->
-    <!--            android:text="dd" />-->
+        <TextView
+            android:id="@+id/tvTemp"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentEnd="true"
+            android:layout_centerVertical="true"
+            android:background="@drawable/shape2"
+            android:paddingLeft="8dp"
+            android:paddingTop="4dp"
+            android:paddingRight="8dp"
+            android:paddingBottom="4dp"
+            android:text="삭제"
+            android:textColor="@color/white"
+            android:textSize="14sp" />
+
+    </RelativeLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="#D9D9D9" />
+
+</LinearLayout>