Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- styleAdapter = StyleAdapter(
- { startLoading(root_layout) },
- {
- loading_container.visibility = View.GONE
- progress_no_ads.visibility = View.GONE
- App.isBlocked = false
- styleAdapter?.notifyDataSetChanged()
- Snackbar.make(root_layout, "All servers are busy, try a little later", Snackbar.LENGTH_LONG).show()
- },
- { showFeedbackWindow() },
- {
- Toast.makeText(this, it, Toast.LENGTH_LONG).show()
- },
- { pos, getLock, getCross ->
- val bundle = Bundle()
- bundle.putInt("position", pos)
- val fragment = SubscribeFragment.newInstance(
- {
- popBackStack()
- },
- { rewardedAd, rewardedAdCallback ->
- rewardedAd.show(this, rewardedAdCallback)
- },
- { position, lock, cross ->
- popBackStack()
- Handler().postDelayed({
- Animator.rotateLock(lock, 300)
- Animator.dissapearCross(cross, 300)
- }, 200)
- Handler().postDelayed({
- val sPref = this.getPreferences(Context.MODE_PRIVATE)
- sPref.edit().putBoolean("list_$position", true).apply()
- styleAdapter?.notifyItemChanged(position)
- }, 700)
- },
- getLock,
- getCross)
- fragment.arguments = bundle
- addBackStack()
- supportFragmentManager
- .beginTransaction()
- .add(R.id.fragment_container, fragment, SUBSCRIPTION_FRAGMENT)
- .addToBackStack(null)
- .commit()
- },
- { position ->
- val sPref = this.getPreferences(Context.MODE_PRIVATE)
- sPref.getBoolean("list_$position", false)
- },
- { lock, cross ->
- // Thread.sleep(2000)
- // Handler().postDelayed({
- Animator.rotateLock(lock, 300)
- Animator.dissapearCross(cross, 300)
- // }, 0)
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement