Search in sources :

Example 1 with SearchCode

use of com.meisolsson.githubsdk.model.SearchCode in project gh4a by slapperwan.

the class SearchFragment method onItemClick.

@Override
public void onItemClick(Object item) {
    if (item instanceof Repository) {
        Repository repository = (Repository) item;
        startActivity(RepositoryActivity.makeIntent(getActivity(), repository));
    } else if (item instanceof SearchCode) {
        openFileViewer((SearchCode) item, -1);
    } else {
        User user = (User) item;
        startActivity(UserActivity.makeIntent(getActivity(), user));
    }
}
Also used : Repository(com.meisolsson.githubsdk.model.Repository) User(com.meisolsson.githubsdk.model.User) SearchCode(com.meisolsson.githubsdk.model.SearchCode)

Aggregations

Repository (com.meisolsson.githubsdk.model.Repository)1 SearchCode (com.meisolsson.githubsdk.model.SearchCode)1 User (com.meisolsson.githubsdk.model.User)1