I created a new class in Kotlin extending RelativeLayout as
class FullPlayerEdpisodeViewKt @JvmOverloads constructor(context: Context, appCMSPresenter: AppCMSPresenter) : RelativeLayout(context) {
private var lpView: LayoutParams? = null
init {
lpView = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
layoutParams = lpView
setBackgroundColor(Color.BLACK)
if (appCMSPresenter.getTrailerPlayerView().parent != null) {
appCMSPresenter.episodePlayerViewParent = appCMSPresenter.getTrailerPlayerView().parent as ViewGroup
(appCMSPresenter.getTrailerPlayerView().parent as ViewGroup).removeView(appCMSPresenter.getTrailerPlayerView())
}
appCMSPresenter.getTrailerPlayerView().layoutParams = lpView
appCMSPresenter.getTrailerPlayerView().updateFullscreenButtonState(Configuration.ORIENTATION_LANDSCAPE)
appCMSPresenter.getTrailerPlayerView().getPlayerView().controller.hide()
visibility = View.VISIBLE
appCMSPresenter.getTrailerPlayerView().isClickable = true
addView(appCMSPresenter.getTrailerPlayerView())
}
}
The class resides in package package com.mki.views.customviews;
Calling it from Java class as
RelativeLayout relativeLayoutFull = new FullPlayerEdpisodeViewKt(currentActivity, this);
I get the error
cannot find symbol
import com.mki.views.customviews.FullPlayerEdpisodeViewKt;
^
symbol: class FullPlayerEdpisodeViewKt
location: package com.mki.views.customviews
What is the issue here?