nglauber
AndroidView
TextView
CalendarView
@Composable fun MyCalendar() { var currentDate by state { Date() } AndroidView(resId = R.layout.my_layout) { view -> val textView = view.findViewById<TextView>(R.id.txtDate) val calendarView = view.findViewById<CalendarView>(R.id.calendarView) calendarView?.visibility = View.GONE textView?.text = currentDate.toString() textView?.setOnClickListener { calendarView?.let { it.visibility = if (it.visibility == View.VISIBLE) View.GONE else View.VISIBLE } } } }
calendarView?.visibility = View.GONE
John O'Reilly
ppvi
A modern programming language that makes developers happier.