{"action":"created","issue":{"url":"https://api.github.com/repos/gabrielemariotti/cardslib/issues/475","labels_url":"https://api.github.com/repos/gabrielemariotti/cardslib/issues/475/labels{/name}","comments_url":"https://api.github.com/repos/gabrielemariotti/cardslib/issues/475/comments","events_url":"https://api.github.com/repos/gabrielemariotti/cardslib/issues/475/events","html_url":"https://github.com/gabrielemariotti/cardslib/issues/475","id":93640926,"number":475,"title":"Animate a card on click","user":{"login":"dannybabbev","id":11413212,"avatar_url":"https://avatars.githubusercontent.com/u/11413212?v=3","gravatar_id":"","url":"https://api.github.com/users/dannybabbev","html_url":"https://github.com/dannybabbev","followers_url":"https://api.github.com/users/dannybabbev/followers","following_url":"https://api.github.com/users/dannybabbev/following{/other_user}","gists_url":"https://api.github.com/users/dannybabbev/gists{/gist_id}","starred_url":"https://api.github.com/users/dannybabbev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannybabbev/subscriptions","organizations_url":"https://api.github.com/users/dannybabbev/orgs","repos_url":"https://api.github.com/users/dannybabbev/repos","events_url":"https://api.github.com/users/dannybabbev/events{/privacy}","received_events_url":"https://api.github.com/users/dannybabbev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gabrielemariotti/cardslib/labels/waitForReply","name":"waitForReply","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-07T22:10:20Z","updated_at":"2015-07-08T12:42:16Z","closed_at":null,"body":"Hello,\r\nIs there a way of applying a view animation on card on click, like the ones provided in AndroidViewAnimations library? I've tried to get the View from the current card with the getInnerView() method but an UnsupportedOperationException is thrown.\r\n\r\n```java\r\njava.lang.UnsupportedOperationException: addView(View) is not supported in AdapterView\r\n```"},"comment":{"url":"https://api.github.com/repos/gabrielemariotti/cardslib/issues/comments/119564323","html_url":"https://github.com/gabrielemariotti/cardslib/issues/475#issuecomment-119564323","issue_url":"https://api.github.com/repos/gabrielemariotti/cardslib/issues/475","id":119564323,"user":{"login":"dannybabbev","id":11413212,"avatar_url":"https://avatars.githubusercontent.com/u/11413212?v=3","gravatar_id":"","url":"https://api.github.com/users/dannybabbev","html_url":"https://github.com/dannybabbev","followers_url":"https://api.github.com/users/dannybabbev/followers","following_url":"https://api.github.com/users/dannybabbev/following{/other_user}","gists_url":"https://api.github.com/users/dannybabbev/gists{/gist_id}","starred_url":"https://api.github.com/users/dannybabbev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannybabbev/subscriptions","organizations_url":"https://api.github.com/users/dannybabbev/orgs","repos_url":"https://api.github.com/users/dannybabbev/repos","events_url":"https://api.github.com/users/dannybabbev/events{/privacy}","received_events_url":"https://api.github.com/users/dannybabbev/received_events","type":"User","site_admin":false},"created_at":"2015-07-08T12:42:16Z","updated_at":"2015-07-08T12:42:16Z","body":"I use AndroidViewAnimation-s library like this, where Techniques is whatever I choose and playOn() method, which requires a View:\r\n```java\r\nYoYo.with(Techniques.Tada)\r\n    .playOn(findViewById(R.id.edit_area));\r\n```\r\nI try go get the view from the Card returned by the onClick() method, which requires Context and a ViewGroup. ViewGroup is my CardGridView in the layout:\r\n\r\n```java\r\ncardGen.setOnClickListener(new Card.OnCardClickListener() {\r\n                @Override\r\n                public void onClick(Card card, View view) {\r\n          \r\n                    //FIXME: Add animation\r\n                    YoYo.with(Techniques.FlipOutX)\r\n                    .playOn(card.getInnerView(getBaseContext() , (ViewGroup) findViewById(R.id.myGrid)));\r\n                }\r\n            });\r\n            mCards.add(cardGen);\r\n        } \r\n```\r\n\r\nWith this approach an UnsupportedOperationException is thrown. Maybe this is not the right way to handle this situation so i change my statement to get the card View from CardAdapter , statement looks like:\r\n\r\n```java\r\n\r\nmCardArrayAdapter.getView(getCardIndex(card) , /*covertView needed*/ , R.id.myGrid);\r\n\r\n```\r\n\r\nBut I don't know how and from where to get convertView.\r\n\r\nAny suggestions here?\r\n\r\n\r\n"}}