Last active
August 1, 2017 02:20
-
-
Save oznus/732c24277df8d7b39f63efb54ac16cc2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends AppCompatActivity { | |
@Inject | |
MyAppNetworkService myAppNetworkService; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
} | |
List<Object> getUserFromNetwork() { | |
return myAppNetworkService.getUsers(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyAppNetworkService { | |
public List<Object> getUsers() { | |
List<Object> objects = new ArrayList<>(); | |
//code that fetch users from the network | |
//...................................... | |
return objects; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment