{"action":"created","issue":{"url":"https://api.github.com/repos/TVerbaere/PFE/issues/5","labels_url":"https://api.github.com/repos/TVerbaere/PFE/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/TVerbaere/PFE/issues/5/comments","events_url":"https://api.github.com/repos/TVerbaere/PFE/issues/5/events","html_url":"https://github.com/TVerbaere/PFE/issues/5","id":124385378,"number":5,"title":"Automatically disabling views in Android apps","user":{"login":"rouvoy","id":1086919,"avatar_url":"https://avatars.githubusercontent.com/u/1086919?v=3","gravatar_id":"","url":"https://api.github.com/users/rouvoy","html_url":"https://github.com/rouvoy","followers_url":"https://api.github.com/users/rouvoy/followers","following_url":"https://api.github.com/users/rouvoy/following{/other_user}","gists_url":"https://api.github.com/users/rouvoy/gists{/gist_id}","starred_url":"https://api.github.com/users/rouvoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rouvoy/subscriptions","organizations_url":"https://api.github.com/users/rouvoy/orgs","repos_url":"https://api.github.com/users/rouvoy/repos","events_url":"https://api.github.com/users/rouvoy/events{/privacy}","received_events_url":"https://api.github.com/users/rouvoy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-30T18:45:03Z","updated_at":"2016-01-03T14:48:37Z","closed_at":null,"body":"The minimal feature to support is to disable [Views](http://developer.android.com/reference/android/view/View.html) (incl. buttons) within an [Android activity](http://developer.android.com/reference/android/app/Activity.html).\r\n\r\nTypically, from Javascript, one should be able to write the following code snippet:\r\n```javascript\r\nvar gui = import(\"gui\");\r\nvar wifi = import(\"wifi\");\r\n\r\ngui.onActivityCreated(\"MainActivity\", function(evt) {\r\n    if (!wifi.isConnected()) {\r\n        gui.viewById(\"@+id/my_button\").setEnabled(false);\r\n    }\r\n});\r\n```\r\n\r\nWhich implies to define a dedicated facade declared as a Java interface and defining the signatures of the methods `onActivityCreated` and `viewById`."},"comment":{"url":"https://api.github.com/repos/TVerbaere/PFE/issues/comments/168502653","html_url":"https://github.com/TVerbaere/PFE/issues/5#issuecomment-168502653","issue_url":"https://api.github.com/repos/TVerbaere/PFE/issues/5","id":168502653,"user":{"login":"TVerbaere","id":10559544,"avatar_url":"https://avatars.githubusercontent.com/u/10559544?v=3","gravatar_id":"","url":"https://api.github.com/users/TVerbaere","html_url":"https://github.com/TVerbaere","followers_url":"https://api.github.com/users/TVerbaere/followers","following_url":"https://api.github.com/users/TVerbaere/following{/other_user}","gists_url":"https://api.github.com/users/TVerbaere/gists{/gist_id}","starred_url":"https://api.github.com/users/TVerbaere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TVerbaere/subscriptions","organizations_url":"https://api.github.com/users/TVerbaere/orgs","repos_url":"https://api.github.com/users/TVerbaere/repos","events_url":"https://api.github.com/users/TVerbaere/events{/privacy}","received_events_url":"https://api.github.com/users/TVerbaere/received_events","type":"User","site_admin":false},"created_at":"2016-01-03T14:48:37Z","updated_at":"2016-01-03T14:48:37Z","body":"Ok, if you prefer... It's changed !\r\nNow you can call :\r\n\r\ngui.viewById(\"@+id/my_button\")\r\nor\r\ngui.viewById(\"my_button\")."}}