Custom setter in Kotlin : <p>I want to do something like this:</p>

<pre><code>public void setContentView(int resId) {
    this.content = itemView.findViewById(resId);
}
</code></pre>

<p>but don't know how. Any solutions to fix my code below?</p>

<pre><code>private var contentView: AppCompatEditText? = null
set(value: Int) {field = v.findViewById(value)} // value in setter is AppCompatEditText? type not Int
</code></pre>
