Skip navigation
Currently Being Moderated

sorting object android, FB 4.6

Mar 15, 2013 7:18 AM

Tags: #data #sort #object #4.6

Hello All,

               I have a object that has all the values I need between views. The android app seems to be working fine, but I realized, that when I try to display the text boxes check boxes etc by using addElement() the data object is read in a random fashion so the display is also random.


Let me explain:


data object contains


100TextArea        Object

101TextArea        Object

102CheckBox        Object

103TextArea        Object

104CheckBox        Object

105TextArea        Object

106CheckBox         Object

107TextArea        Object

108TextArea        Object

109CheckBox         Object

110TextArea        Object

99CheckBox           Object

98TextArea          Object

97TextArea          Object


Now I read the data object

for (y:String in data)


     // do something



But, y is chosen random i.e. some times y starts with  109CheckBox then goes to 97TextArea then 103TextArea etc and next time completely new sequence. This causing randomness in my display which not desirable. Please any one can tell me a way to read in an order preferably sorted order. I tried to look for sort, but data object doesn't have a sort() function .


thank you in advance


More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points