myl142857 / tunesremote-plus

Automatically exported from code.google.com/p/tunesremote-plus
2 stars 0 forks source link

Alphabet letters in fast scroll #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
An very low priority enhancement.

Fast scroll is great but something like this: 
http://www.anddev.org/alphabetic_fastscroll_listview_-_similar_to_contacts-t1012
3.html would ape the mechanism on an iPod to good effect I feel.

This is a fantastic project. Wish I was a better coder to help with things. Can 
do some GUI work for you if needed but things look just fine!

cheers
David

Original issue reported on code.google.com by david.ke...@gmail.com on 25 Nov 2010 at 12:49

GoogleCodeExporter commented 9 years ago
Hey David,

Welcome aboard.  I think this is a great suggestion and will make this ticket 
to Accepted but can't promise who or when it would get worked on.

Jeff Sharkey in the original version of TunesRemote had something like this 
code in the original 2008 version but he never got it working so I pulled the 
code out of TunesRemote+ for now.   Might have to revisit it!

Also please do an Android Market review if you can. :)

Original comment by mellowaredev on 25 Nov 2010 at 1:21

GoogleCodeExporter commented 9 years ago
Changing type from defect to enhancement.

Original comment by mellowaredev on 30 Nov 2010 at 8:31

GoogleCodeExporter commented 9 years ago
Looked into this again? Especially with longer lists, this feature sure would 
be helpful ;) Thanks.

Original comment by cramermaurice@gmail.com on 29 Jun 2011 at 9:11

GoogleCodeExporter commented 9 years ago
Agreed this is how the Apple Remote on the iPhone is with alphabetic side 
letters on long lists.

Jeff Sharkey had started on this feature but could never get it working quite 
properly so it was abandoned.  I have left this ticket open in case some 
ambitious developer wanted to tackle it again and submit a patch. :)

Original comment by mellowaredev on 29 Jun 2011 at 10:12

GoogleCodeExporter commented 9 years ago
Do you still have the code from him? Might be easier for someone to try to work 
with his starting version, than to write it from scratch?

Original comment by cramermaurice@gmail.com on 4 Jul 2011 at 8:54

GoogleCodeExporter commented 9 years ago
AFAIK, the code is in the trunk. Look at 
/src/org/tunesremote/FastScrollView.java    

Original comment by s...@shayel.org on 4 Jul 2011 at 9:05

GoogleCodeExporter commented 9 years ago
Yep its right here.  Jeff Sharkey never got it quite working...

http://code.google.com/p/tunesremote-plus/source/browse/trunk/src/org/tunesremot
e/FastScrollView.java

Original comment by mellowaredev on 4 Jul 2011 at 12:55

GoogleCodeExporter commented 9 years ago
Functioning now in the Artists view, although there is an issue with the scroll 
tab "skipping" 

Original comment by aml.cur...@gmail.com on 19 Apr 2012 at 11:45

GoogleCodeExporter commented 9 years ago
I posted a BETA of this if anyone would like to download and test it out.

http://code.google.com/p/tunesremote-plus/downloads/list

Original comment by mellowaredev on 31 May 2012 at 11:18

GoogleCodeExporter commented 9 years ago
So tried it out, and looking not to bad so far. But two things I noticed with 
this new Beta.
1. Sometimes lists don't load or take a while to load (Now Playing, Artist, 
Playlist etc.) Doubt it is my network, as this worked smoothly with the 
previous version.

2. The Letter Scrolling seems to work fine until you get to T then it starts 
slowly switching to the next letters, while still being at T. Like while still 
being on T, it shows already X.

Original comment by cramermaurice@gmail.com on 12 Jun 2012 at 8:44

GoogleCodeExporter commented 9 years ago
I noticed some slowness in the Artist load too and thought it was the emulator. 
 I think it might have to do with aml.curran moving queries to the background 
thread for ICS based on this patch...

http://code.google.com/p/tunesremote-plus/source/detail?r=97

He mentioned improved performance but I am using Android 2.3.3 and I definitely 
noticed slower paint time for the Artists screen.

