Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- java.lang.IllegalStateException: Cannot access database on the main thread since it may potentially lock the UI for a long period of time.
- val thread = Runnable {
- val intent1 = Intent(activity!!, NewOrderActivity::class.java)
- intent1.putExtra("isReview", isReview)
- intent1.putExtra("editClicked", editClicked)
- intent1.putExtra("orderId", orderId)
- intent1.putExtra(ParamsUtils.connected, CommonUtils.isInNetwork(activity))
- intent1.putExtra("orderName", orderName)
- intent1.putExtra("order", Gson().toJson(orderItem))
- intent1.putExtra("groupId", viewModel.getGroupId(orderItem.buyerId))
- Handler().post {
- startActivity(intent1)
- activity!!.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out)
- activity!!.finish()
- }
- }
- thread.run()
Add Comment
Please, Sign In to add comment