[英]I have error in my code, which is for passing aduio url (Retrieved from Firebase) from a adapter class to a fragment
You seem to be mixing method parameter concepts.您似乎在混合方法参数概念。 You don't need to declare a variable type when invoking a method ie: new string();
调用方法时不需要声明变量类型,即: new string();
This is typically done for defining the function adapter MyAdaptor(string input){}
Simply removing the type definition will change options
from a parameter to a variable这通常用于定义函数adapter MyAdaptor(string input){}
简单地删除类型定义会将options
从参数更改为变量
new recyclerViewAdapter(options);
Just ensure that your "options" are declared and defined before trying to use it.在尝试使用它之前,只需确保您的“选项”已声明和定义。
Definition定义
Creating a new FirebaseRecyclerOptions typically follows this structure创建新的 FirebaseRecyclerOptions 通常遵循此结构
FirebaseRecyclerOptions<model> options =
new FirebaseRecyclerOptions.Builder<model>()
.setQuery(query, model.class)
.build();
Source: https://github.com/firebase/FirebaseUI-Android/blob/master/database/README.md来源: https : //github.com/firebase/FirebaseUI-Android/blob/master/database/README.md
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.