// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintInflateParamsInspection import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.BaseAdapter @Suppress("UsePropertyAccessSyntax", "UNUSED_VARIABLE", "unused", "UNUSED_PARAMETER", "DEPRECATION") abstract class LayoutInflationTest : BaseAdapter() { lateinit var mInflater: LayoutInflater override fun getView(position: Int, convertView: View, parent: ViewGroup): View { var view = convertView view = mInflater.inflate(R.layout.your_layout, null) view = mInflater.inflate(R.layout.your_layout, null, true) view = mInflater.inflate(R.layout.your_layout, parent) view = WeirdInflater.inflate(view, null) return view } object WeirdInflater { fun inflate(view: View, parent: View?) = view } object R { object layout { val your_layout = 1 } } } @Suppress("UsePropertyAccessSyntax", "UNUSED_VARIABLE", "unused", "UNUSED_PARAMETER", "DEPRECATION") abstract class LayoutInflationTest2 : BaseAdapter() { lateinit var mInflater: LayoutInflater override fun getView(position: Int, convertView: View, parent: ViewGroup): View? { return if (true) { mInflater.inflate(R.layout.your_layout, parent) } else { null } } object R { object layout { val your_layout = 1 } } }