Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable smart cast highlight Kotlin?

IDE : Android Studio 3.3

I am doing kotlin smart casting in RecyclerView adapter on ViewHolder.

override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
        holder as ViewHolder

Now every mention of viewholder is being highlighted, with text on hover saying "Smart Cast to ..." This is not a problem but really annoying. How can I disable this highlight feature?

screenshot

like image 510
hasn Avatar asked Apr 06 '19 08:04

hasn


2 Answers

In the IDE prefererences, see:

Editor → Color scheme → Kotlin → Smart-casts → Smart-cast value

If you want to disable value smart-cast highlighting, just uncheck Background.

You may want to configure the other kinds of smart-casts, too.

enter image description here

like image 149
hotkey Avatar answered Nov 14 '22 05:11

hotkey


go to File -> Settings -> Editor -> Color Scheme -> Java/Kotlin -> Classes and Interfaces

You should be able to find color scheme for classes here. Hope it helps.

like image 1
Sahil Avatar answered Nov 14 '22 05:11

Sahil