Android 如何使用firebase UI从firebase检索数据

Android 如何使用firebase UI从firebase检索数据,android,Android,有人能帮我从每个孩子那里检索数据吗?除了医生档案。 我是否需要为每个孩子创建单独的类,或者有其他方法来解决这个问题。 短暂性脑缺血发作 当然,您必须具有表示对象的类,例如: @IgnoreExtraProperties public class Psychiatrist { private String name; private String city; private String hospital; public Psychiatrist() {

有人能帮我从每个孩子那里检索数据吗?除了医生档案。 我是否需要为每个孩子创建单独的类,或者有其他方法来解决这个问题。 短暂性脑缺血发作

当然,您必须具有表示对象的类,例如:

@IgnoreExtraProperties
public class Psychiatrist {

    private String name;
    private String city;
    private String hospital;

    public Psychiatrist() {
         // required empty constructor
    }

    public Psychiatrist(String name, String city, String hospital) {
        this.name = name;
        this.city = city;
        this.hospital = hospital;
    }

    public String getName() {
        return name;
    }

    public String getCity() {
        return city;
    }

    public String getHospital() {
        return hospital;
    }
}

在这里检查我的答案我是否需要为每个孩子创建类??其他孩子是否有相同的字段名称、城市、医院?如果是,那么您可能可以为每个孩子创建一个类,但您应该再添加一个字段来描述儿童精神病医生、心脏病专家等的类型。。。。我希望你明白了
@IgnoreExtraProperties
public class Psychiatrist {

    private String name;
    private String city;
    private String hospital;

    public Psychiatrist() {
         // required empty constructor
    }

    public Psychiatrist(String name, String city, String hospital) {
        this.name = name;
        this.city = city;
        this.hospital = hospital;
    }

    public String getName() {
        return name;
    }

    public String getCity() {
        return city;
    }

    public String getHospital() {
        return hospital;
    }
}