Context in ViewPager

I store information if user is logged in SharedPreferences. In my ViewPager adapter I want to check if userIsLoggedIn. Depending on that I will display different fragments. My question is: in order to …

Retrofit2 calls for viewpager

I have created a viewpager with 2 fragments (fragmentA et fragmentB). For each fragment, I have to call a specific service with retrofit2 to get some datas. For example, for the fragmentA I want to …