Like the title said it, the cardview become black with white texts, like inverted. Other cardview which not use Adapter is fine, though.
I have tried this and this but doesn't work. Google doesn't show much result with same situation.
In fragment:
allGroupsView = (RecyclerView) rootView.findViewById(R.id.allGroupsView);
adapterGroup = new AdapterGroup(getActivity().getApplicationContext(), results);
allGroupsView.setAdapter(adapterGroup);
allGroupsView.setLayoutManager(new LinearLayoutManager(getActivity().getApplicationContext()));
As in AdapterGroup
,
public AdapterGroup(Context context, List<DataGroup> results) {
this.mContext = context;
inflater = LayoutInflater.from(mContext);
this.data = results;
}
The links hinted about Context so my guess is I used it wrongly. After going around with context, none of it works. Is there something I missed?