How to Test Array Adapter with Binding with Robolectric and Mockito

Viewed 10

override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {

val binding: DeveloperBinding

if (convertView == null) {

binding = DeveloperBinding.inflate(mInflater, parent, false)

binding.root.tag = binding

} else {

binding = convertView.tag as DeveloperBinding

}

Actually I m getting error in inflating binding. error----> Binary XML file line #6: Layout parameters cannot be null android.view.InflateException: Binary XML file line #6: Layout parameters cannot be null

Caused by: java.lang.NullPointerException: Layout parameters cannot be null

0 Answers
Related