diff --git a/app/src/main/java/com/example/bpa/view/adapter/wl_adapter.java b/app/src/main/java/com/example/bpa/view/adapter/wl_adapter.java index 9f9daa7..3b9a63d 100644 --- a/app/src/main/java/com/example/bpa/view/adapter/wl_adapter.java +++ b/app/src/main/java/com/example/bpa/view/adapter/wl_adapter.java @@ -21,7 +21,7 @@ public class wl_adapter extends ArrayAdapter { @NonNull @Override public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { - BPA_MATERIAL data = (BPA_MATERIAL) getItem(position);//得到当前项的 Fruit 实例 + BPA_MATERIAL data = (BPA_MATERIAL) getItem(position);//得到当前项选中item实例 //为每一个子项加载设定的布局 View view = LayoutInflater.from(getContext()).inflate(R.layout.wl_item, parent, false); //分别获取 image view 和 textview 的实例 diff --git a/app/src/main/java/com/example/bpa/view/from/wlgl_activity.java b/app/src/main/java/com/example/bpa/view/from/wlgl_activity.java index f5f2855..8bd5d72 100644 --- a/app/src/main/java/com/example/bpa/view/from/wlgl_activity.java +++ b/app/src/main/java/com/example/bpa/view/from/wlgl_activity.java @@ -98,7 +98,7 @@ public class wlgl_activity extends AppCompatActivity implements View.OnClickList { try{ bpa_materials= QueryDB.GetMaterialALL(); - wl_adapter adapter = new wl_adapter(this, R.layout.wl_item, bpa_materials); + wl_adapter adapter = new wl_adapter(wlgl_activity.this, R.layout.wl_item, bpa_materials); datatab.setAdapter(adapter); }catch(Exception e){