Or even worse, using two Lists when you really need a Map.ĭon't get me wrong: Using Collections.sort is not an error or a flaw. But I've stopped counting how often I see someone using a List when they want to ensure there are no duplictes, and then build that functionality themselves. It's not as demonstrative in this case, because you just save one line. Using the right collection for the right task is a key to write short and bug free code. The set does the same, but does it much faster. If you use a List, and insert values very often, and the list may be read between those insertions, then you have to sort the list after every insertion. So much information in a short declaration. Just tap that option and everything will drop into place. This will give you the option to have alphabetical order. automatically re-arranging all the icons which come after it).
#Go launcher z sort apps alphabetically install#
In particular, if I install a new app, and drag its icon to the home screen, I want it to be inserted there in alphabetical order (i.e. I want all my home screen icons to be listed by alphabetical order. An experienced programmer looks at TreeSet countyNames and instantly knows: this is a sorted collection of Strings without duplicates, and I can be sure that this is true at every moment. Alphabetize your apps: In the apps tray, hit menu in the top right-hand corner, then sort. auto arrange icons on home screen alphabetically1.
If you need duplicates, stick to your List.
#Go launcher z sort apps alphabetically pro#
Depending on your situation this may be a pro or a con.