Browse Source

21312312

master
fyf 1 year ago
parent
commit
d7201ffa1f
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/src/main/java/com/example/bpa/view/adapter/wl_adapter.java
  2. +1
    -1
      app/src/main/java/com/example/bpa/view/from/wlgl_activity.java

+ 1
- 1
app/src/main/java/com/example/bpa/view/adapter/wl_adapter.java View File

@@ -21,7 +21,7 @@ public class wl_adapter extends ArrayAdapter<BPA_MATERIAL> {
@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 的实例


+ 1
- 1
app/src/main/java/com/example/bpa/view/from/wlgl_activity.java View File

@@ -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){



Loading…
Cancel
Save