FirebaseListAdapter无法应用

时间:2018-01-26 16:41:45

标签: android firebase firebaseui

它显示错误FirebaseListAdapter中的FirebaseListAdapter()无法应用 我正在使用compile' com.firebaseui:firebase-ui:3.2.1'

ref = FirebaseDatabase.getInstance().getReference().child("Tutors");
    Query q  =  ref.orderByChild("lat").equalTo("37.42199750000001");


    FirebaseListAdapter<TutorInfo> adapter = new FirebaseListAdapter<TutorInfo>(
            this,
            TutorInfo.class,
            R.layout.lvlabhistory,q
    ) {
        @Override
        protected void populateView(View v, final TutorInfo model, final int position) {

            ((TextView)v.findViewById(R.id.hospital)).setText(model.getName());



            v.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {


                }
            });

        }

    };
    lv.setAdapter(adapter);

enter image description here

0 个答案:

没有答案