In IssueFragment.java use ButterKnife framework. That can simply finding view elements in layout, and reducing code when implement listeners.
To use ButterKnife, in gradle, need to add: compile 'com.jakewharton:butterknife:7.0.1'
In onViewCreated(), add:
ButterKnife.bind(this, headerView);
In IssueFragment.java use ButterKnife framework. That can simply finding view elements in layout, and reducing code when implement listeners. To use ButterKnife, in gradle, need to add: compile 'com.jakewharton:butterknife:7.0.1'
Delete: private TextView stateText;
private TextView titleText;
private TextView bodyText;
private TextView authorText;
private TextView createdDateText;
private ImageView creatorAvatar;
private ViewGroup commitsView;
private TextView assigneeText;
private ImageView assigneeAvatar;
private TextView labelsArea;
private View milestoneArea;
private View milestoneProgressArea;
private TextView milestoneText;
4.delete: stateText = (TextView) headerView.findViewById(R.id.tv_state); titleText = (TextView) headerView.findViewById(R.id.tv_issue_title); authorText = (TextView) headerView.findViewById(R.id.tv_issue_author); createdDateText = (TextView) headerView .findViewById(R.id.tv_issue_creation_date); creatorAvatar = (ImageView) headerView.findViewById(R.id.iv_avatar); commitsView = (ViewGroup) headerView.findViewById(R.id.ll_issue_commits); assigneeText = (TextView) headerView.findViewById(R.id.tv_assignee_name); assigneeAvatar = (ImageView) headerView .findViewById(R.id.iv_assignee_avatar); labelsArea = (TextView) headerView.findViewById(R.id.tv_labels); milestoneArea = headerView.findViewById(R.id.ll_milestone); milestoneText = (TextView) headerView.findViewById(R.id.tv_milestone); milestoneProgressArea = headerView.findViewById(R.id.v_closed); bodyText = (TextView) headerView.findViewById(R.id.tv_issue_body); bodyText.setMovementMethod(SelectableLinkMovementMethod.getInstance());