{"action":"created","issue":{"url":"https://api.github.com/repos/afollestad/material-dialogs/issues/526","labels_url":"https://api.github.com/repos/afollestad/material-dialogs/issues/526/labels{/name}","comments_url":"https://api.github.com/repos/afollestad/material-dialogs/issues/526/comments","events_url":"https://api.github.com/repos/afollestad/material-dialogs/issues/526/events","html_url":"https://github.com/afollestad/material-dialogs/issues/526","id":76666885,"number":526,"title":"AppCompatTextView cannot be cast to android.widget.CheckBox","user":{"login":"smemamian","id":2825656,"avatar_url":"https://avatars.githubusercontent.com/u/2825656?v=3","gravatar_id":"","url":"https://api.github.com/users/smemamian","html_url":"https://github.com/smemamian","followers_url":"https://api.github.com/users/smemamian/followers","following_url":"https://api.github.com/users/smemamian/following{/other_user}","gists_url":"https://api.github.com/users/smemamian/gists{/gist_id}","starred_url":"https://api.github.com/users/smemamian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smemamian/subscriptions","organizations_url":"https://api.github.com/users/smemamian/orgs","repos_url":"https://api.github.com/users/smemamian/repos","events_url":"https://api.github.com/users/smemamian/events{/privacy}","received_events_url":"https://api.github.com/users/smemamian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-15T09:31:26Z","updated_at":"2015-05-15T21:49:32Z","closed_at":null,"body":"Hi\r\n\r\nI would like to set checkbox's gravity value from default left to right using `.itemsGravity(GravityEnum.END)` and `.contentGravity(GravityEnum.END)` method, but when I call it I get these errors:\r\n\r\n```gradle\r\n java.lang.ClassCastException: android.support.v7.widget.AppCompatTextView cannot be cast to android.widget.CheckBox\r\n            at com.afollestad.materialdialogs.MaterialDialog.onItemClick(MaterialDialog.java:174)\r\n            at android.widget.AdapterView.performItemClick(AdapterView.java:301)\r\n            at android.widget.AbsListView.performItemClick(AbsListView.java:1519)\r\n            at android.widget.AbsListView$PerformClick.run(AbsListView.java:3278)\r\n            at android.widget.AbsListView$1.run(AbsListView.java:4327)\r\n            at android.os.Handler.handleCallback(Handler.java:725)\r\n            at android.os.Handler.dispatchMessage(Handler.java:92)\r\n            at android.os.Looper.loop(Looper.java:137)\r\n            at android.app.ActivityThread.main(ActivityThread.java:5293)\r\n            at java.lang.reflect.Method.invokeNative(Native Method)\r\n            at java.lang.reflect.Method.invoke(Method.java:511)\r\n            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)\r\n            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)\r\n            at dalvik.system.NativeStart.main(Native Method)\r\n```\r\n\r\n```java\r\nnew MaterialDialog.Builder(getActivity())\r\n    .title(r.getString(R.string.str_title_categories_simple_search))\r\n    .items(array_categories)\r\n    .itemsCallbackMultiChoice(null, new MaterialDialog.ListCallbackMultiChoice() {\r\n        @Override\r\n        public boolean onSelection(MaterialDialog dialog, Integer[] which, CharSequence[] text) {\r\n            /**\r\n             * If you use alwaysCallMultiChoiceCallback(), which is discussed below,\r\n             * returning false here won't allow the newly selected check box to actually be selected.\r\n             * See the limited multi choice dialog example in the sample project for details.\r\n             **/\r\n            return true;\r\n        }\r\n    })\r\n    .itemsGravity(GravityEnum.END)\r\n    .contentGravity(GravityEnum.END)\r\n    .positiveText(android.R.string.ok)\r\n    .show();\r\n```"},"comment":{"url":"https://api.github.com/repos/afollestad/material-dialogs/issues/comments/102533043","html_url":"https://github.com/afollestad/material-dialogs/issues/526#issuecomment-102533043","issue_url":"https://api.github.com/repos/afollestad/material-dialogs/issues/526","id":102533043,"user":{"login":"afollestad","id":1820165,"avatar_url":"https://avatars.githubusercontent.com/u/1820165?v=3","gravatar_id":"","url":"https://api.github.com/users/afollestad","html_url":"https://github.com/afollestad","followers_url":"https://api.github.com/users/afollestad/followers","following_url":"https://api.github.com/users/afollestad/following{/other_user}","gists_url":"https://api.github.com/users/afollestad/gists{/gist_id}","starred_url":"https://api.github.com/users/afollestad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afollestad/subscriptions","organizations_url":"https://api.github.com/users/afollestad/orgs","repos_url":"https://api.github.com/users/afollestad/repos","events_url":"https://api.github.com/users/afollestad/events{/privacy}","received_events_url":"https://api.github.com/users/afollestad/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T21:49:32Z","updated_at":"2015-05-15T21:49:32Z","body":"You might be using an old version. The error log doesn't match up with where code actually is now."}}