[android-developers] Re: ViewTreeObserver addOnScrollChangedListener for HorizontalScrollView

2009-07-27 Thread Romain Guy

That's not what the ViewTreeObserver is for. There is no listener on
HorizontalScrollView to do what you want.

On Mon, Jul 27, 2009 at 3:55 PM,
daniel.benedyktdaniel.bened...@gmail.com wrote:

 Hi

 I am trying to detect the scrolling of a HorizontalScrollView.
 So basically I do HorizontalScrollView..getViewTreeObserver
 ().addOnScrollChangedListener .

 But when I scroll the event is not fired.

 Does anyone know the anwser?

 Thanks

 Daniel


 




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ViewTreeObserver addOnScrollChangedListener for HorizontalScrollView

2009-07-27 Thread daniel.benedykt

Thanks Romain,

And any way to detect the Key down and Key up on a
HorizontalScrollview?
I tried with the following code but didnt work:


horizontalScrollViewContainer.setOnKeyListener(new OnKeyListener() {
public boolean onKey(View v, int keyCode,
KeyEvent event) {
Log.d(TAG, KEY= + keyCode);
return false;
}
});

Thanks

Daniel

On Jul 27, 8:17 pm, Romain Guy romain...@google.com wrote:
 That's not what the ViewTreeObserver is for. There is no listener on
 HorizontalScrollView to do what you want.

 On Mon, Jul 27, 2009 at 3:55 PM,





 daniel.benedyktdaniel.bened...@gmail.com wrote:

  Hi

  I am trying to detect the scrolling of a HorizontalScrollView.
  So basically I do HorizontalScrollView..getViewTreeObserver
  ().addOnScrollChangedListener .

  But when I scroll the event is not fired.

  Does anyone know the anwser?

  Thanks

  Daniel

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---