Advertisement
GerONSo

Untitled

Dec 30th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. styleAdapter = StyleAdapter(
  2. { startLoading(root_layout) },
  3. {
  4. loading_container.visibility = View.GONE
  5. progress_no_ads.visibility = View.GONE
  6. App.isBlocked = false
  7. styleAdapter?.notifyDataSetChanged()
  8. Snackbar.make(root_layout, "All servers are busy, try a little later", Snackbar.LENGTH_LONG).show()
  9. },
  10. { showFeedbackWindow() },
  11. {
  12. Toast.makeText(this, it, Toast.LENGTH_LONG).show()
  13. },
  14. { pos, getLock, getCross ->
  15. val bundle = Bundle()
  16. bundle.putInt("position", pos)
  17. val fragment = SubscribeFragment.newInstance(
  18. {
  19. popBackStack()
  20. },
  21. { rewardedAd, rewardedAdCallback ->
  22. rewardedAd.show(this, rewardedAdCallback)
  23. },
  24. { position, lock, cross ->
  25. popBackStack()
  26.  
  27. Handler().postDelayed({
  28. Animator.rotateLock(lock, 300)
  29. Animator.dissapearCross(cross, 300)
  30. }, 200)
  31. Handler().postDelayed({
  32. val sPref = this.getPreferences(Context.MODE_PRIVATE)
  33. sPref.edit().putBoolean("list_$position", true).apply()
  34. styleAdapter?.notifyItemChanged(position)
  35. }, 700)
  36. },
  37. getLock,
  38. getCross)
  39. fragment.arguments = bundle
  40. addBackStack()
  41. supportFragmentManager
  42. .beginTransaction()
  43. .add(R.id.fragment_container, fragment, SUBSCRIPTION_FRAGMENT)
  44. .addToBackStack(null)
  45. .commit()
  46. },
  47. { position ->
  48. val sPref = this.getPreferences(Context.MODE_PRIVATE)
  49. sPref.getBoolean("list_$position", false)
  50. },
  51. { lock, cross ->
  52. // Thread.sleep(2000)
  53. // Handler().postDelayed({
  54. Animator.rotateLock(lock, 300)
  55. Animator.dissapearCross(cross, 300)
  56. // }, 0)
  57.  
  58. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement