Search in sources :

Example 1 with BaseActivity

use of com.github.pockethub.android.ui.BaseActivity in project PocketHub by pockethub.

the class CommitListFragment method switchRefs.

private void switchRefs() {
    if (ref == null) {
        return;
    }
    if (dialog == null) {
        dialog = new RefDialog((BaseActivity) getActivity(), REF_UPDATE, repository);
    }
    GitReference reference = GitReference.builder().ref(ref).build();
    dialog.show(reference);
}
Also used : RefDialog(com.github.pockethub.android.ui.ref.RefDialog) BaseActivity(com.github.pockethub.android.ui.BaseActivity) GitReference(com.meisolsson.githubsdk.model.git.GitReference)

Example 2 with BaseActivity

use of com.github.pockethub.android.ui.BaseActivity in project PocketHub by pockethub.

the class IssueFragment method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Bundle args = getArguments();
    repositoryId = InfoUtils.createRepoFromData(args.getString(EXTRA_REPOSITORY_OWNER), args.getString(EXTRA_REPOSITORY_NAME));
    issueNumber = args.getInt(EXTRA_ISSUE_NUMBER);
    user = args.getParcelable(EXTRA_USER);
    canWrite = args.getBoolean(EXTRA_CAN_WRITE_REPO, false);
    BaseActivity dialogActivity = (BaseActivity) getActivity();
    ProgressObserverAdapter<Issue> observer = new ProgressObserverAdapter<Issue>(getActivity()) {

        @Override
        public void onNext(Issue issue) {
            super.onNext(issue);
            updateHeader(issue);
            refreshIssue();
        }
    };
    milestoneTask = new EditMilestoneTask(dialogActivity, repositoryId, issueNumber, observer);
    assigneeTask = new EditAssigneeTask(dialogActivity, repositoryId, issueNumber, observer);
    labelsTask = new EditLabelsTask(dialogActivity, repositoryId, issueNumber, observer);
    stateTask = new EditStateTask(dialogActivity, repositoryId, issueNumber, observer);
}
Also used : Issue(com.meisolsson.githubsdk.model.Issue) FullIssue(com.github.pockethub.android.core.issue.FullIssue) Bundle(android.os.Bundle) ProgressObserverAdapter(com.github.pockethub.android.rx.ProgressObserverAdapter) BaseActivity(com.github.pockethub.android.ui.BaseActivity)

Aggregations

BaseActivity (com.github.pockethub.android.ui.BaseActivity)2 Bundle (android.os.Bundle)1 FullIssue (com.github.pockethub.android.core.issue.FullIssue)1 ProgressObserverAdapter (com.github.pockethub.android.rx.ProgressObserverAdapter)1 RefDialog (com.github.pockethub.android.ui.ref.RefDialog)1 Issue (com.meisolsson.githubsdk.model.Issue)1 GitReference (com.meisolsson.githubsdk.model.git.GitReference)1