But when I run my app. I saw the following errors:
java.lang.UnsupportedOperationException: addView(View) is not supported in AdapterView
at android.widget.AdapterView.addView(AdapterView.java:477)
at org.jetbrains.anko.internals.AnkoInternals.addView(Internals.kt:47)
at com.towneers.www.ui.adapter.SearchFilterCategoryAdapter.getView(SearchFilterCategoryAdapter.kt:88)
at com.jungkai.chessboardlayout.ChessBoardLayout.obtainView(ChessBoardLayout.java:210)
at com.jungkai.chessboardlayout.ChessBoardLayout.onMeasure(ChessBoardLayout.java:173)
at android.view.View.measure(View.java:21998)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6580)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1514)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:806)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:685)
...
I want to use my own custom layout which extends AdapterView
But when I run my app. I saw the following errors:
How to solve this problem? I'm new to anko and not easy to solve this. You can see ChessBoardLayout from here: https://github.com/n42corp/chessboardlayout/blob/master/library/src/main/java/com/jungkai/chessboardlayout/ChessBoardLayout.java