{"action":"created","issue":{"url":"https://api.github.com/repos/afollestad/material-dialogs/issues/693","labels_url":"https://api.github.com/repos/afollestad/material-dialogs/issues/693/labels{/name}","comments_url":"https://api.github.com/repos/afollestad/material-dialogs/issues/693/comments","events_url":"https://api.github.com/repos/afollestad/material-dialogs/issues/693/events","html_url":"https://github.com/afollestad/material-dialogs/issues/693","id":107149169,"number":693,"title":"Simple Dialogs (Guidelines spec) crashes on RTL languages (Arabic)","user":{"login":"akbarsha03","id":4894571,"avatar_url":"https://avatars.githubusercontent.com/u/4894571?v=3","gravatar_id":"","url":"https://api.github.com/users/akbarsha03","html_url":"https://github.com/akbarsha03","followers_url":"https://api.github.com/users/akbarsha03/followers","following_url":"https://api.github.com/users/akbarsha03/following{/other_user}","gists_url":"https://api.github.com/users/akbarsha03/gists{/gist_id}","starred_url":"https://api.github.com/users/akbarsha03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akbarsha03/subscriptions","organizations_url":"https://api.github.com/users/akbarsha03/orgs","repos_url":"https://api.github.com/users/akbarsha03/repos","events_url":"https://api.github.com/users/akbarsha03/events{/privacy}","received_events_url":"https://api.github.com/users/akbarsha03/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/afollestad/material-dialogs/labels/bug","name":"bug","color":"E53935"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-18T07:32:53Z","updated_at":"2015-09-18T16:44:40Z","closed_at":null,"body":"Please check your sample app. To reproduce the error change the device language to **Arabic** then tab on **Simple Dialogs (Guidelines spec)** da!da! crash. \r\n\r\nAndroid Device doesn't flip the **MaterialSimpleListAdapter**'s layout for RTL language which causes the error.\r\n\r\n**Crash log:**\r\n\r\n```Gradle\r\njava.lang.ClassCastException: android.widget.ImageView cannot be cast to android.widget.CompoundButton\r\n           at com.afollestad.materialdialogs.simplelist.MaterialSimpleListAdapter.setupGravity(MaterialSimpleListAdapter.java:89)\r\n           at com.afollestad.materialdialogs.simplelist.MaterialSimpleListAdapter.getView(MaterialSimpleListAdapter.java:64)\r\n           at android.widget.AbsListView.obtainView(AbsListView.java:2347)\r\n           at android.widget.ListView.measureHeightOfChildren(ListView.java:1270)\r\n           at android.widget.ListView.onMeasure(ListView.java:1182)\r\n           at android.view.View.measure(View.java:17547)\r\n           at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5535)\r\n           at android.widget.FrameLayout.onMeasure(FrameLayout.java:436)\r\n           at android.view.View.measure(View.java:17547)\r\n           at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5535)\r\n           at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)\r\n           at android.widget.LinearLayout.measureVertical(LinearLayout.java:722)\r\n           at android.widget.LinearLayout.onMeasure(LinearLayout.java:613)\r\n           at android.view.View.measure(View.java:17547)\r\n           at com.afollestad.materialdialogs.internal.MDRootLayout.onMeasure(MDRootLayout.java:199)\r\n           at android.view.View.measure(View.java:17547)\r\n           at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5535)\r\n           at android.widget.FrameLayout.onMeasure(FrameLayout.java:436)\r\n           at android.view.View.measure(View.java:17547)\r\n           at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5535)\r\n           at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)\r\n           at android.widget.LinearLayout.measureVertical(LinearLayout.java:722)\r\n           at android.widget.LinearLayout.onMeasure(LinearLayout.java:613)\r\n           at android.view.View.measure(View.java:17547)\r\n           at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5535)\r\n           at android.widget.FrameLayout.onMeasure(FrameLayout.java:436)\r\n           at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2615)\r\n           at android.view.View.measure(View.java:17547)\r\n\r\n```\r\n\r\n\r\nMy workaround to fix this issue is I have set the **itemsGravity()** to **Gravity.END** which made the crash gone but the **MaterialDialog**'s **MaterialSimpleListAdapter's** items are supposed to appear from Right to Left which looks uglier on RTL.\r\n"},"comment":{"url":"https://api.github.com/repos/afollestad/material-dialogs/issues/comments/141504335","html_url":"https://github.com/afollestad/material-dialogs/issues/693#issuecomment-141504335","issue_url":"https://api.github.com/repos/afollestad/material-dialogs/issues/693","id":141504335,"user":{"login":"akbarsha03","id":4894571,"avatar_url":"https://avatars.githubusercontent.com/u/4894571?v=3","gravatar_id":"","url":"https://api.github.com/users/akbarsha03","html_url":"https://github.com/akbarsha03","followers_url":"https://api.github.com/users/akbarsha03/followers","following_url":"https://api.github.com/users/akbarsha03/following{/other_user}","gists_url":"https://api.github.com/users/akbarsha03/gists{/gist_id}","starred_url":"https://api.github.com/users/akbarsha03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akbarsha03/subscriptions","organizations_url":"https://api.github.com/users/akbarsha03/orgs","repos_url":"https://api.github.com/users/akbarsha03/repos","events_url":"https://api.github.com/users/akbarsha03/events{/privacy}","received_events_url":"https://api.github.com/users/akbarsha03/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T16:44:40Z","updated_at":"2015-09-18T16:44:40Z","body":"Even if I set the \"Force RTL Layout\" in Developer option still it is crashing. @afollestad "}}