| | |
| | | import com.hdl.photovoltaic.enums.ShowErrorMode; |
| | | import com.hdl.photovoltaic.widget.ConfirmationCancelDialog; |
| | | import com.hdl.photovoltaic.widget.ConfirmationExceptionDialog; |
| | | import com.hdl.photovoltaic.widget.FlashingBoxDialog; |
| | | import com.hdl.photovoltaic.widget.FlashingIconBoxDialog; |
| | | |
| | | /** |
| | | * 线程逻辑 |
| | |
| | | HdlThreadLogic.runMainThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | FlashingBoxDialog flashingBoxDialog = new FlashingBoxDialog(context, millisecond); |
| | | FlashingIconBoxDialog flashingIconBoxDialog = new FlashingIconBoxDialog(context, millisecond); |
| | | if (isBoolean) { |
| | | Drawable drawable = AppCompatResources.getDrawable(context, R.drawable.tip_succeed); |
| | | flashingBoxDialog.setImage(drawable); |
| | | flashingIconBoxDialog.setImage(drawable); |
| | | } else { |
| | | Drawable drawable = AppCompatResources.getDrawable(context, R.drawable.tip_fail); |
| | | flashingBoxDialog.setImage(drawable); |
| | | flashingIconBoxDialog.setImage(drawable); |
| | | } |
| | | if (code == 0) { |
| | | //成功不需要增加状态码 |
| | | flashingBoxDialog.setContent(msg); |
| | | flashingIconBoxDialog.setContent(msg); |
| | | } else { |
| | | flashingBoxDialog.setContent(msg + "(" + code + ")"); |
| | | flashingIconBoxDialog.setContent(msg + "(" + code + ")"); |
| | | } |
| | | flashingBoxDialog.show(); |
| | | flashingIconBoxDialog.show(); |
| | | } |
| | | }, null, null); |
| | | } |