Original comment by mellowaredev on 12 Jun 2012 at 8:47

GoogleCodeExporter commented 9 years ago
Well it also happens when I open a playlist. It shows for a bit no playlist 
found, and for the other no artist found. I am using also on my phone 2.3.3

Original comment by cramermaurice@gmail.com on 12 Jun 2012 at 8:49

GoogleCodeExporter commented 9 years ago
Ok, so here's what's going on.

In the old version, the list of artists etc would be loaded as the activity 
loaded. This meant that they showed immediately but caused a small delay in 
starting the activity (if you notice, when you press the Artists/Playlists menu 
item there's a bit of a pause). 

In the new version, the activity is loaded and then the list of artists, which 
eliminates the delay pressing the menu button but causes "No artists" to show 
up until they're loaded. This way looks a bit uglier but means that the app can 
be upgraded to use the Holo UI in a later revision. 

If anyone has any suggestions as to fix this, go for it. Would simply having a 
loading message show (instead of "No Artists") be better/acceptable?

Regarding point 2 in comment 10: This works fine on mine. If you're at the end 
of the list of artists, it won't scroll any further, this is expected 
behaviour. I'm bad at explaining thing so I attached an example - you can see 
that I'm at the end of the list of artists but the artists beginning with "Y" 
are already on the screen, it won't move them up because there's nothing below 
30 Seconds to Mars. If this isn't what's happening with yours, it'd be great if 
you'd send a screenshot please!

Original comment by aml.cur...@gmail.com on 13 Jun 2012 at 12:46

GoogleCodeExporter commented 9 years ago

Original comment by aml.cur...@gmail.com on 13 Jun 2012 at 12:52

Attachments:

GoogleCodeExporter commented 9 years ago
Just as two more examples. And I'm not at the end of the list here. It all 
works up to T and then it messes up. And I thought first, well maybe the The 
was added and so it just reads the letter of the first work, but as you can see 
on my example this is not the case. This is also not the end of the list.

Original comment by cramermaurice@gmail.com on 14 Jun 2012 at 6:52

Attachments:

GoogleCodeExporter commented 9 years ago
Just a thought, somewhere in the T's or maybe the letter before T do you have 
any Artists that Start with a weird UNICODE or UTF character by any chance?

Original comment by mellowaredev on 14 Jun 2012 at 8:47

GoogleCodeExporter commented 9 years ago
Because it looks like the code only assume's 26 characters and not for bands 
starting with a number like 10,000 Maniacs or if the letter is a Unicode 
character like Umlaut.

         // Set up alphabetSections, done in code because it's fiddly to do by hand
         alphabetSections = new Character[26];
         for (int i = 0; i < 26; i++) {
            alphabetSections[i] = sAlphabet.charAt(i);
         }

Original comment by mellowaredev on 14 Jun 2012 at 8:50

GoogleCodeExporter commented 9 years ago
I think melloware is right, I changed U2 to Ü2 and it then stopped working 
between U and Y. I've tried adding Ü into the alphabetSections (that didn't 
seem to work) and using java.text.Normalizer (only available to Gingerbread and 
above so would require a backport). I found replacing all Ü with U in the 
"nice" list in the ArtistsAdapter worked well, but then artists beginning with 
Ü show under U, and it would surely require every accent to be checked and 
replaced.

if (mlit.length() > 0 && !mlit.startsWith("mshc")) {
      results.add(resp);
      nice.add(mlit.replaceAll("The ", "").toUpperCase().replaceAll("Ü", "U"));
}

Original comment by aml.cur...@gmail.com on 14 Jun 2012 at 11:37

GoogleCodeExporter commented 9 years ago
There is a more clever way of doing this generically.  I think you want to 
check the ascii code and anything greater than A or less than Z gets put in the 
'*' bucket.

pseudocode...
if (firstLetter < 'A') || (firstLetter > 'Z') then...

This way all 0-9 and Ü or any other character will be put in the letter '*'.  
It is not great but I think this is what the Apple Remote does...

Original comment by mellowaredev on 15 Jun 2012 at 12:16

