@@ -397,4 +397,10 @@ public class AddGoodDialog extends Dialog { | |||||
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); | | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); | ||||
} | } | ||||
}; | }; | ||||
@Override | |||||
public void dismiss() { | |||||
super.dismiss(); | |||||
MessageManager.getInstance().unRegisterMessageReceiver(activity_ma); | |||||
} | |||||
} | } |
@@ -81,15 +81,8 @@ import com.bonait.bnframework.common.message.MessageManager; | |||||
import com.bonait.bnframework.common.utils.AlertDialogUtils; | import com.bonait.bnframework.common.utils.AlertDialogUtils; | ||||
import com.bonait.bnframework.common.utils.ToastUtils; | import com.bonait.bnframework.common.utils.ToastUtils; | ||||
import com.bonait.bnframework.modules.home.adapter.loadinggood_adapter; | import com.bonait.bnframework.modules.home.adapter.loadinggood_adapter; | ||||
import com.bonait.bnframework.modules.home.adapter.wl_adapter; | |||||
import com.bonait.bnframework.modules.home.fragment.mode.SerialInter; | |||||
import com.bonait.bnframework.modules.home.fragment.mode.SerialManage; | |||||
import com.bonait.bnframework.modules.home.fragment.mode.SerialPortRead; | |||||
import com.bonait.bnframework.modules.home.fragment.mode.ShaoMaSave; | |||||
//import com.bonait.bnframework.modules.home.fragment.mode.ShaomaTest; | |||||
import com.bonait.bnframework.modules.home.fragment.mode.add_makegood_control; | import com.bonait.bnframework.modules.home.fragment.mode.add_makegood_control; | ||||
import com.bonait.bnframework.modules.home.fragment.mode.add_manguan_control; | import com.bonait.bnframework.modules.home.fragment.mode.add_manguan_control; | ||||
import com.bonait.bnframework.modules.home.fragment.mode.add_pf_control; | |||||
import com.bumptech.glide.Glide; | import com.bumptech.glide.Glide; | ||||
import com.litao.slider.NiftySlider; | import com.litao.slider.NiftySlider; | ||||
import com.orhanobut.logger.Logger; | import com.orhanobut.logger.Logger; | ||||
@@ -822,6 +815,7 @@ public class MakeGoodFragment extends BaseFragment { | |||||
rv_right.setAdapter(null); | rv_right.setAdapter(null); | ||||
Glide.get(getContext()).clearMemory(); | Glide.get(getContext()).clearMemory(); | ||||
MessageManager.getInstance().unRegisterMessageReceiver(getActivity()); | |||||
} | } | ||||
/** | /** | ||||
@@ -420,9 +420,12 @@ public class GoodPeiFangActivity extends BaseActivity { | |||||
@Override | @Override | ||||
public void onDestroy() { | public void onDestroy() { | ||||
add_pf.destroy(); | |||||
add_good.destroy(); | |||||
super.onDestroy(); | super.onDestroy(); | ||||
rv_right.setAdapter(null); | rv_right.setAdapter(null); | ||||
Glide.get(this).clearMemory(); | Glide.get(this).clearMemory(); | ||||
MessageManager.getInstance().unRegisterMessageReceiver(this); | |||||
} | } | ||||
@Override | @Override | ||||
@@ -228,6 +228,7 @@ public class SilosNewActivity extends BaseActivity { | |||||
@Override | @Override | ||||
public void onDestroy() { | public void onDestroy() { | ||||
super.onDestroy(); | super.onDestroy(); | ||||
MessageManager.getInstance().unRegisterMessageReceiver(this); | |||||
} | } | ||||
@Override | @Override | ||||
@@ -114,6 +114,7 @@ public class Silos_item_fragment extends BaseFragment { | |||||
public void onDestroy() { | public void onDestroy() { | ||||
super.onDestroy(); | super.onDestroy(); | ||||
Logger.d("我的fragment销毁"); | Logger.d("我的fragment销毁"); | ||||
MessageManager.getInstance().unRegisterMessageReceiver(getActivity()); | |||||
} | } | ||||
/** | /** | ||||
@@ -227,6 +227,10 @@ public class add_good_control extends LinearLayout { | |||||
}); | }); | ||||
} | } | ||||
public void destroy(){ | |||||
MessageManager.getInstance().unRegisterMessageReceiver(activity_ma); | |||||
} | |||||
public String ids=""; | public String ids=""; | ||||
/** | /** | ||||
* 数据验证 | * 数据验证 | ||||
@@ -317,6 +317,13 @@ public class add_pf_control extends LinearLayout implements MyClickListener { | |||||
} | } | ||||
} | } | ||||
public void destroy(){ | |||||
Activity activity = findActivity(acontext); | |||||
if (activity != null) { | |||||
MessageManager.getInstance().unRegisterMessageReceiver(activity); | |||||
} | |||||
} | |||||
/** | /** | ||||
* 保存数据 | * 保存数据 | ||||
*/ | */ | ||||
@@ -245,20 +245,20 @@ | |||||
android:background="@color/app_color_blue" > | android:background="@color/app_color_blue" > | ||||
<FrameLayout | <FrameLayout | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content"> | |||||
android:layout_height="?attr/qmui_topbar_height"> | |||||
<Button | <Button | ||||
android:id="@+id/btn_sync" | android:id="@+id/btn_sync" | ||||
android:layout_width="100dp" | android:layout_width="100dp" | ||||
android:layout_height="match_parent" | |||||
android:background="null" | |||||
android:layout_height="?attr/qmui_topbar_height" | |||||
android:background="#00000000" | |||||
android:textSize="16sp" | android:textSize="16sp" | ||||
android:layout_centerHorizontal="true"/> | android:layout_centerHorizontal="true"/> | ||||
<ImageView | <ImageView | ||||
android:layout_width="48dp" | |||||
android:layout_height="48dp" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="?attr/qmui_topbar_height" | |||||
android:src="@mipmap/yxz" | android:src="@mipmap/yxz" | ||||
android:layout_gravity="center" | android:layout_gravity="center" | ||||
android:scaleType="fitXY" | |||||
android:scaleType="fitCenter" | |||||
/> | /> | ||||
</FrameLayout> | </FrameLayout> | ||||