Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. @Override
  2. public View onCreateView(LayoutInflater inflater, ViewGroup container,
  3. Bundle savedInstanceState) {
  4. View v = inflater.inflate(R.layout.view, container, false);
  5. presenter.attach(this);
  6. presenter.loadData();
  7. return v;
  8. }
  9.  
  10. String getId(){
  11. return getArguments().getString("ID", random());
  12. }
  13.  
  14. setData(Data data){
  15. //myViews set data params
  16. }
  17.  
  18. void attach(MyView v){
  19. view = v;
  20. v.setData(data);
  21. }
  22. void loadData(){
  23. String id = view.getId();
  24. data = repository.getData(id)
  25. view.setData(data);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement