<div dir="ltr">Then I would have to duplicate getLocations(int position) in AudioBrowserFragment.java and AudioAlbumsSongFragment, because I can't sort the ArrayList<String> that getLocations(int position) returns, but only an ArrayList<Media> from getMedia(int position). Another option would be a static utils-method. Both of these options are uglier than the current way of doing it imo. That's why I decided to do it with a boolean switch as the second parameter.<div>Let me know what you think.</div><div><br></div><div>Greets</div><div>Enno</div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-05 16:13 GMT+01:00 Geoffrey Métais <span dir="ltr"><<a href="mailto:geoffrey.metais@gmail.com" target="_blank">geoffrey.metais@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>This sorting will only by used while loading an album or appending it in current playlist.<br><br></div>I would prefer you to not sort in getLocations, but call Collections.sort in handleContextItemSelected and in OnItemClickListener for album in AudioBrowserFragment.<br><br></div>This should prevent adding too much code in AudioBrowserListAdapter and computing useless checks/sorts.<br><br></div>Otherwise it's all good.<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Dec 5, 2014 at 2:50 AM, Enno G. <span dir="ltr"><<a href="mailto:mrmaffen@googlemail.com" target="_blank">mrmaffen@googlemail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hey,<div><br></div><div>setting a default number for the field mTrackNumber in Media.java wouldn't change anything. Setting an empty String in TrackInfo.java is wrong in my opinion.</div><div>So I just added an "if (empty || null)"-check, so that the NumberFormatException is only thrown if the String is non-null, non-empty and not parsable.</div><div><br></div><div>Greets</div><span><font color="#888888"><div>Enno</div></font></span></div>
<br></div></div><span class="">_______________________________________________<br>
Android mailing list<br>
<a href="mailto:Android@videolan.org" target="_blank">Android@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/android" target="_blank">https://mailman.videolan.org/listinfo/android</a><br>
<br></span></blockquote></div><br></div>
<br>_______________________________________________<br>
Android mailing list<br>
<a href="mailto:Android@videolan.org">Android@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/android" target="_blank">https://mailman.videolan.org/listinfo/android</a><br>
<br></blockquote></div><br></div>