Skip to content

Is there a way to show an event's description when I click on it ? #166

@Oumaima-abm

Description

@Oumaima-abm

I want to show the whole event's details that are in the BaseCalendarEvent in an Alert Dialog when i click on a particular event but when I try to implement the onEventSelected, it only uses a CalendarEvent variable so I cannot access the even'ts description
Here is the code

override fun onEventSelected(event: CalendarEvent?) {
        Toast.makeText(getApplicationContext(),"EVENT SELECTED",Toast.LENGTH_SHORT);
        val alertDialog = AlertDialog.Builder(this)
            //set icon
            .setIcon(android.R.drawable.ic_menu_agenda)
            //set title
            .setTitle(event!!.title)
            //set message
            .setMessage("event.description")
            //set positive button
            .setPositiveButton("Okay", DialogInterface.OnClickListener { dialog, i ->
                //set what would happen when positive button is clicked
                finish()
            })
            .show()
    }

Is there a way to get the event's description?
Your help would be much appreciated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions