{"comment":{"url":"https://api.github.com/repos/android10/Android-CleanArchitecture/comments/15796493","html_url":"https://github.com/android10/Android-CleanArchitecture/commit/3e2e3822796d6216a6b221a9ddbff58ab8134faa#commitcomment-15796493","id":15796493,"user":{"login":"android10","id":1360604,"avatar_url":"https://avatars.githubusercontent.com/u/1360604?v=3","gravatar_id":"","url":"https://api.github.com/users/android10","html_url":"https://github.com/android10","followers_url":"https://api.github.com/users/android10/followers","following_url":"https://api.github.com/users/android10/following{/other_user}","gists_url":"https://api.github.com/users/android10/gists{/gist_id}","starred_url":"https://api.github.com/users/android10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/android10/subscriptions","organizations_url":"https://api.github.com/users/android10/orgs","repos_url":"https://api.github.com/users/android10/repos","events_url":"https://api.github.com/users/android10/events{/privacy}","received_events_url":"https://api.github.com/users/android10/received_events","type":"User","site_admin":false},"position":38,"line":70,"path":"presentation/src/main/java/com/fernandocejas/android10/sample/presentation/view/fragment/UserDetailsFragment.java","commit_id":"3e2e3822796d6216a6b221a9ddbff58ab8134faa","created_at":"2016-02-01T11:24:18Z","updated_at":"2016-02-01T11:24:18Z","body":"I wanted to make sure that when setting the view to the presenter the fragment view is already created.\r\nAlso, this fragment is being retained, for instance, I did not want to reload data when an orientation change happens. \r\n\r\nBy doing it the other way on ```onActivityCreated()``` method I was not taking advantage of the fragment retained instance and data loading was being triggered whenever the activity is recreated on each orientation change. \r\n\r\nYou can see this behavior on the logcat: each UseCase execution is triggered only once :). This was the easiest way I found. If you have any other alternative I will glad to hear it :)"}}