├── app ├── libs │ └── .gitignore ├── assets │ ├── VERSION-code-mirror │ ├── trans_bg.gif │ ├── octicons-regular-webfont.ttf │ ├── mode │ │ ├── rpm │ │ │ ├── spec │ │ │ │ └── spec.css │ │ │ └── changes │ │ │ │ └── changes.js │ │ ├── tiddlywiki │ │ │ └── tiddlywiki.css │ │ ├── tiki │ │ │ └── tiki.css │ │ ├── diff │ │ │ └── diff.js │ │ ├── vbscript │ │ │ └── vbscript.js │ │ ├── pascal │ │ │ └── LICENSE │ │ ├── python │ │ │ └── LICENSE.txt │ │ ├── perl │ │ │ └── LICENSE │ │ ├── xquery │ │ │ └── LICENSE │ │ ├── vb │ │ │ └── LICENSE.txt │ │ ├── coffeescript │ │ │ └── LICENSE │ │ ├── sieve │ │ │ └── LICENSE │ │ ├── jinja2 │ │ │ └── jinja2.js │ │ ├── r │ │ │ └── LICENSE │ │ └── ruby │ │ │ └── LICENSE │ ├── source-editor.html │ ├── source-editor.css │ └── LICENSE ├── res │ ├── drawable-hdpi │ │ ├── app_icon.png │ │ ├── menu_edit.png │ │ ├── menu_star.png │ │ ├── action_gist.png │ │ ├── action_save.png │ │ ├── menu_delete.png │ │ ├── menu_filter.png │ │ ├── menu_random.png │ │ ├── menu_refresh.png │ │ ├── menu_share.png │ │ ├── action_comment.png │ │ ├── action_create.png │ │ ├── action_refresh.png │ │ ├── action_search.png │ │ ├── menu_bookmark.png │ │ ├── action_bookmark.png │ │ ├── action_dashboard.png │ │ ├── menu_issue_close.png │ │ ├── menu_issue_open.png │ │ ├── menu_issue_reopen.png │ │ └── menu_delete_history.png │ ├── drawable-ldpi │ │ ├── app_icon.png │ │ ├── menu_edit.png │ │ ├── menu_star.png │ │ ├── action_gist.png │ │ ├── action_save.png │ │ ├── menu_delete.png │ │ ├── menu_filter.png │ │ ├── menu_random.png │ │ ├── menu_refresh.png │ │ ├── menu_share.png │ │ ├── action_comment.png │ │ ├── action_create.png │ │ ├── action_search.png │ │ ├── menu_bookmark.png │ │ ├── action_bookmark.png │ │ ├── action_dashboard.png │ │ ├── menu_issue_close.png │ │ ├── menu_issue_open.png │ │ ├── menu_issue_reopen.png │ │ └── menu_delete_history.png │ ├── drawable-mdpi │ │ ├── app_icon.png │ │ ├── menu_edit.png │ │ ├── menu_star.png │ │ ├── action_gist.png │ │ ├── action_save.png │ │ ├── menu_delete.png │ │ ├── menu_filter.png │ │ ├── menu_random.png │ │ ├── menu_refresh.png │ │ ├── menu_share.png │ │ ├── action_comment.png │ │ ├── action_create.png │ │ ├── action_refresh.png │ │ ├── action_search.png │ │ ├── menu_bookmark.png │ │ ├── action_bookmark.png │ │ ├── action_dashboard.png │ │ ├── menu_issue_close.png │ │ ├── menu_issue_open.png │ │ ├── menu_issue_reopen.png │ │ └── menu_delete_history.png │ ├── drawable-xhdpi │ │ ├── app_icon.png │ │ ├── action_gist.png │ │ ├── action_save.png │ │ ├── menu_delete.png │ │ ├── menu_edit.png │ │ ├── menu_filter.png │ │ ├── menu_random.png │ │ ├── menu_share.png │ │ ├── menu_star.png │ │ ├── action_create.png │ │ ├── action_search.png │ │ ├── menu_bookmark.png │ │ ├── menu_refresh.png │ │ ├── action_bookmark.png │ │ ├── action_comment.png │ │ ├── action_dashboard.png │ │ ├── action_refresh.png │ │ ├── menu_issue_close.png │ │ ├── menu_issue_open.png │ │ ├── menu_issue_reopen.png │ │ └── menu_delete_history.png │ ├── drawable-nodpi │ │ ├── tab_left.9.png │ │ ├── tab_right.9.png │ │ ├── dropdown_gist.png │ │ ├── gravatar_icon.png │ │ ├── spinner_inner.png │ │ ├── spinner_outer.png │ │ ├── tab_left_right.9.png │ │ ├── tab_selected.9.png │ │ ├── dropdown_bookmark.png │ │ ├── dropdown_dashboard.png │ │ └── image_loading_icon.png │ ├── menu │ │ ├── repository_share.xml │ │ ├── user_follow.xml │ │ ├── code_view.xml │ │ ├── login.xml │ │ ├── issue_filter.xml │ │ ├── refresh.xml │ │ ├── gist_create.xml │ │ ├── home.xml │ │ ├── comment.xml │ │ ├── issue_edit.xml │ │ ├── repository.xml │ │ ├── gists.xml │ │ ├── search.xml │ │ ├── file_view.xml │ │ ├── commit_view.xml │ │ ├── gist_view.xml │ │ ├── issue_view.xml │ │ └── issues.xml │ ├── values │ │ ├── roboguice.xml │ │ └── typeface.xml │ ├── xml │ │ ├── sync_adapter.xml │ │ ├── authenticator.xml │ │ ├── searchable_issues.xml │ │ └── searchable_repos.xml │ ├── layout │ │ ├── pager.xml │ │ ├── gist_file_view.xml │ │ ├── list_divider.xml │ │ ├── list_view.xml │ │ ├── commit_comments.xml │ │ ├── footer_separator.xml │ │ ├── issues_filter_header.xml │ │ ├── commit_details_header.xml │ │ ├── comment_item.xml │ │ ├── commit_comment_item.xml │ │ ├── dialog_list_view.xml │ │ ├── commit_compare_file_details_header.xml │ │ ├── commit_file_details_header.xml │ │ ├── diff_comment_item.xml │ │ ├── commit_diff_line.xml │ │ ├── commit.xml │ │ ├── commit_compare.xml │ │ ├── commit_parent_item.xml │ │ ├── tabbed_progress_pager.xml │ │ ├── loading_item.xml │ │ ├── comment_create.xml │ │ ├── milestone.xml │ │ ├── user_item.xml │ │ ├── issue_search.xml │ │ ├── issues_filter_list.xml │ │ ├── repo_search.xml │ │ ├── label_item.xml │ │ ├── repo_issue_list.xml │ │ ├── gist_file_item.xml │ │ ├── progress_dialog.xml │ │ ├── repo_code.xml │ │ ├── user_repo_item.xml │ │ ├── commit_file_view.xml │ │ ├── path_item.xml │ │ ├── comment_list.xml │ │ ├── item_list.xml │ │ ├── org_item.xml │ │ ├── org_dropdown_item.xml │ │ ├── commit_diff_list.xml │ │ ├── commit_file_item.xml │ │ ├── ref_footer.xml │ │ ├── collaborator_item.xml │ │ ├── commit_list.xml │ │ └── issues_filter_item.xml │ ├── color │ │ ├── tab_icon_colors.xml │ │ └── tab_text_colors.xml │ └── drawable │ │ ├── edit_text_cursor.xml │ │ ├── diff_add_background.xml │ │ ├── list_item_background.xml │ │ ├── diff_marker_background.xml │ │ ├── diff_remove_background.xml │ │ ├── footer_selector.xml │ │ ├── section_selector.xml │ │ ├── milestone_closed_background.xml │ │ ├── tab_selector_left.xml │ │ ├── tab_selector_right.xml │ │ ├── tab_selector_left_right.xml │ │ ├── list_divider.xml │ │ ├── actionbar_spinner.xml │ │ ├── sign_up_background.xml │ │ ├── section_background.xml │ │ ├── section_selected_background.xml │ │ ├── spinner.xml │ │ ├── milestone_background.xml │ │ ├── actionbar_background.xml │ │ ├── inset_background.xml │ │ ├── edit_text_background.xml │ │ ├── pager_title_background.xml │ │ └── header_separator_background.xml ├── project.properties ├── .classpath ├── .project └── src │ └── main │ └── java │ └── com │ └── github │ └── mobile │ ├── core │ ├── OnLoadListener.java │ ├── user │ │ ├── UserPager.java │ │ └── UserUriMatcher.java │ ├── commit │ │ └── CommitMatch.java │ ├── UrlMatcher.java │ ├── gist │ │ ├── GistPager.java │ │ ├── GistUrlMatcher.java │ │ └── GistEventMatcher.java │ └── issue │ │ └── IssuePager.java │ ├── ResultCodes.java │ ├── ui │ ├── FragmentProvider.java │ ├── user │ │ ├── OrganizationSelectionListener.java │ │ ├── EventPager.java │ │ ├── MyFollowersFragment.java │ │ ├── UserCreatedNewsFragment.java │ │ ├── FollowersFragment.java │ │ ├── FollowingFragment.java │ │ ├── MyFollowingFragment.java │ │ ├── OrganizationSelectionProvider.java │ │ ├── UserReceivedNewsFragment.java │ │ ├── OrganizationNewsFragment.java │ │ └── UserFollowersFragment.java │ ├── TextWatcherAdapter.java │ ├── DialogResultListener.java │ ├── gist │ │ ├── StarredGistsFragment.java │ │ └── PublicGistsFragment.java │ └── commit │ │ └── CommitFileComparator.java │ ├── RequestFuture.java │ ├── sync │ └── SyncAdapterService.java │ ├── accounts │ ├── AccountConstants.java │ └── AccountAuthenticatorService.java │ └── util │ └── MarkdownUtils.java ├── .idea ├── .name └── vcs.xml ├── default.properties ├── .gitignore ├── integration-tests ├── project.properties ├── .classpath ├── AndroidManifest.xml ├── .project └── src │ └── main │ └── java │ └── com │ └── github │ └── mobile │ └── tests │ ├── FiltersViewActivityTest.java │ └── repo │ └── RepositorySearchActivityTest.java └── .travis.yml /app/libs/.gitignore: -------------------------------------------------------------------------------- 1 | ** -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | github-android-parent -------------------------------------------------------------------------------- /app/assets/VERSION-code-mirror: -------------------------------------------------------------------------------- 1 | 2.3.5 -------------------------------------------------------------------------------- /app/assets/trans_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/assets/trans_bg.gif -------------------------------------------------------------------------------- /app/res/drawable-hdpi/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/app_icon.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/menu_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/menu_edit.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/menu_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/menu_star.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/app_icon.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/menu_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/menu_edit.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/menu_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/menu_star.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/app_icon.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/menu_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/menu_edit.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/menu_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/menu_star.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/app_icon.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/action_gist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/action_gist.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/action_save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/action_save.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/menu_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/menu_delete.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/menu_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/menu_filter.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/menu_random.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/menu_random.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/menu_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/menu_refresh.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/menu_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/menu_share.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/action_gist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/action_gist.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/action_save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/action_save.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/menu_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/menu_delete.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/menu_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/menu_filter.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/menu_random.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/menu_random.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/menu_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/menu_refresh.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/menu_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/menu_share.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/action_gist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/action_gist.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/action_save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/action_save.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/menu_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/menu_delete.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/menu_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/menu_filter.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/menu_random.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/menu_random.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/menu_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/menu_refresh.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/menu_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/menu_share.png -------------------------------------------------------------------------------- /app/res/drawable-nodpi/tab_left.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-nodpi/tab_left.9.png -------------------------------------------------------------------------------- /app/res/drawable-nodpi/tab_right.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-nodpi/tab_right.9.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/action_gist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/action_gist.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/action_save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/action_save.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/menu_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/menu_delete.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/menu_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/menu_edit.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/menu_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/menu_filter.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/menu_random.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/menu_random.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/menu_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/menu_share.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/menu_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/menu_star.png -------------------------------------------------------------------------------- /app/assets/octicons-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/assets/octicons-regular-webfont.ttf -------------------------------------------------------------------------------- /app/res/drawable-hdpi/action_comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/action_comment.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/action_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/action_create.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/action_refresh.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/action_search.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/menu_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/menu_bookmark.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/action_comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/action_comment.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/action_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/action_create.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/action_search.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/menu_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/menu_bookmark.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/action_comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/action_comment.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/action_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/action_create.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/action_refresh.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/action_search.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/menu_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/menu_bookmark.png -------------------------------------------------------------------------------- /app/res/drawable-nodpi/dropdown_gist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-nodpi/dropdown_gist.png -------------------------------------------------------------------------------- /app/res/drawable-nodpi/gravatar_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-nodpi/gravatar_icon.png -------------------------------------------------------------------------------- /app/res/drawable-nodpi/spinner_inner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-nodpi/spinner_inner.png -------------------------------------------------------------------------------- /app/res/drawable-nodpi/spinner_outer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-nodpi/spinner_outer.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/action_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/action_create.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/action_search.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/menu_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/menu_bookmark.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/menu_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/menu_refresh.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/action_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/action_bookmark.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/action_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/action_dashboard.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/menu_issue_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/menu_issue_close.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/menu_issue_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/menu_issue_open.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/menu_issue_reopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/menu_issue_reopen.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/action_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/action_bookmark.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/action_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/action_dashboard.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/menu_issue_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/menu_issue_close.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/menu_issue_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/menu_issue_open.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/menu_issue_reopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/menu_issue_reopen.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/action_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/action_bookmark.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/action_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/action_dashboard.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/menu_issue_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/menu_issue_close.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/menu_issue_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/menu_issue_open.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/menu_issue_reopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/menu_issue_reopen.png -------------------------------------------------------------------------------- /app/res/drawable-nodpi/tab_left_right.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-nodpi/tab_left_right.9.png -------------------------------------------------------------------------------- /app/res/drawable-nodpi/tab_selected.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-nodpi/tab_selected.9.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/action_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/action_bookmark.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/action_comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/action_comment.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/action_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/action_dashboard.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/action_refresh.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/menu_issue_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/menu_issue_close.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/menu_issue_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/menu_issue_open.png -------------------------------------------------------------------------------- /app/res/drawable-hdpi/menu_delete_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-hdpi/menu_delete_history.png -------------------------------------------------------------------------------- /app/res/drawable-ldpi/menu_delete_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-ldpi/menu_delete_history.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/menu_delete_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-mdpi/menu_delete_history.png -------------------------------------------------------------------------------- /app/res/drawable-nodpi/dropdown_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-nodpi/dropdown_bookmark.png -------------------------------------------------------------------------------- /app/res/drawable-nodpi/dropdown_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-nodpi/dropdown_dashboard.png -------------------------------------------------------------------------------- /app/res/drawable-nodpi/image_loading_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-nodpi/image_loading_icon.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/menu_issue_reopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/menu_issue_reopen.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/menu_delete_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/android/master/app/res/drawable-xhdpi/menu_delete_history.png -------------------------------------------------------------------------------- /default.properties: -------------------------------------------------------------------------------- 1 | # A dummy file to force the Android Emulator Plugin to install SDK 15 2 | # which we need for compiling against ABS 4. 3 | 4 | target=android-16 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/project.properties: -------------------------------------------------------------------------------- 1 | # Project target. 2 | target=android-16 3 | android.library=false 4 | android.library.reference.1=../../Android-ViewPagerIndicator/library 5 | android.library.reference.2=../../ActionBarSherlock/library 6 | android.library.reference.3=../../wishlist/lib 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | */target 2 | target 3 | tmp 4 | *~ 5 | bin 6 | */test-output 7 | temp-testng-customsuite.xml 8 | **pom.xml.releaseBackup 9 | release.properties 10 | gen 11 | */seed.txt 12 | notes 13 | logs 14 | gen-external-apklibs 15 | .idea 16 | *.iml 17 | .DS_Store 18 | *.swp 19 | -------------------------------------------------------------------------------- /app/assets/mode/rpm/spec/spec.css: -------------------------------------------------------------------------------- 1 | .cm-s-default span.cm-preamble {color: #b26818; font-weight: bold;} 2 | .cm-s-default span.cm-macro {color: #b218b2;} 3 | .cm-s-default span.cm-section {color: green; font-weight: bold;} 4 | .cm-s-default span.cm-script {color: red;} 5 | .cm-s-default span.cm-issue {color: yellow;} 6 | -------------------------------------------------------------------------------- /app/assets/mode/tiddlywiki/tiddlywiki.css: -------------------------------------------------------------------------------- 1 | span.cm-underlined { 2 | text-decoration: underline; 3 | } 4 | span.cm-strikethrough { 5 | text-decoration: line-through; 6 | } 7 | span.cm-brace { 8 | color: #170; 9 | font-weight: bold; 10 | } 11 | span.cm-table { 12 | color: blue; 13 | font-weight: bold; 14 | } 15 | -------------------------------------------------------------------------------- /app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/assets/source-editor.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /integration-tests/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system use, 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | # Project target. 11 | target=android-16 12 | -------------------------------------------------------------------------------- /app/assets/source-editor.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 0; 3 | margin: 0; 4 | font-size: 12px; 5 | } 6 | 7 | .CodeMirror { 8 | overflow-x: scroll; 9 | line-height: 1.4em; 10 | } 11 | 12 | .CodeMirror-scroll { 13 | height: auto; 14 | overflow-y: hidden; 15 | } 16 | 17 | img { 18 | display: block; 19 | border: 1px solid #999; 20 | padding: 1px; 21 | margin-top: 10px; 22 | margin-left: 10px; 23 | background: url("trans_bg.gif") right bottom #EEE; 24 | } 25 | -------------------------------------------------------------------------------- /integration-tests/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/assets/mode/tiki/tiki.css: -------------------------------------------------------------------------------- 1 | .cm-tw-syntaxerror { 2 | color: #FFFFFF; 3 | background-color: #990000; 4 | } 5 | 6 | .cm-tw-deleted { 7 | text-decoration: line-through; 8 | } 9 | 10 | .cm-tw-header5 { 11 | font-weight: bold; 12 | } 13 | .cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/ 14 | padding-left: 10px; 15 | } 16 | 17 | .cm-tw-box { 18 | border-top-width: 0px ! important; 19 | border-style: solid; 20 | border-width: 1px; 21 | border-color: inherit; 22 | } 23 | 24 | .cm-tw-underline { 25 | text-decoration: underline; 26 | } -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: oraclejdk7 3 | 4 | notifications: 5 | email: false 6 | 7 | before_install: 8 | - sudo apt-get update -qq 9 | - if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null; fi 10 | - wget http://dl.google.com/android/android-sdk_r21.1-linux.tgz 11 | - tar -zxf android-sdk_r21.1-linux.tgz 12 | - export ANDROID_HOME=$PWD/android-sdk-linux 13 | - export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools 14 | - android update sdk --filter platform-tools,android-16 --no-ui --force > /dev/null 15 | -------------------------------------------------------------------------------- /integration-tests/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | -------------------------------------------------------------------------------- /app/assets/mode/rpm/changes/changes.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("changes", function(config, modeConfig) { 2 | var headerSeperator = /^-+$/; 3 | var headerLine = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /; 4 | var simpleEmail = /^[\w+.-]+@[\w.-]+/; 5 | 6 | return { 7 | token: function(stream) { 8 | if (stream.sol()) { 9 | if (stream.match(headerSeperator)) { return 'tag'; } 10 | if (stream.match(headerLine)) { return 'tag'; } 11 | } 12 | if (stream.match(simpleEmail)) { return 'string'; } 13 | stream.next(); 14 | return null; 15 | } 16 | }; 17 | }); 18 | 19 | CodeMirror.defineMIME("text/x-rpm-changes", "changes"); 20 | -------------------------------------------------------------------------------- /app/res/menu/repository_share.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/assets/mode/diff/diff.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("diff", function() { 2 | 3 | var TOKEN_NAMES = { 4 | '+': 'tag', 5 | '-': 'string', 6 | '@': 'meta' 7 | }; 8 | 9 | return { 10 | token: function(stream) { 11 | var tw_pos = stream.string.search(/[\t ]+?$/); 12 | 13 | if (!stream.sol() || tw_pos === 0) { 14 | stream.skipToEnd(); 15 | return ("error " + ( 16 | TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, ''); 17 | } 18 | 19 | var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd(); 20 | 21 | if (tw_pos === -1) { 22 | stream.skipToEnd(); 23 | } else { 24 | stream.pos = tw_pos; 25 | } 26 | 27 | return token_name; 28 | } 29 | }; 30 | }); 31 | 32 | CodeMirror.defineMIME("text/x-diff", "diff"); 33 | -------------------------------------------------------------------------------- /app/res/values/roboguice.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | com.github.mobile.GitHubModule 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/res/xml/sync_adapter.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | -------------------------------------------------------------------------------- /app/res/layout/pager.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | -------------------------------------------------------------------------------- /app/res/layout/gist_file_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | -------------------------------------------------------------------------------- /app/res/menu/user_follow.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 23 | 24 | -------------------------------------------------------------------------------- /app/res/color/tab_icon_colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/res/color/tab_text_colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/res/drawable/edit_text_cursor.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/res/layout/list_divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/res/layout/list_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 22 | -------------------------------------------------------------------------------- /app/res/menu/code_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 23 | 24 | -------------------------------------------------------------------------------- /app/res/layout/commit_comments.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 22 | -------------------------------------------------------------------------------- /app/res/layout/footer_separator.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/res/drawable/diff_add_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/res/drawable/list_item_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/res/layout/issues_filter_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/res/drawable/diff_marker_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/res/drawable/diff_remove_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/res/layout/commit_details_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 23 | 24 | -------------------------------------------------------------------------------- /app/res/layout/comment_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/res/menu/login.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 24 | 25 | -------------------------------------------------------------------------------- /app/res/xml/authenticator.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 22 | -------------------------------------------------------------------------------- /app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | com.github.mobile 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/res/drawable/footer_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/res/layout/commit_comment_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/res/drawable/section_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/res/menu/issue_filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 24 | 25 | -------------------------------------------------------------------------------- /app/res/menu/refresh.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 24 | 25 | -------------------------------------------------------------------------------- /app/res/menu/gist_create.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/core/OnLoadListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.core; 17 | 18 | /** 19 | * Load listener callback 20 | * 21 | * @param 22 | */ 23 | public interface OnLoadListener { 24 | 25 | /** 26 | * Loaded callback 27 | * 28 | * @param data 29 | */ 30 | void loaded(V data); 31 | } 32 | -------------------------------------------------------------------------------- /app/res/menu/home.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 24 | 25 | -------------------------------------------------------------------------------- /integration-tests/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | com.github.mobile.tests 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/res/layout/dialog_list_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 23 | -------------------------------------------------------------------------------- /app/assets/mode/vbscript/vbscript.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("vbscript", function() { 2 | var regexVBScriptKeyword = /^(?:Call|Case|CDate|Clear|CInt|CLng|Const|CStr|Description|Dim|Do|Each|Else|ElseIf|End|Err|Error|Exit|False|For|Function|If|LCase|Loop|LTrim|Next|Nothing|Now|Number|On|Preserve|Quit|ReDim|Resume|RTrim|Select|Set|Sub|Then|To|Trim|True|UBound|UCase|Until|VbCr|VbCrLf|VbLf|VbTab)$/im; 3 | 4 | return { 5 | token: function(stream) { 6 | if (stream.eatSpace()) return null; 7 | var ch = stream.next(); 8 | if (ch == "'") { 9 | stream.skipToEnd(); 10 | return "comment"; 11 | } 12 | if (ch == '"') { 13 | stream.skipTo('"'); 14 | return "string"; 15 | } 16 | 17 | if (/\w/.test(ch)) { 18 | stream.eatWhile(/\w/); 19 | if (regexVBScriptKeyword.test(stream.current())) return "keyword"; 20 | } 21 | return null; 22 | } 23 | }; 24 | }); 25 | 26 | CodeMirror.defineMIME("text/vbscript", "vbscript"); 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ResultCodes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile; 17 | 18 | import static android.app.Activity.RESULT_FIRST_USER; 19 | 20 | /** 21 | * Result codes 22 | */ 23 | public interface ResultCodes { 24 | 25 | /** 26 | * Resource being viewed was modified 27 | */ 28 | int RESOURCE_CHANGED = RESULT_FIRST_USER; 29 | } 30 | -------------------------------------------------------------------------------- /app/res/layout/commit_compare_file_details_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /app/res/menu/comment.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 25 | 26 | -------------------------------------------------------------------------------- /app/res/menu/issue_edit.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 25 | 26 | -------------------------------------------------------------------------------- /app/res/drawable/milestone_closed_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/res/drawable/tab_selector_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/res/drawable/tab_selector_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/res/layout/commit_file_details_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/FragmentProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui; 17 | 18 | import com.actionbarsherlock.app.SherlockFragment; 19 | 20 | /** 21 | * Provides a fragment 22 | */ 23 | public interface FragmentProvider { 24 | 25 | /** 26 | * Get selected fragment 27 | * 28 | * @return fragment 29 | */ 30 | SherlockFragment getSelected(); 31 | } 32 | -------------------------------------------------------------------------------- /app/res/drawable/tab_selector_left_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/res/layout/diff_comment_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/res/xml/searchable_issues.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 23 | -------------------------------------------------------------------------------- /app/res/menu/repository.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 23 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/res/xml/searchable_repos.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/RequestFuture.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile; 17 | 18 | /** 19 | * Request future delivering a response 20 | * 21 | * @param 22 | * type of response data 23 | */ 24 | public interface RequestFuture { 25 | 26 | /** 27 | * Callback that response for request was successfully obtained 28 | * 29 | * @param response 30 | */ 31 | void success(V response); 32 | } 33 | -------------------------------------------------------------------------------- /app/res/layout/commit_diff_line.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/core/user/UserPager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.core.user; 17 | 18 | import com.github.mobile.core.ResourcePager; 19 | 20 | import org.eclipse.egit.github.core.User; 21 | 22 | /** 23 | * Pager over users 24 | */ 25 | public abstract class UserPager extends ResourcePager { 26 | 27 | @Override 28 | protected Object getId(User resource) { 29 | return resource.getId(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/assets/mode/pascal/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 souceLair 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /app/res/drawable/list_divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/res/drawable/actionbar_spinner.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/res/drawable/sign_up_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/res/layout/commit.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/user/OrganizationSelectionListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui.user; 17 | 18 | import org.eclipse.egit.github.core.User; 19 | 20 | /** 21 | * Callback interface when the selected organization changes 22 | */ 23 | public interface OrganizationSelectionListener { 24 | 25 | /** 26 | * Organization selection changed 27 | * 28 | * @param organization 29 | */ 30 | void onOrganizationSelected(User organization); 31 | } -------------------------------------------------------------------------------- /app/res/layout/commit_compare.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 26 | 27 | -------------------------------------------------------------------------------- /integration-tests/src/main/java/com/github/mobile/tests/FiltersViewActivityTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.tests; 17 | 18 | import com.github.mobile.ui.issue.FiltersViewActivity; 19 | 20 | /** 21 | * Test of {@link FiltersViewActivity} 22 | */ 23 | public class FiltersViewActivityTest extends ActivityTest { 24 | 25 | /** 26 | * Create test 27 | */ 28 | public FiltersViewActivityTest() { 29 | super(FiltersViewActivity.class); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/res/values/typeface.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | \uf20E 20 | \uf04f 21 | \uf011 22 | \uf215 23 | \uf216 24 | \uf217 25 | \uf02a 26 | \uf020 27 | 28 | -------------------------------------------------------------------------------- /app/res/menu/gists.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 24 | 29 | 30 | -------------------------------------------------------------------------------- /app/assets/mode/python/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2010 Timothy Farrell 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /app/assets/mode/perl/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011 by Sabaca under the MIT license. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /app/res/layout/commit_parent_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 22 | 23 | 29 | 30 | -------------------------------------------------------------------------------- /app/res/menu/search.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 24 | 29 | 30 | -------------------------------------------------------------------------------- /app/assets/mode/xquery/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011 by MarkLogic Corporation 2 | Author: Mike Brevoort 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. -------------------------------------------------------------------------------- /app/assets/mode/vb/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2012 Codility Limited, 107 Cheapside, London EC2V 6DN, UK 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/TextWatcherAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui; 17 | 18 | import android.text.Editable; 19 | import android.text.TextWatcher; 20 | 21 | /** 22 | * Adapter for {@link TextWatcher} interface 23 | */ 24 | public class TextWatcherAdapter implements TextWatcher { 25 | 26 | public void afterTextChanged(Editable s) { 27 | } 28 | 29 | public void beforeTextChanged(CharSequence s, int start, int count, 30 | int after) { 31 | } 32 | 33 | public void onTextChanged(CharSequence s, int start, int before, int count) { 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/assets/mode/coffeescript/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2011 Jeff Pickhardt 4 | Modified from the Python CodeMirror mode, Copyright (c) 2010 Timothy Farrell 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /app/res/layout/tabbed_progress_pager.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 22 | 23 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/user/EventPager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui.user; 17 | 18 | import com.github.mobile.core.ResourcePager; 19 | 20 | import org.eclipse.egit.github.core.event.Event; 21 | 22 | /** 23 | * Pager over events 24 | */ 25 | public abstract class EventPager extends ResourcePager { 26 | 27 | @Override 28 | protected Object getId(Event resource) { 29 | return resource.getId(); 30 | } 31 | 32 | @Override 33 | protected Event register(Event resource) { 34 | return NewsListAdapter.isValid(resource) ? resource : null; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/res/drawable/section_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/res/drawable/section_selected_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/res/layout/loading_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | 22 | 27 | 28 | 33 | 34 | -------------------------------------------------------------------------------- /app/res/menu/file_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 23 | 29 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/sync/SyncAdapterService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.sync; 17 | 18 | import android.content.Intent; 19 | import android.os.IBinder; 20 | 21 | import com.google.inject.Inject; 22 | 23 | import roboguice.inject.ContextScopedProvider; 24 | import roboguice.service.RoboService; 25 | 26 | /** 27 | * Sync adapter service 28 | */ 29 | public class SyncAdapterService extends RoboService { 30 | 31 | @Inject 32 | private ContextScopedProvider syncAdapterProvider; 33 | 34 | @Override 35 | public IBinder onBind(Intent intent) { 36 | return syncAdapterProvider.get(this).getSyncAdapterBinder(); 37 | } 38 | } -------------------------------------------------------------------------------- /app/assets/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2012 by Marijn Haverbeke 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | Please note that some subdirectories of the CodeMirror distribution 22 | include their own LICENSE files, and are released under different 23 | licences. 24 | -------------------------------------------------------------------------------- /app/assets/mode/sieve/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2012 Thomas Schmid 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | Please note that some subdirectories of the CodeMirror distribution 22 | include their own LICENSE files, and are released under different 23 | licences. 24 | -------------------------------------------------------------------------------- /app/res/drawable/spinner.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 27 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/DialogResultListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui; 17 | 18 | import android.app.Activity; 19 | import android.os.Bundle; 20 | 21 | /** 22 | * Listener that dialogs results are delivered too 23 | */ 24 | public interface DialogResultListener { 25 | 26 | /** 27 | * Callback for a dialog finishing and delivering a result 28 | * 29 | * @param requestCode 30 | * @param resultCode 31 | * result such as {@link Activity#RESULT_CANCELED} or 32 | * {@link Activity#RESULT_OK} 33 | * @param arguments 34 | */ 35 | void onDialogResult(int requestCode, int resultCode, Bundle arguments); 36 | } 37 | -------------------------------------------------------------------------------- /app/res/layout/comment_create.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/res/menu/commit_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 24 | 29 | 34 | 35 | -------------------------------------------------------------------------------- /app/res/layout/milestone.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 26 | 27 | 33 | 34 | -------------------------------------------------------------------------------- /app/res/layout/user_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | 22 | 26 | 27 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/accounts/AccountConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.accounts; 17 | 18 | /** 19 | * Authentication constants 20 | */ 21 | public interface AccountConstants { 22 | 23 | /** 24 | * Account type 25 | */ 26 | String ACCOUNT_TYPE = "com.github"; 27 | 28 | /** 29 | * Account name 30 | */ 31 | String ACCOUNT_NAME = "GitHub"; 32 | 33 | /** 34 | * Provider authority 35 | */ 36 | String PROVIDER_AUTHORITY = "com.github.sync"; 37 | 38 | /** 39 | * Application note URL 40 | */ 41 | String APP_NOTE_URL = "https://github.com/github/android"; 42 | 43 | /** 44 | * Application note 45 | */ 46 | String APP_NOTE = "GitHub Android App"; 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/core/commit/CommitMatch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.core.commit; 17 | 18 | import org.eclipse.egit.github.core.Repository; 19 | 20 | /** 21 | * Match for a commit in a repository 22 | */ 23 | public class CommitMatch { 24 | 25 | /** 26 | * Repository of commit 27 | */ 28 | public final Repository repository; 29 | 30 | /** 31 | * SHA-1 of commit 32 | */ 33 | public final String commit; 34 | 35 | /** 36 | * Create match 37 | * 38 | * @param repository 39 | * @param commit 40 | */ 41 | public CommitMatch(final Repository repository, final String commit) { 42 | this.repository = repository; 43 | this.commit = commit; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/res/layout/issue_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 26 | 27 | 33 | 34 | -------------------------------------------------------------------------------- /app/res/layout/issues_filter_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 26 | 27 | 33 | 34 | -------------------------------------------------------------------------------- /app/res/layout/repo_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 26 | 27 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/core/UrlMatcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.core; 17 | 18 | import android.text.TextUtils; 19 | 20 | import java.util.regex.Matcher; 21 | 22 | /** 23 | * Base URL matcher with utilities for sub-classes to use 24 | */ 25 | public abstract class UrlMatcher { 26 | 27 | /** 28 | * Is given input URL a match? 29 | *

30 | * This method ignores null and empty URLs and does not reset the matcher 31 | * with them 32 | * 33 | * @param url 34 | * @param matcher 35 | * @return true if matcher matches, false otherwise 36 | */ 37 | protected boolean isMatch(final String url, final Matcher matcher) { 38 | return !TextUtils.isEmpty(url) && matcher.reset(url).matches(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/user/MyFollowersFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui.user; 17 | 18 | import com.github.mobile.core.ResourcePager; 19 | import com.github.mobile.core.user.UserPager; 20 | 21 | import org.eclipse.egit.github.core.User; 22 | import org.eclipse.egit.github.core.client.PageIterator; 23 | 24 | /** 25 | * Fragment to display a list of followers 26 | */ 27 | public class MyFollowersFragment extends FollowersFragment { 28 | 29 | @Override 30 | protected ResourcePager createPager() { 31 | return new UserPager() { 32 | 33 | @Override 34 | public PageIterator createIterator(int page, int size) { 35 | return service.pageFollowers(page, size); 36 | } 37 | }; 38 | } 39 | } -------------------------------------------------------------------------------- /app/res/layout/label_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | 22 | 29 | 30 | 36 | 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/gist/StarredGistsFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui.gist; 17 | 18 | import com.github.mobile.core.ResourcePager; 19 | import com.github.mobile.core.gist.GistPager; 20 | 21 | import org.eclipse.egit.github.core.Gist; 22 | import org.eclipse.egit.github.core.client.PageIterator; 23 | 24 | /** 25 | * Fragment to display a list of Gists 26 | */ 27 | public class StarredGistsFragment extends GistsFragment { 28 | 29 | @Override 30 | protected ResourcePager createPager() { 31 | return new GistPager(store) { 32 | 33 | @Override 34 | public PageIterator createIterator(int page, int size) { 35 | return service.pageStarredGists(page, size); 36 | } 37 | }; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/res/layout/repo_issue_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 26 | 27 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/core/gist/GistPager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.core.gist; 17 | 18 | import com.github.mobile.core.ResourcePager; 19 | 20 | import org.eclipse.egit.github.core.Gist; 21 | 22 | /** 23 | * Pager over Gists 24 | */ 25 | public abstract class GistPager extends ResourcePager { 26 | 27 | private final GistStore store; 28 | 29 | /** 30 | * Create pager 31 | * 32 | * @param store 33 | */ 34 | public GistPager(final GistStore store) { 35 | this.store = store; 36 | } 37 | 38 | @Override 39 | protected Object getId(Gist resource) { 40 | return resource.getId(); 41 | } 42 | 43 | @Override 44 | protected Gist register(Gist resource) { 45 | return store.addGist(resource); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/gist/PublicGistsFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui.gist; 17 | 18 | import com.github.mobile.core.ResourcePager; 19 | import com.github.mobile.core.gist.GistPager; 20 | 21 | import org.eclipse.egit.github.core.Gist; 22 | import org.eclipse.egit.github.core.client.PageIterator; 23 | 24 | /** 25 | * Fragment to display a list of public Gists 26 | */ 27 | public class PublicGistsFragment extends GistsFragment { 28 | 29 | @Override 30 | protected ResourcePager createPager() { 31 | return new GistPager(store) { 32 | 33 | @Override 34 | public PageIterator createIterator(int page, int size) { 35 | return service.pagePublicGists(page, size); 36 | } 37 | }; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/user/UserCreatedNewsFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui.user; 17 | 18 | import com.github.mobile.core.ResourcePager; 19 | 20 | import org.eclipse.egit.github.core.client.PageIterator; 21 | import org.eclipse.egit.github.core.event.Event; 22 | 23 | /** 24 | * News that a given user has created 25 | */ 26 | public class UserCreatedNewsFragment extends UserNewsFragment { 27 | 28 | @Override 29 | protected ResourcePager createPager() { 30 | return new EventPager() { 31 | 32 | @Override 33 | public PageIterator createIterator(int page, int size) { 34 | return service 35 | .pageUserEvents(org.getLogin(), false, page, size); 36 | } 37 | }; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/user/FollowersFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui.user; 17 | 18 | import android.os.Bundle; 19 | 20 | import com.github.mobile.R.string; 21 | 22 | /** 23 | * Fragment to display a list of followers 24 | */ 25 | public abstract class FollowersFragment extends PagedUserFragment { 26 | 27 | @Override 28 | public void onActivityCreated(Bundle savedInstanceState) { 29 | super.onActivityCreated(savedInstanceState); 30 | 31 | setEmptyText(string.no_followers); 32 | } 33 | 34 | @Override 35 | protected int getLoadingMessage() { 36 | return string.loading_followers; 37 | } 38 | 39 | @Override 40 | protected int getErrorMessage(Exception exception) { 41 | return string.error_followers_load; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/user/FollowingFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui.user; 17 | 18 | import android.os.Bundle; 19 | 20 | import com.github.mobile.R.string; 21 | 22 | /** 23 | * Fragment to display a list of users being followed 24 | */ 25 | public abstract class FollowingFragment extends PagedUserFragment { 26 | 27 | @Override 28 | public void onActivityCreated(Bundle savedInstanceState) { 29 | super.onActivityCreated(savedInstanceState); 30 | 31 | setEmptyText(string.no_people); 32 | } 33 | 34 | @Override 35 | protected int getLoadingMessage() { 36 | return string.loading_people; 37 | } 38 | 39 | @Override 40 | protected int getErrorMessage(Exception exception) { 41 | return string.error_people_load; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/user/MyFollowingFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui.user; 17 | 18 | import com.github.mobile.core.ResourcePager; 19 | import com.github.mobile.core.user.UserPager; 20 | 21 | import org.eclipse.egit.github.core.User; 22 | import org.eclipse.egit.github.core.client.PageIterator; 23 | 24 | /** 25 | * Fragment to display the users being followed by the default user 26 | */ 27 | public class MyFollowingFragment extends FollowingFragment { 28 | 29 | @Override 30 | protected ResourcePager createPager() { 31 | return new UserPager() { 32 | 33 | @Override 34 | public PageIterator createIterator(int page, int size) { 35 | return service.pageFollowing(page, size); 36 | } 37 | }; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/user/OrganizationSelectionProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui.user; 17 | 18 | import org.eclipse.egit.github.core.User; 19 | 20 | /** 21 | * Interface to register and unregister a {@link OrganizationSelectionListener} 22 | */ 23 | public interface OrganizationSelectionProvider { 24 | 25 | /** 26 | * Add selection listener 27 | * 28 | * @param listener 29 | * @return the currently selected organization 30 | */ 31 | User addListener(OrganizationSelectionListener listener); 32 | 33 | /** 34 | * Remove selection listener 35 | * 36 | * @param listener 37 | * @return this selection provider 38 | */ 39 | OrganizationSelectionProvider removeListener( 40 | OrganizationSelectionListener listener); 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/user/UserReceivedNewsFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui.user; 17 | 18 | import com.github.mobile.core.ResourcePager; 19 | 20 | import org.eclipse.egit.github.core.client.PageIterator; 21 | import org.eclipse.egit.github.core.event.Event; 22 | 23 | /** 24 | * News that a given user has received 25 | */ 26 | public class UserReceivedNewsFragment extends UserNewsFragment { 27 | 28 | @Override 29 | protected ResourcePager createPager() { 30 | return new EventPager() { 31 | 32 | @Override 33 | public PageIterator createIterator(int page, int size) { 34 | return service.pageUserReceivedEvents(org.getLogin(), false, 35 | page, size); 36 | } 37 | }; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/res/drawable/milestone_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/res/layout/gist_file_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 26 | 27 | 36 | 37 | -------------------------------------------------------------------------------- /app/res/layout/progress_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 23 | 24 | 29 | 30 | 37 | 38 | -------------------------------------------------------------------------------- /app/res/layout/repo_code.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 25 | 26 | 29 | 30 | 39 | 40 | -------------------------------------------------------------------------------- /app/res/layout/user_repo_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 26 | 27 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/res/drawable/actionbar_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/res/layout/commit_file_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 21 | 22 | 27 | 28 | 34 | 35 | 39 | 40 | -------------------------------------------------------------------------------- /app/res/layout/path_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 21 | 22 | 28 | 29 | 39 | 40 | -------------------------------------------------------------------------------- /app/res/layout/comment_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 26 | 27 | 34 | 35 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/core/issue/IssuePager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.core.issue; 17 | 18 | import com.github.mobile.core.ResourcePager; 19 | 20 | import org.eclipse.egit.github.core.Issue; 21 | 22 | /** 23 | * Helper class for showing more and more pages of issues 24 | */ 25 | public abstract class IssuePager extends ResourcePager { 26 | 27 | /** 28 | * Store to add loaded issues to 29 | */ 30 | protected final IssueStore store; 31 | 32 | /** 33 | * Create issue pager 34 | * 35 | * @param store 36 | */ 37 | public IssuePager(final IssueStore store) { 38 | this.store = store; 39 | } 40 | 41 | @Override 42 | protected Issue register(Issue resource) { 43 | return store.addIssue(resource); 44 | } 45 | 46 | @Override 47 | protected Object getId(Issue resource) { 48 | return resource.getId(); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/assets/mode/jinja2/jinja2.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("jinja2", function(config, parserConf) { 2 | var keywords = ["block", "endblock", "for", "endfor", "in", "true", "false", 3 | "loop", "none", "self", "super", "if", "as", "not", "and", 4 | "else", "import", "with", "without", "context"]; 5 | keywords = new RegExp("^((" + keywords.join(")|(") + "))\\b"); 6 | 7 | function tokenBase (stream, state) { 8 | var ch = stream.next(); 9 | if (ch == "{") { 10 | if (ch = stream.eat(/\{|%|#/)) { 11 | stream.eat("-"); 12 | state.tokenize = inTag(ch); 13 | return "tag"; 14 | } 15 | } 16 | } 17 | function inTag (close) { 18 | if (close == "{") { 19 | close = "}"; 20 | } 21 | return function (stream, state) { 22 | var ch = stream.next(); 23 | if ((ch == close || (ch == "-" && stream.eat(close))) 24 | && stream.eat("}")) { 25 | state.tokenize = tokenBase; 26 | return "tag"; 27 | } 28 | if (stream.match(keywords)) { 29 | return "keyword"; 30 | } 31 | return close == "#" ? "comment" : "string"; 32 | }; 33 | } 34 | return { 35 | startState: function () { 36 | return {tokenize: tokenBase}; 37 | }, 38 | token: function (stream, state) { 39 | return state.tokenize(stream, state); 40 | } 41 | }; 42 | }); 43 | -------------------------------------------------------------------------------- /app/res/layout/item_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 27 | 28 | 35 | 36 | 40 | 41 | -------------------------------------------------------------------------------- /app/res/layout/org_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 24 | 25 | 31 | 32 | 39 | 40 | -------------------------------------------------------------------------------- /app/assets/mode/r/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, Ubalo, Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the Ubalo, Inc nor the names of its 12 | contributors may be used to endorse or promote products derived 13 | from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL UBALO, INC BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /app/assets/mode/ruby/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, Ubalo, Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the Ubalo, Inc. nor the names of its 12 | contributors may be used to endorse or promote products derived 13 | from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL UBALO, INC BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /integration-tests/src/main/java/com/github/mobile/tests/repo/RepositorySearchActivityTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.tests.repo; 17 | 18 | import static android.app.SearchManager.QUERY; 19 | import static android.content.Intent.ACTION_SEARCH; 20 | import android.content.Intent; 21 | 22 | import com.github.mobile.tests.ActivityTest; 23 | import com.github.mobile.ui.repo.RepositorySearchActivity; 24 | 25 | /** 26 | * Tests of {@link RepositorySearchActivity} 27 | */ 28 | public class RepositorySearchActivityTest extends 29 | ActivityTest { 30 | 31 | /** 32 | * Create test 33 | */ 34 | public RepositorySearchActivityTest() { 35 | super(RepositorySearchActivity.class); 36 | } 37 | 38 | @Override 39 | protected void setUp() throws Exception { 40 | super.setUp(); 41 | 42 | setActivityIntent(new Intent(ACTION_SEARCH).putExtra(QUERY, "test")); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/user/OrganizationNewsFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui.user; 17 | 18 | import com.github.mobile.accounts.AccountUtils; 19 | import com.github.mobile.core.ResourcePager; 20 | 21 | import org.eclipse.egit.github.core.client.PageIterator; 22 | import org.eclipse.egit.github.core.event.Event; 23 | 24 | /** 25 | * Fragment to display an organization's news 26 | */ 27 | public class OrganizationNewsFragment extends UserNewsFragment { 28 | 29 | @Override 30 | protected ResourcePager createPager() { 31 | return new EventPager() { 32 | 33 | @Override 34 | public PageIterator createIterator(int page, int size) { 35 | String account = AccountUtils.getLogin(getActivity()); 36 | return service.pageUserOrgEvents(account, org.getLogin(), page, 37 | size); 38 | } 39 | }; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/res/layout/org_dropdown_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 25 | 26 | 32 | 33 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/commit/CommitFileComparator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui.commit; 17 | 18 | import static java.lang.String.CASE_INSENSITIVE_ORDER; 19 | 20 | import java.util.Comparator; 21 | 22 | import org.eclipse.egit.github.core.CommitFile; 23 | 24 | /** 25 | * Comparator for commit files 26 | */ 27 | public class CommitFileComparator implements Comparator { 28 | 29 | @Override 30 | public int compare(final CommitFile lhs, final CommitFile rhs) { 31 | String lPath = lhs.getFilename(); 32 | final int lSlash = lPath.lastIndexOf('/'); 33 | if (lSlash != -1) 34 | lPath = lPath.substring(lSlash + 1); 35 | 36 | String rPath = rhs.getFilename(); 37 | final int rSlash = rPath.lastIndexOf('/'); 38 | if (rSlash != -1) 39 | rPath = rPath.substring(rSlash + 1); 40 | 41 | return CASE_INSENSITIVE_ORDER.compare(lPath, rPath); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/res/layout/commit_diff_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 26 | 27 | 35 | 36 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/accounts/AccountAuthenticatorService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.accounts; 17 | 18 | import static android.accounts.AccountManager.ACTION_AUTHENTICATOR_INTENT; 19 | import android.app.Service; 20 | import android.content.Intent; 21 | import android.os.IBinder; 22 | 23 | /** 24 | * Authenticator service that returns a subclass of AbstractAccountAuthenticator 25 | * in onBind() 26 | */ 27 | public class AccountAuthenticatorService extends Service { 28 | 29 | private static AccountAuthenticator AUTHENTICATOR; 30 | 31 | public IBinder onBind(Intent intent) { 32 | return intent.getAction().equals(ACTION_AUTHENTICATOR_INTENT) ? getAuthenticator() 33 | .getIBinder() : null; 34 | } 35 | 36 | private AccountAuthenticator getAuthenticator() { 37 | if (AUTHENTICATOR == null) 38 | AUTHENTICATOR = new AccountAuthenticator(this); 39 | return AUTHENTICATOR; 40 | } 41 | } -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/util/MarkdownUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.util; 17 | 18 | import static java.util.Locale.US; 19 | import android.text.TextUtils; 20 | 21 | /** 22 | * Utilities for dealing with Markdown files 23 | */ 24 | public class MarkdownUtils { 25 | 26 | private static final String[] MARKDOWN_EXTENSIONS = { ".md", ".mkdn", 27 | ".mdwn", ".mdown", ".markdown", ".mkd", ".mkdown", ".ron" }; 28 | 29 | /** 30 | * Is the the given file name a Markdown file? 31 | * 32 | * @param name 33 | * @return true if the name has a markdown extension, false otherwise 34 | */ 35 | public static boolean isMarkdown(String name) { 36 | if (TextUtils.isEmpty(name)) 37 | return false; 38 | 39 | name = name.toLowerCase(US); 40 | for (String extension : MARKDOWN_EXTENSIONS) 41 | if (name.endsWith(extension)) 42 | return true; 43 | 44 | return false; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/core/gist/GistUrlMatcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.core.gist; 17 | 18 | import com.github.mobile.core.UrlMatcher; 19 | 20 | import java.util.regex.Matcher; 21 | import java.util.regex.Pattern; 22 | 23 | /** 24 | * Matcher for gist URLs that provides the Gist id matched 25 | *

26 | * This class is not thread-safe 27 | */ 28 | public class GistUrlMatcher extends UrlMatcher { 29 | 30 | private static final String REGEX = "https?://((gist.github.com)|([^/]+/gist))/([a-fA-F0-9]+)"; 31 | 32 | private static final Pattern PATTERN = Pattern.compile(REGEX); 33 | 34 | private final Matcher matcher = PATTERN.matcher(""); 35 | 36 | /** 37 | * Get Gist id from URL 38 | * 39 | * @param url 40 | * @return gist id or null if the given URL is not to a Gist 41 | */ 42 | public String getId(final String url) { 43 | return isMatch(url, matcher) ? matcher.group(4) : null; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/res/drawable/inset_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /app/res/drawable/edit_text_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /app/res/layout/commit_file_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 26 | 27 | 34 | 35 | 42 | 43 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/core/user/UserUriMatcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.core.user; 17 | 18 | import android.net.Uri; 19 | 20 | import com.github.mobile.core.repo.RepositoryUtils; 21 | 22 | import java.util.List; 23 | 24 | import org.eclipse.egit.github.core.User; 25 | 26 | /** 27 | * Parses a {@link User} from a {@link Uri} 28 | */ 29 | public class UserUriMatcher { 30 | 31 | /** 32 | * Attempt to parse a {@link User} from the given {@link Uri} 33 | * 34 | * @param uri 35 | * @return {@link User} or null if unparseable 36 | */ 37 | public static User getUser(Uri uri) { 38 | List segments = uri.getPathSegments(); 39 | if (segments == null) 40 | return null; 41 | if (segments.size() != 1) 42 | return null; 43 | 44 | String login = segments.get(0); 45 | if (!RepositoryUtils.isValidOwner(login)) 46 | return null; 47 | 48 | return new User().setLogin(login); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/res/drawable/pager_title_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 35 | 36 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /app/res/drawable/header_separator_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 35 | 36 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /app/res/layout/ref_footer.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 26 | 27 | 34 | 35 | 43 | 44 | -------------------------------------------------------------------------------- /app/res/menu/gist_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 |

18 | 19 | 24 | 29 | 34 | 39 | 44 | 45 | -------------------------------------------------------------------------------- /app/res/menu/issue_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 24 | 29 | 34 | 39 | 44 | 45 | -------------------------------------------------------------------------------- /app/res/layout/collaborator_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | 22 | 29 | 30 | 34 | 35 | 44 | 45 | -------------------------------------------------------------------------------- /app/res/layout/commit_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 28 | 29 | 33 | 34 | 37 | 38 | 47 | 48 | -------------------------------------------------------------------------------- /app/res/menu/issues.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 24 | 29 | 34 | 39 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/core/gist/GistEventMatcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.core.gist; 17 | 18 | import static org.eclipse.egit.github.core.event.Event.TYPE_GIST; 19 | 20 | import org.eclipse.egit.github.core.Gist; 21 | import org.eclipse.egit.github.core.event.Event; 22 | import org.eclipse.egit.github.core.event.EventPayload; 23 | import org.eclipse.egit.github.core.event.GistPayload; 24 | 25 | /** 26 | * Helper to find a {@link Gist} to open for an event 27 | */ 28 | public class GistEventMatcher { 29 | 30 | /** 31 | * Get gist from event 32 | * 33 | * @param event 34 | * @return gist or null if event doesn't apply 35 | */ 36 | public Gist getGist(final Event event) { 37 | if (event == null) 38 | return null; 39 | EventPayload payload = event.getPayload(); 40 | if (payload == null) 41 | return null; 42 | String type = event.getType(); 43 | if (TYPE_GIST.equals(type)) 44 | return ((GistPayload) payload).getGist(); 45 | else 46 | return null; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/res/layout/issues_filter_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | 21 | 29 | 30 | 36 | 37 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/mobile/ui/user/UserFollowersFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 GitHub Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.github.mobile.ui.user; 17 | 18 | import static com.github.mobile.Intents.EXTRA_USER; 19 | import android.app.Activity; 20 | 21 | import com.github.mobile.core.ResourcePager; 22 | import com.github.mobile.core.user.UserPager; 23 | 24 | import org.eclipse.egit.github.core.User; 25 | import org.eclipse.egit.github.core.client.PageIterator; 26 | 27 | /** 28 | * Fragment to display a list of followers 29 | */ 30 | public class UserFollowersFragment extends FollowersFragment { 31 | 32 | private User user; 33 | 34 | @Override 35 | public void onAttach(Activity activity) { 36 | super.onAttach(activity); 37 | 38 | user = getSerializableExtra(EXTRA_USER); 39 | } 40 | 41 | @Override 42 | protected ResourcePager createPager() { 43 | return new UserPager() { 44 | 45 | @Override 46 | public PageIterator createIterator(int page, int size) { 47 | return service.pageFollowers(user.getLogin(), page, size); 48 | } 49 | }; 50 | } 51 | } 52 | --------------------------------------------------------------------------------