File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
java/com/contextu/al/confetti Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -17,17 +17,15 @@ import java.util.concurrent.TimeUnit
1717
1818class ConfettiGuideBlocks (private val activity : Activity ): Dialog(activity) {
1919
20+ private lateinit var viewKonfetti: KonfettiView
2021 init {
2122 requestWindowFeature(Window .FEATURE_NO_TITLE )
2223 window?.setBackgroundDrawable(ColorDrawable (Color .TRANSPARENT ))
2324 window?.setDimAmount(0f )
2425 }
25- override fun onCreate (savedInstanceState : Bundle ) {
26+ override fun onCreate (savedInstanceState : Bundle ? ) {
2627 super .onCreate(savedInstanceState)
2728 setContentView(R .layout.konfetti)
28- }
29-
30- fun show (onStart : (inputStart: Unit ) -> Unit , onEnd : (inputEnd: Unit ) -> Unit ){
3129 val party = Party (
3230 speed = 0f ,
3331 maxSpeed = 30f ,
@@ -37,9 +35,11 @@ class ConfettiGuideBlocks(private val activity: Activity): Dialog(activity) {
3735 position = Position .Relative (0.5 , 0.3 ),
3836 emitter = Emitter (duration = 100 , TimeUnit .MILLISECONDS ).max(100 )
3937 )
40- val viewKonfetti = findViewById<KonfettiView >(R .id.konfettiView)
38+ viewKonfetti = findViewById<KonfettiView >(R .id.konfettiView)
4139 viewKonfetti.start(party)
40+ }
4241
42+ fun show (onStart : (inputStart: Unit ) -> Unit , onEnd : (inputEnd: Unit ) -> Unit ){
4343 viewKonfetti.onParticleSystemUpdateListener = object : OnParticleSystemUpdateListener {
4444 override fun onParticleSystemEnded (view : KonfettiView , party : Party , activeSystems : Int ) {
4545 onEnd
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22
3- <androidx .constraintlayout.widget.ConstraintLayout xmlns : android =" http://schemas.android.com/apk/res/android"
3+ <androidx .constraintlayout.widget.ConstraintLayout
4+ xmlns : android =" http://schemas.android.com/apk/res/android"
45 android : layout_width =" match_parent"
56 android : layout_height =" match_parent"
67 android : background =" @android:color/transparent" >
You can’t perform that action at this time.
0 commit comments