Browse Source

32323223

tags/old_version_1
fyf 1 year ago
parent
commit
31088a2158
2 changed files with 9 additions and 3 deletions
  1. +8
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/WhActivity.java
  2. +1
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemCsPLCFragment.java

+ 8
- 2
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/WhActivity.java View File

@@ -44,6 +44,12 @@ public class WhActivity extends BaseActivity {
viewPager.setOffscreenPageLimit(4);
bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
}

@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
}

private void initTopBar() {
mTopBar.setTitle("系统维护");
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() {
@@ -53,12 +59,12 @@ public class WhActivity extends BaseActivity {
}
});
}
FragmentAdapter fragmentAdapter=null;
/**
* viewPager里添加fragment
*/
private void initFragment() {
FragmentAdapter fragmentAdapter = new FragmentAdapter(getSupportFragmentManager());
fragmentAdapter = new FragmentAdapter(getSupportFragmentManager());

fragmentAdapter.addFragment(new SystemCsPLCFragment());
fragmentAdapter.addFragment(new SystemCsJrFragment());


+ 1
- 1
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemCsPLCFragment.java View File

@@ -63,7 +63,7 @@ public class SystemCsPLCFragment extends BaseFragment {
ArrayList<BPA_PLCADDRESS> arrayList= QueryDB.GetPlcaddressALL();
for (BPA_PLCADDRESS item:arrayList)
{
fragment_plc gongxu=new fragment_plc(getContext(),null,item);
fragment_plc gongxu=new fragment_plc(this.context,null,item);
plcview.addView(gongxu);
}
}


Loading…
Cancel
Save