ButterKnife inject fail in fragment (#198)
Closed
David hao opened 8 years ago
Due Date
2016-07-21

ButterKnife inject fail in fragment ,so null pointer occurs

Bartosz Małkowski commented 8 years ago

What fragment?

Stacktrace please

David hao commented 8 years ago

RosterItemFragment.java recyclerView is nullpointer .

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.fragment_rosteritem_list, container, false);
ButterKnife.bind(this, root);
// Set the adapter
recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
recyclerView.setLayoutManager(new LinearLayoutManager(root.getContext()));
this.adapter = new MyRosterItemRecyclerViewAdapter(getContext(), null, mListener, mItemLongClickListener) {
@Override
protected void onContentChanged() {
refreshRoster();
}
};
recyclerView.setAdapter(adapter);
registerForContextMenu(recyclerView);
refreshRoster();
return root;
}
David hao commented 8 years ago

David hao wrote:

ButterKnife inject fail in fragment ,so null pointer occurs

RosterItemFragment.java recyclerView is nullpointer .

Bartosz Małkowski commented 8 years ago

ButterKnife doesn't works with Jack compiler, so I removed it.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
4335
Version
3.0.0
Spent time
8h
Issue Votes (0)
Watchers (0)
Reference
tigase/_clients/stork#198
Please wait...
Page is in error, reload to recover