3cooking 5 anni fa
parent
commit
9e500049e5

+ 1 - 6
app/src/main/java/com/dbs/mplus/knuh/fragment/SearchFragment.java

@@ -37,7 +37,6 @@ public class SearchFragment extends Fragment {
 
   private CategoryAdapter categoryAdapter;
 
-  private Spinner      searchHospitalSpinner;
   private Spinner      searchDeptSpinner;
   private LinearLayout searchHospitalLayout;
   private LinearLayout searchDeptLayout;
@@ -63,7 +62,6 @@ public class SearchFragment extends Fragment {
     searchHospitalLayout  = (LinearLayout) view.findViewById(R.id.searchHospitalLayout);
     searchDeptLayout      = (LinearLayout) view.findViewById(R.id.searchDeptLayout);
     searchDeptSpinner     = (Spinner) view.findViewById(R.id.searchDeptSpinner);
-    searchHospitalSpinner = (Spinner) view.findViewById(R.id.searchHospitalSpinner);
 
     getHospitalList("1");
 
@@ -145,10 +143,7 @@ public class SearchFragment extends Fragment {
       @Override
       public void run() {
         categoryAdapter = new CategoryAdapter(mActivity, arrayList);
-
-        if (!categoryId.equals("EMA_" + BuildConfig.INST_CD)) {
-          searchHospitalSpinner.setAdapter(categoryAdapter);
-        }
+        
         if (categoryId.equals("EMA_" + BuildConfig.INST_CD)) {
           searchDeptSpinner.setAdapter(categoryAdapter);
         }

+ 7 - 3
app/src/main/res/layout/activity_search_fragment.xml

@@ -14,24 +14,28 @@
         android:orientation="horizontal">
 
         <LinearLayout
+            android:id="@+id/searchHospitalLayout"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_weight="1"
             android:layout_marginRight="8dp"
             android:background="@drawable/shape_item">
-            <Spinner
+            <TextView
+                android:id="@+id/tvHospital"
                 android:layout_width="match_parent"
                 android:layout_height="35dp"
-                android:spinnerMode="dropdown"
-                android:overlapAnchor="false"/>
+                android:textSize="16sp"
+                android:textColor="@color/black" />
         </LinearLayout>
         <LinearLayout
+            android:id="@+id/searchDeptLayout"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_weight="1"
             android:layout_marginLeft="8dp"
             android:background="@drawable/shape_item">
             <Spinner
+                android:id="@+id/searchDeptSpinner"
                 android:layout_width="match_parent"
                 android:layout_height="35dp"
                 android:spinnerMode="dropdown"