Guest User

Untitled

a guest
Jan 17th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. ArrayList<RelativeLayout> containers2 = new ArrayList<>();
  2. containers2.add(dayNameContainer);
  3. containers2.add(dayNumberContainer);
  4. containers2.add(monthContainer);
  5. containers2.add(yearContainer);
  6.  
  7.  
  8. for (RelativeLayout container : containers2) {
  9. addContainerToView(container, 0);
  10. addContainerToView(container, 1);
  11. addContainerToView(container, 2);
  12. addContainerToView(container, 3);
  13. }
  14.  
  15. public void addContainerToView(RelativeLayout container, int indexPath) {
  16. // HERE (BEFORE THE IF STATEMENT) THE INDEXPATH PARAMETER IS CORRECT
  17. if (sharedPreferences.getIntegerValue(container.getTag().toString()) == indexPath) {
  18. // ISSUE HERE CONSTANTLY RECIEVING INDEX PATH AS 0 BUT ONLY AFTER THE IF STATEMENT ABOVE
  19.  
  20. positioningContainer.addDragView(container, container);
  21. }
  22. }
Add Comment
Please, Sign In to add comment