Я включил библиотеку Kotlin в свой проект Java. Используя рекомендацию из других сообщений, я могу получить проект, чтобы скомпилировать, и это половина работает. Я получаю систему.constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {}
< /code>
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
val inflater = context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
inflater.inflate(R.layout.view_agenda, this, true)
(findViewById(R.id.refresh_layout) as SwipeRefreshLayout).isEnabled = false
}
< /code>
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
...
val inflater = context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
inflater.inflate(R.layout.view_agendacalendar, this, true)
}
< /code>
What could be causing the error when trying to inflate a layout from the kotlin library?
Any advice would be greatly appreciated.
Подробнее здесь: https://stackoverflow.com/questions/795 ... va-project