GoogleCodeExporter commented 9 years ago
Forgot to mention you can probably use the Ascii code for 65 for A etc if you 
need to instead of using java.text.Normalizer.

Original comment by mellowaredev on 15 Jun 2012 at 12:17

GoogleCodeExporter commented 9 years ago
Hmm, but the problem there is that iTunes delivers all the results starting 
with Ü with (before or after, I'm not sure) the ones starting with U, meaning 
if we were to put all the ones with Ü at the bottom we'd have to manually swap 
values in the Artists list which would get really confusing. If you do what you 
suggested without moving the Ü values to the bottom, it doesn't work.

Original comment by aml.cur...@gmail.com on 19 Jun 2012 at 3:44

GoogleCodeExporter commented 9 years ago
Really so i wonder how it converts Ü to U because there could be many more 
combinations right of Unicode characters I wonder how they map them to an ascii 
letter.

I think you still need to handle 0-9 as # which I believe iTunes does.

Original comment by mellowaredev on 19 Jun 2012 at 4:29

GoogleCodeExporter commented 9 years ago
I would think it probably uses something like a Normalizer, because in my 
iTunes Ü is grouped with U. I've backported the Normalizer class so we could 
use that. As it currently stands, iTunes delivers bands starting with numbers 
anyway so that doesn't break anything.

Original comment by aml.cur...@gmail.com on 19 Jun 2012 at 6:39

GoogleCodeExporter commented 9 years ago
OK I just uploaded the latest BETA with aml.curran's latest fixes if anyone 
wants to test it out!

Original comment by mellowaredev on 19 Jun 2012 at 7:43

GoogleCodeExporter commented 9 years ago
I was thinking about this a bit more - the fast scroller can be enabled without 
showing the letter pop-up, meaning that you can quickly scroll and also that we 
don't have to tackle all these problems. Google Music itself does this on the 
Songs tab. Would it be worth going this route instead?

Original comment by aml.cur...@gmail.com on 26 Jun 2012 at 2:03

GoogleCodeExporter commented 9 years ago
I would definitely be OK with that.

Original comment by mellowaredev on 26 Jun 2012 at 2:16

GoogleCodeExporter commented 9 years ago
So I just got to try the newest beta. 

Well first off to the sorting issue, this I still tried out with the beta7 and 
figured why it is mixing things up like that. So when it switches from T to U 
even tho it's still on The, there is a band "The Used". Looking at MM it is 
sorted in with U there as well, hence probably the switch even tho I'm still at 
the letter T. The same comes with the following ones. Now my question is, why 
is MM sorting the Artists with "The" at the beginning not with the "The..." 
Artist but with the first letter of the second word. And if that is a regular 
MM thing, how can I change that, or is that something that has to be noted in 
TunesRemote??

Now to Beta9 there are two things I noted so far:
> In respect to the new layout, it loads faster on startup and connects also 
nicer. BUT clicking on "Music Library" it will try to load for a bit, and then 
crashes every time. Neither Artist, Albums, or Playlists load. It crashes every 
time.
> Just a minor beatification. On now playing if the title is to long, it will 
write over the song time, instead of going into the next line.

Original comment by cramermaurice@gmail.com on 1 Jul 2012 at 3:50

GoogleCodeExporter commented 9 years ago
So in MM its under Options->Library->Appearance it is filtering out "The" even 
though it is in the database as "The".  MonkeyTunes looks right at your 
database.

As for your crashing issue and the issue where the name is too long aml.curran 
will look into those.  

Original comment by mellowaredev on 1 Jul 2012 at 4:17

GoogleCodeExporter commented 9 years ago
Also there is issue 
http://code.google.com/p/tunesremote-plus/issues/detail?id=95  Created by 
aml.curran around something similar he noticed and he is an iTunes user not an 
MM user.

Original comment by mellowaredev on 1 Jul 2012 at 5:15

GoogleCodeExporter commented 9 years ago
2.5.0 Released to Android Market and it has Fast Scrolling added but the 
Alphabet Scrolling was too quirky.

Original comment by mellowaredev on 4 Jul 2012 at 2:39