saving and restoring scrollbar position

by Stefan » Sat, 14 Mar 2009 02:11:15 GMT


Sponsored Links
 Hi,
I have an ExpandableListView with lots of elements in it. I need to
remember how much the list is scrolled, save it and later on restore
the list scrolled at the same position.
Because of that I have two problems:

First: how to get the scrolled coordinates?
I tried with getScrollX() and getScrollY(), but they are always
returning (0,0) . I also tried getGlobalVisibleRect(), no success
either.

Second: Once I have the coordinates how do I restore them?
Again I tried using the provided scrollTo() and scrollBy() functions
(not with real values cause i can't get them). The list is scrolled,
great, but the scrollbar stays in its initial position, not great at
all. I again also tried requestRectangleOnScreen, but again no success
either.

This tasks seems to me that should not be so difficult to accomplish,
but nevertheless I have no idea how to. Any help will be greatly
appreciated.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Programatic injection of SMS to emulator?

Hi all,

I understand that it is possible to "send" an SMS message to the
emulator using adb with a command line like:

sms send <senderPhoneNumber> <textmessage>

However, is it possible to send an SMS message to the emulator from
another (java) program, in particular, from a (Tomcat) servlet.
Coolest would be a remote servlet, but second-best would be from a
Tomcat running on the same machine (for a proof of concept).

Thanks in advance,
Ken Bowen
--~--~---------~--~----~------------~-------~--~----~

2. Problem in Sending Sms through telnet

Hi,



           When i send sms through Telnet .I got error."Unknown
command"


            Here my command
            telnet localhost 5554 and i typed in telnet as below

           "sms send +5085551212 hello"

         Is i have to mention the port number in my code?

Can anybody please tell me the reason?

Thanks
judy





--~--~---------~--~----~------------~-------~--~----~

3. AlertDialog Item Icons

4. real phone authentication

5. Not able to change background.

6. How to add more then one spinner in relative layout

7. How to explicitly activate a button by pressing a key from the keypad?