Udacity Firebase コースで FireBase UI ListAdapter を実装することに行き詰まっています。全体が大きく変更され、ActiveListAdapter.java がエラーをスローするようになりました。
メソッド 'super(andoid.app.Activity, java.lang.Class, int, com.google.firebase.database.Query)' を解決できません
誰かがこの問題に遭遇しましたか? それを解決する方法を知っていますか?
これは私の ActiveListAdapter.java です
import android.app.Activity;
import android.view.View;
import android.widget.TextView;
import com.firebase.ui.FirebaseListAdapter;
import com.google.firebase.FirebaseApp;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.Query;
import com.udacity.firebase.shoppinglistplusplus.R;
import com.udacity.firebase.shoppinglistplusplus.model.ShoppingList;
/**
* Populates the list_view_active_lists inside ShoppingListsFragment
*/
public class ActiveListAdapter extends FirebaseListAdapter<ShoppingList> {
/**
* Public constructor that initializes private instance variables when adapter is created
*/
public ActiveListAdapter(Activity activity, Class<ShoppingList> modelClass, int modelLayout,
Query ref) {
super(activity, modelClass, modelLayout, ref);
this.mActivity = activity;
}
/**
* Protected method that populates the view attached to the adapter (list_view_active_lists)
* with items inflated from single_active_list.xml
* populateView also handles data changes and updates the listView accordingly
*/
@Override
protected void populateView(View view, ShoppingList list, int i) {
/**
* Grab the needed Textivews and strings
*/
TextView textViewListName = (TextView) view.findViewById(R.id.text_view_list_name);
TextView textViewCreatedByUser = (TextView) view.findViewById(R.id.text_view_created_by_user);
/* Set the list name and owner */
textViewListName.setText(list.getListName());
textViewCreatedByUser.setText(list.getOwner());
}
}