You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello !
I'm trying to use your component in a Kotlin project but I cannot have these events fired when I click anywhere in the visible control...
Here is the Kotlin code :
package com.reuniware.beautylogic
import android.os.Bundle
import android.util.Log
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.framgia.library.calendardayview.EventView
import com.framgia.library.calendardayview.EventView.OnEventClickListener
import com.framgia.library.calendardayview.data.IEvent
import com.framgia.library.calendardayview.decoration.CdvDecorationDefault
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {
val events = ArrayList<IEvent>()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
(dayView.decoration as CdvDecorationDefault).setOnEventClickListener(
object : OnEventClickListener {
override fun onEventClick(view: EventView, data: IEvent) {
Log.e("TAG", "onEventClick:" + data.name)
}
override fun onEventViewClick(
view: View,
eventView: EventView,
data: IEvent
) {
Log.e("TAG", "onEventViewClick:" + data.name)
if (data is IEvent) { // change event (ex: set event color)
dayView.setEvents(events)
}
}
})
dayView.setEvents(events)
}
}
Hello !
I'm trying to use your component in a Kotlin project but I cannot have these events fired when I click anywhere in the visible control...
Here is the Kotlin code :
And here is the code of the XML layout file :
Thanks in advance !
The text was updated successfully, but these errors were encountered: