Search in sources :

Example 1 with IssueDashboardItem

use of com.github.pockethub.android.ui.item.issue.IssueDashboardItem in project PocketHub by pockethub.

the class DashboardIssueFragment method onItemClick.

@Override
public void onItemClick(@NonNull Item clickedItem, @NonNull View view) {
    if (clickedItem instanceof IssueDashboardItem) {
        int position = getListAdapter().getAdapterPosition(clickedItem);
        Collection<Issue> issues = new ArrayList<>();
        for (Item item : items) {
            if (item instanceof IssueDashboardItem) {
                issues.add(((IssueItem) item).getIssue());
            }
        }
        startActivityForResult(IssuesViewActivity.createIntent(issues, position), ISSUE_VIEW);
    }
}
Also used : IssueItem(com.github.pockethub.android.ui.item.issue.IssueItem) IssueDashboardItem(com.github.pockethub.android.ui.item.issue.IssueDashboardItem) Item(com.xwray.groupie.Item) Issue(com.meisolsson.githubsdk.model.Issue) ArrayList(java.util.ArrayList) IssueDashboardItem(com.github.pockethub.android.ui.item.issue.IssueDashboardItem)

Aggregations

IssueDashboardItem (com.github.pockethub.android.ui.item.issue.IssueDashboardItem)1 IssueItem (com.github.pockethub.android.ui.item.issue.IssueItem)1 Issue (com.meisolsson.githubsdk.model.Issue)1 Item (com.xwray.groupie.Item)1 ArrayList (java.util.ArrayList)1