I have my firebase list adapter as follows
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
mListview = (ListView) findViewById(R.id.listview);
mAuth = FirebaseAuth.getInstance();
//the post list shit is happening here
DatabaseReference root = FirebaseDatabase.getInstance().getReference();
FirebaseUser user = mAuth.getCurrentUser();
DatabaseReference postRef = root.child("users").child(user.getUid().toString()).child("posts");
ListAdapter adapter = new FirebaseListAdapter<PostList>(this,PostList.class,android.R.layout.simple_list_item_1,postRef) {
@Override
protected void populateView(View view, PostList postList, int i) {
TextView text = (TextView)view.findViewById(android.R.id.text1);
text.setText(postList.getBody());
}
};
mListview.setAdapter(adapter);
I have a normal xml with a list view and another xml with its card view
my problem is that i cannot find a way to relate my cardview xml file to my activity, so my list just keep showing up as a normal list,
While initializing the firebase list adapter, I found an R.layout_simple_list_item
im not sure exactly how that works and i have googled, nothing explains definitely why i cant just say R_layout_my_card_view_xml
instead. Also, please let me know if i am going about this all wrong.