[android-developers] CalendarView - Select Day on LongClick

2012-05-11 Thread andineupert
Hey, I want to select a day per longclick and then do some other
stuff.
The OnDateChangeListener only reacts on a click but not on a long
click. OnClickListener and OnLongClickListener are only reacting when
clicking on the header of the calendar, not on days.
I intercepted Touch Events from the calendars children to recognize
longclicks by myself. This is working but the calendar isn't
recognizing the longclick and so the currently longclicked date isn't
selected.

Are there any other approaches to have longclicks working?

I thought about registering OnLongClickListeners on some children of
CalendarView, but I don't know how to get the right children elements
(the elements which represent the days).

Thanks for any help!

-- 
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] Catch LongClicks on CalendarView

2012-05-11 Thread andineupert
Hey guys,
I want to react on LongClicks on the 
CalendarViewhttp://developer.android.com/reference/android/widget/CalendarView.html-Widget.
 
There are two listeners which I hoped let me reach this goal. 
OnDateChangeListener  OnLongClickListener. But OnDateChangeListener only 
reacts when (short)-clicking on a day, OnLongClickListener only reacts when 
clicking on the header of the widget.
Because of that problem I intercepted touch events of the CalendarView 
children and analyzed them to recognise LongClicks (My 
CustomCalendarViewhttp://pastebin.com/8z5j7aQM). 
Thats working but the CalendarView itself isn't recognising them and so the 
currently longclicked day isn't selected.
Has anybody a idea how I make the CalendarView select a longclicked day?

Thanks!

-- 
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