阅读背景:

外投射类型'ArrayList<*>'禁止使用'public open fun add(index: Int, element: E):在java.util.ArrayList'中定义的单元'

来源:互联网 

I have this snippets:

我有这样的片段:

class RecyclerViewAdapter internal constructor(
    val clazz: Class<out RecyclerViewViewHolder>,
    val layout: Int,
    var dataList: MutableList<*>)
...
...
...
fun RecyclerView.getDataList() : ArrayList<*> {
  return (adapter as RecyclerViewAdapter).dataList as ArrayList<*>
}
...
...
...
class Recycl



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: