{"action":"created","comment":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments/45577936","id":45577936,"diff_hunk":"@@ -407,7 +407,20 @@ namespace ui {\n          * @param returnType One of the EditBox::KeyboardReturnType constants.\n          */\n         void setReturnType(EditBox::KeyboardReturnType returnType);\n-            \n+        \n+        /**\n+         * Set the inner padding in edit box.\n+         * @param padding left, top, right, bottom.\n+         */\n+        void setPadding(float left, float top, float right, float bottom);\n+        \n+        /**\n+         * Set the input text horizontal alignment and vertical alignment.\n+         * @param hAlign the alignment for horizontally.\n+         * @param vAlign the alignment for vertically.\n+         */\n+        void setTextAlignment(TextHAlignment hAlign, TextVAlignment vAlign);","path":"cocos/ui/UIEditBox/UIEditBox.h","position":17,"original_position":17,"commit_id":"4e0d779b4716195b35ffedf93a6525e9ddf474f6","original_commit_id":"244078ffcd71041d6a0614a1098e714bd835e608","user":{"login":"anjandaffo","id":12529102,"avatar_url":"https://avatars.githubusercontent.com/u/12529102?v=3","gravatar_id":"","url":"https://api.github.com/users/anjandaffo","html_url":"https://github.com/anjandaffo","followers_url":"https://api.github.com/users/anjandaffo/followers","following_url":"https://api.github.com/users/anjandaffo/following{/other_user}","gists_url":"https://api.github.com/users/anjandaffo/gists{/gist_id}","starred_url":"https://api.github.com/users/anjandaffo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anjandaffo/subscriptions","organizations_url":"https://api.github.com/users/anjandaffo/orgs","repos_url":"https://api.github.com/users/anjandaffo/repos","events_url":"https://api.github.com/users/anjandaffo/events{/privacy}","received_events_url":"https://api.github.com/users/anjandaffo/received_events","type":"User","site_admin":false},"body":"@Mazyod  @zilongshanren  I also think to separate the API, But there are one issue in Android. There are no any API is there for alignment. You set the gravity to achieve the alignment feature. There are not separate method to set gravity horizontal or vertical. Either you set single or with together. If you set only Horizontal or vertical Gravity at a time then you missed the previous set gravity.","created_at":"2015-11-23T07:55:35Z","updated_at":"2015-11-23T07:55:35Z","html_url":"https://github.com/cocos2d/cocos2d-x/pull/14459#discussion_r45577936","pull_request_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/14459","_links":{"self":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments/45577936"},"html":{"href":"https://github.com/cocos2d/cocos2d-x/pull/14459#discussion_r45577936"},"pull_request":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/14459"}}},"pull_request":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/14459","id":51491547,"html_url":"https://github.com/cocos2d/cocos2d-x/pull/14459","diff_url":"https://github.com/cocos2d/cocos2d-x/pull/14459.diff","patch_url":"https://github.com/cocos2d/cocos2d-x/pull/14459.patch","issue_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/14459","number":14459,"state":"open","locked":false,"title":"New API in ui::EditBox(Android and IOS) setTextAlignment and setPadding.","user":{"login":"anjandaffo","id":12529102,"avatar_url":"https://avatars.githubusercontent.com/u/12529102?v=3","gravatar_id":"","url":"https://api.github.com/users/anjandaffo","html_url":"https://github.com/anjandaffo","followers_url":"https://api.github.com/users/anjandaffo/followers","following_url":"https://api.github.com/users/anjandaffo/following{/other_user}","gists_url":"https://api.github.com/users/anjandaffo/gists{/gist_id}","starred_url":"https://api.github.com/users/anjandaffo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anjandaffo/subscriptions","organizations_url":"https://api.github.com/users/anjandaffo/orgs","repos_url":"https://api.github.com/users/anjandaffo/repos","events_url":"https://api.github.com/users/anjandaffo/events{/privacy}","received_events_url":"https://api.github.com/users/anjandaffo/received_events","type":"User","site_admin":false},"body":"Above API is work for Android and IOS.\r\n\r\nFrom these API User can set InnerPadding in ui editbox.\r\nNow editbox support RTL. \r\nUser can set text alignment in ui editbox.","created_at":"2015-11-23T06:37:21Z","updated_at":"2015-11-23T07:55:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67aba584c6904de48d189c3ebbf4b12d7129ef81","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/14459/commits","review_comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/14459/comments","review_comment_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/14459/comments","statuses_url":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/4e0d779b4716195b35ffedf93a6525e9ddf474f6","head":{"label":"anjandaffo:editbox_padding_and_alignment_api","ref":"editbox_padding_and_alignment_api","sha":"4e0d779b4716195b35ffedf93a6525e9ddf474f6","user":{"login":"anjandaffo","id":12529102,"avatar_url":"https://avatars.githubusercontent.com/u/12529102?v=3","gravatar_id":"","url":"https://api.github.com/users/anjandaffo","html_url":"https://github.com/anjandaffo","followers_url":"https://api.github.com/users/anjandaffo/followers","following_url":"https://api.github.com/users/anjandaffo/following{/other_user}","gists_url":"https://api.github.com/users/anjandaffo/gists{/gist_id}","starred_url":"https://api.github.com/users/anjandaffo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anjandaffo/subscriptions","organizations_url":"https://api.github.com/users/anjandaffo/orgs","repos_url":"https://api.github.com/users/anjandaffo/repos","events_url":"https://api.github.com/users/anjandaffo/events{/privacy}","received_events_url":"https://api.github.com/users/anjandaffo/received_events","type":"User","site_admin":false},"repo":{"id":46468761,"name":"cocos2d-x","full_name":"anjandaffo/cocos2d-x","owner":{"login":"anjandaffo","id":12529102,"avatar_url":"https://avatars.githubusercontent.com/u/12529102?v=3","gravatar_id":"","url":"https://api.github.com/users/anjandaffo","html_url":"https://github.com/anjandaffo","followers_url":"https://api.github.com/users/anjandaffo/followers","following_url":"https://api.github.com/users/anjandaffo/following{/other_user}","gists_url":"https://api.github.com/users/anjandaffo/gists{/gist_id}","starred_url":"https://api.github.com/users/anjandaffo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anjandaffo/subscriptions","organizations_url":"https://api.github.com/users/anjandaffo/orgs","repos_url":"https://api.github.com/users/anjandaffo/repos","events_url":"https://api.github.com/users/anjandaffo/events{/privacy}","received_events_url":"https://api.github.com/users/anjandaffo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anjandaffo/cocos2d-x","description":"cocos2d-x for C++","fork":true,"url":"https://api.github.com/repos/anjandaffo/cocos2d-x","forks_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/forks","keys_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/events","assignees_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/issues/comments{/number}","contents_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/merges","archive_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/anjandaffo/cocos2d-x/releases{/id}","created_at":"2015-11-19T05:01:22Z","updated_at":"2015-11-19T05:02:33Z","pushed_at":"2015-11-23T07:45:25Z","git_url":"git://github.com/anjandaffo/cocos2d-x.git","ssh_url":"git@github.com:anjandaffo/cocos2d-x.git","clone_url":"https://github.com/anjandaffo/cocos2d-x.git","svn_url":"https://github.com/anjandaffo/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":872866,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"v3"}},"base":{"label":"cocos2d:v3","ref":"v3","sha":"689c0f4af3e9ccc8e6ca034f3664ba3aafbbf433","user":{"login":"cocos2d","id":234324,"avatar_url":"https://avatars.githubusercontent.com/u/234324?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos2d","html_url":"https://github.com/cocos2d","followers_url":"https://api.github.com/users/cocos2d/followers","following_url":"https://api.github.com/users/cocos2d/following{/other_user}","gists_url":"https://api.github.com/users/cocos2d/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos2d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos2d/subscriptions","organizations_url":"https://api.github.com/users/cocos2d/orgs","repos_url":"https://api.github.com/users/cocos2d/repos","events_url":"https://api.github.com/users/cocos2d/events{/privacy}","received_events_url":"https://api.github.com/users/cocos2d/received_events","type":"Organization","site_admin":false},"repo":{"id":1093228,"name":"cocos2d-x","full_name":"cocos2d/cocos2d-x","owner":{"login":"cocos2d","id":234324,"avatar_url":"https://avatars.githubusercontent.com/u/234324?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos2d","html_url":"https://github.com/cocos2d","followers_url":"https://api.github.com/users/cocos2d/followers","following_url":"https://api.github.com/users/cocos2d/following{/other_user}","gists_url":"https://api.github.com/users/cocos2d/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos2d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos2d/subscriptions","organizations_url":"https://api.github.com/users/cocos2d/orgs","repos_url":"https://api.github.com/users/cocos2d/repos","events_url":"https://api.github.com/users/cocos2d/events{/privacy}","received_events_url":"https://api.github.com/users/cocos2d/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cocos2d/cocos2d-x","description":"cocos2d-x for C++","fork":false,"url":"https://api.github.com/repos/cocos2d/cocos2d-x","forks_url":"https://api.github.com/repos/cocos2d/cocos2d-x/forks","keys_url":"https://api.github.com/repos/cocos2d/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cocos2d/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cocos2d/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/cocos2d/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/events","assignees_url":"https://api.github.com/repos/cocos2d/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/cocos2d/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/cocos2d/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/cocos2d/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/cocos2d/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/cocos2d/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/cocos2d/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/cocos2d/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/comments{/number}","contents_url":"https://api.github.com/repos/cocos2d/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/cocos2d/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cocos2d/cocos2d-x/merges","archive_url":"https://api.github.com/repos/cocos2d/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cocos2d/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/cocos2d/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/cocos2d/cocos2d-x/releases{/id}","created_at":"2010-11-18T23:17:00Z","updated_at":"2015-11-23T05:03:16Z","pushed_at":"2015-11-23T07:45:26Z","git_url":"git://github.com/cocos2d/cocos2d-x.git","ssh_url":"git@github.com:cocos2d/cocos2d-x.git","clone_url":"https://github.com/cocos2d/cocos2d-x.git","svn_url":"https://github.com/cocos2d/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":1380034,"stargazers_count":6994,"watchers_count":6994,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4934,"mirror_url":null,"open_issues_count":916,"forks":4934,"open_issues":916,"watchers":6994,"default_branch":"v3"}},"_links":{"self":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/14459"},"html":{"href":"https://github.com/cocos2d/cocos2d-x/pull/14459"},"issue":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/14459"},"comments":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/14459/comments"},"review_comments":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/14459/comments"},"review_comment":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/14459/commits"},"statuses":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/4e0d779b4716195b35ffedf93a6525e9ddf474f6"}}}}