Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Oumaima-abm opened this issue Feb 3, 2021 · 0 comments
Open

Comments

@Oumaima-abm
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant