{"action":"created","issue":{"url":"https://api.github.com/repos/frankiesardo/icepick/issues/60","labels_url":"https://api.github.com/repos/frankiesardo/icepick/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/frankiesardo/icepick/issues/60/comments","events_url":"https://api.github.com/repos/frankiesardo/icepick/issues/60/events","html_url":"https://github.com/frankiesardo/icepick/issues/60","id":98945427,"number":60,"title":"Incompatible with AndroidAnnotations?","user":{"login":"NickThissen","id":7407292,"avatar_url":"https://avatars.githubusercontent.com/u/7407292?v=3","gravatar_id":"","url":"https://api.github.com/users/NickThissen","html_url":"https://github.com/NickThissen","followers_url":"https://api.github.com/users/NickThissen/followers","following_url":"https://api.github.com/users/NickThissen/following{/other_user}","gists_url":"https://api.github.com/users/NickThissen/gists{/gist_id}","starred_url":"https://api.github.com/users/NickThissen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickThissen/subscriptions","organizations_url":"https://api.github.com/users/NickThissen/orgs","repos_url":"https://api.github.com/users/NickThissen/repos","events_url":"https://api.github.com/users/NickThissen/events{/privacy}","received_events_url":"https://api.github.com/users/NickThissen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-04T11:20:01Z","updated_at":"2015-08-04T12:13:46Z","closed_at":null,"body":"This seems like a great library because I hate the 'save/load instance state' boilerplate code.\r\n\r\nI have found however that it does not work in combination with AndroidAnnotations. When I decorate an Activity with @EActivity attribute (and reference it using the underscore name in the manifest, eg \"MainActivity_\") then any fields decorated with @Icicle are no longer saved automatically.\r\n\r\nMost likely the issue is that AndroidAnnotations generates the new class with the underscore name and icepick is not compatible with this?\r\n\r\nIs there anything I can do to solve this?"},"comment":{"url":"https://api.github.com/repos/frankiesardo/icepick/issues/comments/127580300","html_url":"https://github.com/frankiesardo/icepick/issues/60#issuecomment-127580300","issue_url":"https://api.github.com/repos/frankiesardo/icepick/issues/60","id":127580300,"user":{"login":"NickThissen","id":7407292,"avatar_url":"https://avatars.githubusercontent.com/u/7407292?v=3","gravatar_id":"","url":"https://api.github.com/users/NickThissen","html_url":"https://github.com/NickThissen","followers_url":"https://api.github.com/users/NickThissen/followers","following_url":"https://api.github.com/users/NickThissen/following{/other_user}","gists_url":"https://api.github.com/users/NickThissen/gists{/gist_id}","starred_url":"https://api.github.com/users/NickThissen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickThissen/subscriptions","organizations_url":"https://api.github.com/users/NickThissen/orgs","repos_url":"https://api.github.com/users/NickThissen/repos","events_url":"https://api.github.com/users/NickThissen/events{/privacy}","received_events_url":"https://api.github.com/users/NickThissen/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T12:13:46Z","updated_at":"2015-08-04T12:13:46Z","body":"It says it's trying superclass MainActivity but still can't find it:\r\n\r\n\t08-04 14:11:30.641  27157-27157/nl.nickthissen.tablayouttest D/Icepick﹕ Not found. Trying superclass nl.nickthissen.tablayouttest.MainActivity\r\n\t08-04 14:11:30.641  27157-27157/nl.nickthissen.tablayouttest D/Icepick﹕ Not found. Trying superclass android.support.v7.app.AppCompatActivity\r\n\t08-04 14:11:30.642  27157-27157/nl.nickthissen.tablayouttest D/Icepick﹕ MISS: Reached framework class. Abandoning search.\r\n\r\n\r\nThis is the generated MainActivity_\r\n\r\n\r\n\tpackage nl.nickthissen.tablayouttest;\r\n\r\n\timport android.app.Activity;\r\n\timport android.content.Context;\r\n\timport android.content.Intent;\r\n\timport android.os.Bundle;\r\n\timport android.view.KeyEvent;\r\n\timport android.view.View;\r\n\timport android.view.ViewGroup.LayoutParams;\r\n\timport org.androidannotations.api.SdkVersionHelper;\r\n\timport org.androidannotations.api.view.HasViews;\r\n\timport org.androidannotations.api.view.OnViewChangedNotifier;\r\n\r\n\tpublic final class MainActivity_\r\n\t\textends MainActivity\r\n\t\timplements HasViews\r\n\t{\r\n\r\n\t\tprivate final OnViewChangedNotifier onViewChangedNotifier_ = new OnViewChangedNotifier();\r\n\r\n\t\t@Override\r\n\t\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\t\tOnViewChangedNotifier previousNotifier = OnViewChangedNotifier.replaceNotifier(onViewChangedNotifier_);\r\n\t\t\tinit_(savedInstanceState);\r\n\t\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\tOnViewChangedNotifier.replaceNotifier(previousNotifier);\r\n\t\t}\r\n\r\n\t\tprivate void init_(Bundle savedInstanceState) {\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic void setContentView(int layoutResID) {\r\n\t\t\tsuper.setContentView(layoutResID);\r\n\t\t\tonViewChangedNotifier_.notifyViewChanged(this);\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic void setContentView(View view, LayoutParams params) {\r\n\t\t\tsuper.setContentView(view, params);\r\n\t\t\tonViewChangedNotifier_.notifyViewChanged(this);\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic void setContentView(View view) {\r\n\t\t\tsuper.setContentView(view);\r\n\t\t\tonViewChangedNotifier_.notifyViewChanged(this);\r\n\t\t}\r\n\r\n\t\tpublic static MainActivity_.IntentBuilder_ intent(Context context) {\r\n\t\t\treturn new MainActivity_.IntentBuilder_(context);\r\n\t\t}\r\n\r\n\t\tpublic static MainActivity_.IntentBuilder_ intent(android.app.Fragment fragment) {\r\n\t\t\treturn new MainActivity_.IntentBuilder_(fragment);\r\n\t\t}\r\n\r\n\t\tpublic static MainActivity_.IntentBuilder_ intent(android.support.v4.app.Fragment supportFragment) {\r\n\t\t\treturn new MainActivity_.IntentBuilder_(supportFragment);\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\r\n\t\t\tif (((SdkVersionHelper.getSdkInt()< 5)&&(keyCode == KeyEvent.KEYCODE_BACK))&&(event.getRepeatCount() == 0)) {\r\n\t\t\t\tonBackPressed();\r\n\t\t\t}\r\n\t\t\treturn super.onKeyDown(keyCode, event);\r\n\t\t}\r\n\r\n\t\tpublic static class IntentBuilder_ {\r\n\r\n\t\t\tprivate Context context_;\r\n\t\t\tprivate final Intent intent_;\r\n\t\t\tprivate android.app.Fragment fragment_;\r\n\t\t\tprivate android.support.v4.app.Fragment fragmentSupport_;\r\n\r\n\t\t\tpublic IntentBuilder_(Context context) {\r\n\t\t\t\tcontext_ = context;\r\n\t\t\t\tintent_ = new Intent(context, MainActivity_.class);\r\n\t\t\t}\r\n\r\n\t\t\tpublic IntentBuilder_(android.app.Fragment fragment) {\r\n\t\t\t\tfragment_ = fragment;\r\n\t\t\t\tcontext_ = fragment.getActivity();\r\n\t\t\t\tintent_ = new Intent(context_, MainActivity_.class);\r\n\t\t\t}\r\n\r\n\t\t\tpublic IntentBuilder_(android.support.v4.app.Fragment fragment) {\r\n\t\t\t\tfragmentSupport_ = fragment;\r\n\t\t\t\tcontext_ = fragment.getActivity();\r\n\t\t\t\tintent_ = new Intent(context_, MainActivity_.class);\r\n\t\t\t}\r\n\r\n\t\t\tpublic Intent get() {\r\n\t\t\t\treturn intent_;\r\n\t\t\t}\r\n\r\n\t\t\tpublic MainActivity_.IntentBuilder_ flags(int flags) {\r\n\t\t\t\tintent_.setFlags(flags);\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\r\n\t\t\tpublic void start() {\r\n\t\t\t\tcontext_.startActivity(intent_);\r\n\t\t\t}\r\n\r\n\t\t\tpublic void startForResult(int requestCode) {\r\n\t\t\t\tif (fragmentSupport_!= null) {\r\n\t\t\t\t\tfragmentSupport_.startActivityForResult(intent_, requestCode);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (fragment_!= null) {\r\n\t\t\t\t\t\tfragment_.startActivityForResult(intent_, requestCode);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (context_ instanceof Activity) {\r\n\t\t\t\t\t\t\t((Activity) context_).startActivityForResult(intent_, requestCode);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontext_.startActivity(intent_);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n"}}