Advertisement
Guest User

Untitled

a guest
Aug 21st, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. public View getView(int position, View convertView, ViewGroup parent) {
  2. View view = convertView;
  3. DashboardInfoHolder dashboardInfoHolder;
  4.  
  5. if (view == null) {
  6. LayoutInflater inflater = (LayoutInflater) this.activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  7. view = inflater.inflate(R.layout.dashboard_infos_list_fragment, parent, false);
  8.  
  9. dashboardInfoHolder = new DashboardInfoHolder();
  10. dashboardInfoHolder.listInfoItem = (LinearLayout) view.findViewById(R.id.listInfoItem);
  11.  
  12. view.setTag(dashboardInfoHolder);
  13.  
  14. FragmentTransaction transaction = this.fragmentManager.beginTransaction();
  15. transaction.add(dashboardInfoHolder.listInfoItem.getId(), this.fragments.get(position));
  16. transaction.commit();
  17.  
  18. } else {
  19. dashboardInfoHolder = (DashboardInfoHolder) view.getTag();
  20. }
  21.  
  22.  
  23. return view;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement