{"action":"created","comment":{"url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/comments/72239650","id":72239650,"diff_hunk":"@@ -0,0 +1,218 @@\n+package com.example.inouenaoto.bookmanager_android;\n+\n+import android.app.Activity;\n+import android.app.AlertDialog;\n+import android.app.FragmentManager;\n+import android.content.Context;\n+import android.content.DialogInterface;\n+import android.content.Intent;\n+import android.graphics.Bitmap;\n+import android.graphics.BitmapFactory;\n+import android.net.Uri;\n+import android.os.Bundle;\n+import android.app.Fragment;\n+import android.support.annotation.Nullable;\n+import android.view.LayoutInflater;\n+import android.view.Menu;\n+import android.view.MenuInflater;\n+import android.view.MenuItem;\n+import android.view.MotionEvent;\n+import android.view.View;\n+import android.view.ViewGroup;\n+import android.view.inputmethod.InputMethodManager;\n+import android.widget.DatePicker;\n+import android.widget.EditText;\n+import android.widget.ImageView;\n+import android.widget.ScrollView;\n+import android.widget.Toast;\n+\n+import java.io.InputStream;\n+\n+/**\n+ * A simple {@link Fragment} subclass.\n+ * Activities that contain this fragment must implement the\n+ * {@link BookEditFragment.OnFragmentInteractionListener} interface\n+ * to handle interaction events.\n+ * Use the {@link BookEditFragment#newInstance} factory method to\n+ * create an instance of this fragment.\n+ */\n+public class BookEditFragment extends Fragment {\n+\n+    public BookEditFragment() {}\n+    private static final int REQUEST_GALLERY =0;\n+    private ImageView imgView;\n+\n+    @Override\n+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n+        final View view = inflater.inflate(R.layout.fragment_book_edit, container, false);\n+\n+        EditText setDateText = (EditText) view.findViewById(R.id.editBookDate);\n+        setDateText.setOnClickListener(new SetDateTextAction());\n+\n+        //一覧画面から受け取った値をそれぞれのエデットテキストに反映\n+        String title = getArguments().getString(\"titleText\");\n+        String price = getArguments().getString(\"priceText\");\n+        String date = getArguments().getString(\"dateText\");\n+\n+        EditText edittitle = (EditText) view.findViewById(R.id.editBookTitle);\n+        EditText editprice = (EditText) view.findViewById(R.id.editBookPrice);\n+        EditText editdate = (EditText) view.findViewById(R.id.editBookDate);\n+\n+        edittitle.setText(title);\n+        editprice.setText(price);\n+        editdate.setText(date);\n+\n+        //画像添付ボタンの処理\n+        view.findViewById(R.id.sendButton).setOnClickListener(new View.OnClickListener() {\n+            @Override\n+            public void onClick(View v) {\n+                imgView=(ImageView) view.findViewById(R.id.bookImage);\n+                Intent intent = new Intent();\n+                intent.setType(\"image/*\");\n+                intent.setAction(Intent.ACTION_GET_CONTENT);\n+                startActivityForResult(intent, REQUEST_GALLERY);\n+            }\n+        });\n+        return view;\n+    }\n+\n+    //ピッカーのデータを取得しエディットテキストに反映させるためのクラス\n+    public class SetDateTextAction implements View.OnClickListener {\n+        @Override\n+        public void onClick(final View v) {\n+            AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n+            final DatePicker datePicker = new DatePicker(getActivity());\n+            builder.setView(datePicker);\n+            builder.setTitle(\"日付選択\");\n+            builder.setPositiveButton(\"決定\", new DialogInterface.OnClickListener() {\n+                @Override\n+                public void onClick(DialogInterface dialog, int which) {\n+                    EditText setDateText = (EditText) v.findViewById(R.id.editBookDate);\n+                    int year = datePicker.getYear();\n+                    int month = datePicker.getMonth();\n+                    int day = datePicker.getDayOfMonth();\n+                    setDateText.setText(year + \"/\" + month + \"/\" + day);\n+                }\n+            });\n+            builder.setNegativeButton(\"キャンセル\", null);\n+            AlertDialog alertDialog = builder.create();\n+            alertDialog.show();\n+        }\n+    }\n+\n+    //アクションバーの設定\n+    @Override\n+    public void onActivityCreated(Bundle savedInstanceState) {\n+        super.onActivityCreated(savedInstanceState);\n+        setHasOptionsMenu(true);\n+\n+        getActivity().setTitle(\"書籍編集\");\n+    }\n+\n+    @Override\n+    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n+        super.onCreateOptionsMenu(menu, inflater);\n+\n+        inflater.inflate(R.menu.edie_menu, menu);\n+    }\n+    //アクションバーのボタンイベントのハンドリング\n+    @Override\n+    public boolean onOptionsItemSelected(MenuItem item){\n+        switch (item.getItemId()) {\n+\n+            case R.id.closeButton:\n+               // Toast.makeText(getActivity(), R.string.add, Toast.LENGTH_SHORT).show();\n+                BookListFragment bookListfragment = new BookListFragment();","path":"bookManager-Android/app/src/main/java/com/example/inouenaoto/bookmanager_android/BookEditFragment.java","position":125,"original_position":125,"commit_id":"340bea0777511a2eadedf81751c0da26c85d0b4e","original_commit_id":"340bea0777511a2eadedf81751c0da26c85d0b4e","user":{"login":"hyoshimi-cq","id":15042455,"avatar_url":"https://avatars.githubusercontent.com/u/15042455?v=3","gravatar_id":"","url":"https://api.github.com/users/hyoshimi-cq","html_url":"https://github.com/hyoshimi-cq","followers_url":"https://api.github.com/users/hyoshimi-cq/followers","following_url":"https://api.github.com/users/hyoshimi-cq/following{/other_user}","gists_url":"https://api.github.com/users/hyoshimi-cq/gists{/gist_id}","starred_url":"https://api.github.com/users/hyoshimi-cq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyoshimi-cq/subscriptions","organizations_url":"https://api.github.com/users/hyoshimi-cq/orgs","repos_url":"https://api.github.com/users/hyoshimi-cq/repos","events_url":"https://api.github.com/users/hyoshimi-cq/events{/privacy}","received_events_url":"https://api.github.com/users/hyoshimi-cq/received_events","type":"User","site_admin":false},"body":" `bookListfragment` -> `bookListFragment`","created_at":"2016-07-26T12:35:06Z","updated_at":"2016-07-26T12:35:06Z","html_url":"https://github.com/ninoue-cq/bookManager-Android/pull/1#discussion_r72239650","pull_request_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/comments/72239650"},"html":{"href":"https://github.com/ninoue-cq/bookManager-Android/pull/1#discussion_r72239650"},"pull_request":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/1","id":78341049,"html_url":"https://github.com/ninoue-cq/bookManager-Android/pull/1","diff_url":"https://github.com/ninoue-cq/bookManager-Android/pull/1.diff","patch_url":"https://github.com/ninoue-cq/bookManager-Android/pull/1.patch","issue_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/1","number":1,"state":"open","locked":false,"title":"Make ui","user":{"login":"ninoue-cq","id":20140472,"avatar_url":"https://avatars.githubusercontent.com/u/20140472?v=3","gravatar_id":"","url":"https://api.github.com/users/ninoue-cq","html_url":"https://github.com/ninoue-cq","followers_url":"https://api.github.com/users/ninoue-cq/followers","following_url":"https://api.github.com/users/ninoue-cq/following{/other_user}","gists_url":"https://api.github.com/users/ninoue-cq/gists{/gist_id}","starred_url":"https://api.github.com/users/ninoue-cq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninoue-cq/subscriptions","organizations_url":"https://api.github.com/users/ninoue-cq/orgs","repos_url":"https://api.github.com/users/ninoue-cq/repos","events_url":"https://api.github.com/users/ninoue-cq/events{/privacy}","received_events_url":"https://api.github.com/users/ninoue-cq/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-21T15:51:12Z","updated_at":"2016-07-26T12:35:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d6697d2be2b2677599c9d20be0cad0e6295ffd19","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/1/comments","statuses_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/statuses/340bea0777511a2eadedf81751c0da26c85d0b4e","head":{"label":"ninoue-cq:make_UI","ref":"make_UI","sha":"340bea0777511a2eadedf81751c0da26c85d0b4e","user":{"login":"ninoue-cq","id":20140472,"avatar_url":"https://avatars.githubusercontent.com/u/20140472?v=3","gravatar_id":"","url":"https://api.github.com/users/ninoue-cq","html_url":"https://github.com/ninoue-cq","followers_url":"https://api.github.com/users/ninoue-cq/followers","following_url":"https://api.github.com/users/ninoue-cq/following{/other_user}","gists_url":"https://api.github.com/users/ninoue-cq/gists{/gist_id}","starred_url":"https://api.github.com/users/ninoue-cq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninoue-cq/subscriptions","organizations_url":"https://api.github.com/users/ninoue-cq/orgs","repos_url":"https://api.github.com/users/ninoue-cq/repos","events_url":"https://api.github.com/users/ninoue-cq/events{/privacy}","received_events_url":"https://api.github.com/users/ninoue-cq/received_events","type":"User","site_admin":false},"repo":{"id":63529113,"name":"bookManager-Android","full_name":"ninoue-cq/bookManager-Android","owner":{"login":"ninoue-cq","id":20140472,"avatar_url":"https://avatars.githubusercontent.com/u/20140472?v=3","gravatar_id":"","url":"https://api.github.com/users/ninoue-cq","html_url":"https://github.com/ninoue-cq","followers_url":"https://api.github.com/users/ninoue-cq/followers","following_url":"https://api.github.com/users/ninoue-cq/following{/other_user}","gists_url":"https://api.github.com/users/ninoue-cq/gists{/gist_id}","starred_url":"https://api.github.com/users/ninoue-cq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninoue-cq/subscriptions","organizations_url":"https://api.github.com/users/ninoue-cq/orgs","repos_url":"https://api.github.com/users/ninoue-cq/repos","events_url":"https://api.github.com/users/ninoue-cq/events{/privacy}","received_events_url":"https://api.github.com/users/ninoue-cq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ninoue-cq/bookManager-Android","description":null,"fork":false,"url":"https://api.github.com/repos/ninoue-cq/bookManager-Android","forks_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/forks","keys_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/teams","hooks_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/hooks","issue_events_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/events{/number}","events_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/events","assignees_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/assignees{/user}","branches_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/branches{/branch}","tags_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/tags","blobs_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/languages","stargazers_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/stargazers","contributors_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/contributors","subscribers_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/subscribers","subscription_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/subscription","commits_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/contents/{+path}","compare_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/merges","archive_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/downloads","issues_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues{/number}","pulls_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/labels{/name}","releases_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/releases{/id}","deployments_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/deployments","created_at":"2016-07-17T11:43:30Z","updated_at":"2016-07-17T11:53:27Z","pushed_at":"2016-07-26T11:50:15Z","git_url":"git://github.com/ninoue-cq/bookManager-Android.git","ssh_url":"git@github.com:ninoue-cq/bookManager-Android.git","clone_url":"https://github.com/ninoue-cq/bookManager-Android.git","svn_url":"https://github.com/ninoue-cq/bookManager-Android","homepage":null,"size":153,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ninoue-cq:develop","ref":"develop","sha":"cd79aae1240072190ee8f02bfd288d69c8e6dd27","user":{"login":"ninoue-cq","id":20140472,"avatar_url":"https://avatars.githubusercontent.com/u/20140472?v=3","gravatar_id":"","url":"https://api.github.com/users/ninoue-cq","html_url":"https://github.com/ninoue-cq","followers_url":"https://api.github.com/users/ninoue-cq/followers","following_url":"https://api.github.com/users/ninoue-cq/following{/other_user}","gists_url":"https://api.github.com/users/ninoue-cq/gists{/gist_id}","starred_url":"https://api.github.com/users/ninoue-cq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninoue-cq/subscriptions","organizations_url":"https://api.github.com/users/ninoue-cq/orgs","repos_url":"https://api.github.com/users/ninoue-cq/repos","events_url":"https://api.github.com/users/ninoue-cq/events{/privacy}","received_events_url":"https://api.github.com/users/ninoue-cq/received_events","type":"User","site_admin":false},"repo":{"id":63529113,"name":"bookManager-Android","full_name":"ninoue-cq/bookManager-Android","owner":{"login":"ninoue-cq","id":20140472,"avatar_url":"https://avatars.githubusercontent.com/u/20140472?v=3","gravatar_id":"","url":"https://api.github.com/users/ninoue-cq","html_url":"https://github.com/ninoue-cq","followers_url":"https://api.github.com/users/ninoue-cq/followers","following_url":"https://api.github.com/users/ninoue-cq/following{/other_user}","gists_url":"https://api.github.com/users/ninoue-cq/gists{/gist_id}","starred_url":"https://api.github.com/users/ninoue-cq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninoue-cq/subscriptions","organizations_url":"https://api.github.com/users/ninoue-cq/orgs","repos_url":"https://api.github.com/users/ninoue-cq/repos","events_url":"https://api.github.com/users/ninoue-cq/events{/privacy}","received_events_url":"https://api.github.com/users/ninoue-cq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ninoue-cq/bookManager-Android","description":null,"fork":false,"url":"https://api.github.com/repos/ninoue-cq/bookManager-Android","forks_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/forks","keys_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/teams","hooks_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/hooks","issue_events_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/events{/number}","events_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/events","assignees_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/assignees{/user}","branches_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/branches{/branch}","tags_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/tags","blobs_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/languages","stargazers_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/stargazers","contributors_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/contributors","subscribers_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/subscribers","subscription_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/subscription","commits_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/contents/{+path}","compare_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/merges","archive_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/downloads","issues_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues{/number}","pulls_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/labels{/name}","releases_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/releases{/id}","deployments_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/deployments","created_at":"2016-07-17T11:43:30Z","updated_at":"2016-07-17T11:53:27Z","pushed_at":"2016-07-26T11:50:15Z","git_url":"git://github.com/ninoue-cq/bookManager-Android.git","ssh_url":"git@github.com:ninoue-cq/bookManager-Android.git","clone_url":"https://github.com/ninoue-cq/bookManager-Android.git","svn_url":"https://github.com/ninoue-cq/bookManager-Android","homepage":null,"size":153,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/1"},"html":{"href":"https://github.com/ninoue-cq/bookManager-Android/pull/1"},"issue":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/1"},"comments":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/statuses/340bea0777511a2eadedf81751c0da26c85d0b4e"}}}}
{"actor":{"display_login":"hyoshimi-cq"}}