Re: [android-developers] How to build row item child views that can overlap rows, for a custom calendar application

2012-05-04 Thread duadinam
Thanks Mark, 

BTW, I love the Commonsware book series, I use them all the time.  

I have a somewhat unrelated question, but depending on the answer, I think 
it might provide another solution to this problem.  

How are ContextMenus and Dialogs displayed on the screen.  They seem to 
live outside any ViewGroup, and are attached to the Window instead. What if 
the Events sit above the ListItems, in the same way that a context menu 
would? 

I'm going to go through the example ios scheduler app and see how it's done 
there. 

Thank you, 
David  

 Thursday, May 3, 2012 9:47:41 AM UTC-4, Mark Murphy (a Commons Guy) wrote:

 On Thu, May 3, 2012 at 9:40 AM, duadinam somethingcleve...@gmail.com 
 wrote: 
  1) If each hour slot is a single row in a ListView, how do you create 
 events 
  that cross rows?  It seems you would have to have views that belong to 
 two 
  parents, which doesn't seem possible. 

 That's not necessarily the case. You could have several rows that look 
 like they form one contiguous event (e.g., colored bubble), even 
 though they are composed of multiple row views. You would have four 
 basic row styles for rows with an event: 

 - One where the entire event fits in the row (whole bubble) 
 - One where the row is the beginning of the event (top of the bubble) 
 - One where the row is the end of the event (bottom of the bubble) 
 - One where the row is in the middle of the event 

 So long as the widths and colors and such are set up properly, the 
 user will see one tall bubble instead of perceiving distinct rows. 

  2) Along the same line, how would you create 2 events in a one-hour 
 slot? 
   Can you populate one row in a ListView with two items? 

 You can make a single ListView row be as complicated as you wish. 
 However, from the standpoint of the Adapter, you cannot have two 
 adapter positions in one row of a ListView. So, you would not have an 
 EventsAdapter, but an HoursAdapter. You would need that anyway, to 
 handle hours without any events. 

  Any suggestions or ideas? 

 Port the iosched timeline to a standalone component and use that: 

 http://code.google.com/p/iosched/ 

 -- 
 Mark Murphy (a Commons Guy) 
 http://commonsware.com | http://github.com/commonsguy 
 http://commonsware.com/blog | http://twitter.com/commonsguy 

 Android Training...At Your Office: http://commonsware.com/training 


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

Re: [android-developers] How to build row item child views that can overlap rows, for a custom calendar application

2012-05-04 Thread Mark Murphy
On Fri, May 4, 2012 at 5:27 PM, duadinam somethingcleve...@gmail.com wrote:
 BTW, I love the Commonsware book series, I use them all the time.

Thanks!

 What if the
 Events sit above the ListItems, in the same way that a context menu would?

Then you would not be able to interact with things other than the
events, just as you cannot interact with the UI of an activity while
the foreground is occupied by a context menu.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] How to build row item child views that can overlap rows, for a custom calendar application

2012-05-04 Thread David Ozersky
Thanks Mark,

I've given up on that solution.  But I'm just wondering...how does Android
display notifactions and context menu's?  Is it placed directly on the
FrameLayout of the Window? Or is it something else?

Thank you for your help, and you're support of the community.

David

On Fri, May 4, 2012 at 5:37 PM, Mark Murphy mmur...@commonsware.com wrote:

 On Fri, May 4, 2012 at 5:27 PM, duadinam somethingcleve...@gmail.com
 wrote:
  BTW, I love the Commonsware book series, I use them all the time.

 Thanks!

  What if the
  Events sit above the ListItems, in the same way that a context menu
 would?

 Then you would not be able to interact with things other than the
 events, just as you cannot interact with the UI of an activity while
 the foreground is occupied by a context menu.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


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

Re: [android-developers] How to build row item child views that can overlap rows, for a custom calendar application

2012-05-04 Thread Mark Murphy
On Fri, May 4, 2012 at 6:31 PM, David Ozersky
somethingcleve...@gmail.com wrote:
 I've given up on that solution.  But I'm just wondering...how does Android
 display notifactions and context menu's?  Is it placed directly on the
 FrameLayout of the Window? Or is it something else?

Sorry, but I have never really looked at the underlying implementation
of those aspects of Android.

 Thank you for your help, and you're support of the community.

You are very welcome!

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] How to build row item child views that can overlap rows, for a custom calendar application

2012-05-04 Thread Michael Chan
Hi,

Have a look at:
http://developer.android.com/guide/topics/ui/dialogs.html
http://developer.android.com/guide/topics/ui/notifiers/notifications.html
http://developer.android.com/guide/topics/ui/menus.html

Thanks,
Mike

On Fri, May 4, 2012 at 3:31 PM, David Ozersky
somethingcleve...@gmail.com wrote:
 Thanks Mark,

 I've given up on that solution.  But I'm just wondering...how does Android
 display notifactions and context menu's?  Is it placed directly on the
 FrameLayout of the Window? Or is it something else?

 Thank you for your help, and you're support of the community.

 David


 On Fri, May 4, 2012 at 5:37 PM, Mark Murphy mmur...@commonsware.com wrote:

 On Fri, May 4, 2012 at 5:27 PM, duadinam somethingcleve...@gmail.com
 wrote:
  BTW, I love the Commonsware book series, I use them all the time.

 Thanks!

  What if the
  Events sit above the ListItems, in the same way that a context menu
  would?

 Then you would not be able to interact with things other than the
 events, just as you cannot interact with the UI of an activity while
 the foreground is occupied by a context menu.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


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

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


Re: [android-developers] How to build row item child views that can overlap rows, for a custom calendar application

2012-05-03 Thread Mark Murphy
On Thu, May 3, 2012 at 9:40 AM, duadinam somethingcleve...@gmail.com wrote:
 1) If each hour slot is a single row in a ListView, how do you create events
 that cross rows?  It seems you would have to have views that belong to two
 parents, which doesn't seem possible.

That's not necessarily the case. You could have several rows that look
like they form one contiguous event (e.g., colored bubble), even
though they are composed of multiple row views. You would have four
basic row styles for rows with an event:

- One where the entire event fits in the row (whole bubble)
- One where the row is the beginning of the event (top of the bubble)
- One where the row is the end of the event (bottom of the bubble)
- One where the row is in the middle of the event

So long as the widths and colors and such are set up properly, the
user will see one tall bubble instead of perceiving distinct rows.

 2) Along the same line, how would you create 2 events in a one-hour slot?
  Can you populate one row in a ListView with two items?

You can make a single ListView row be as complicated as you wish.
However, from the standpoint of the Adapter, you cannot have two
adapter positions in one row of a ListView. So, you would not have an
EventsAdapter, but an HoursAdapter. You would need that anyway, to
handle hours without any events.

 Any suggestions or ideas?

Port the iosched timeline to a standalone component and use that:

http://code.google.com/p/iosched/

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] How to build row item child views that can overlap rows, for a custom calendar application

2012-05-03 Thread Michael Chan
Hi,

The day and week views are custom drawn i.e. line by line, rect by
rect, etc. It does not use a ListView.

The agenda view uses a ListView. One row per header or event.
Nothing spans across multiple rows.
The month view (starting in Honeycomb, I believe) uses a ListView. One
row per week. Each week is custom drawn.

Are you doing any custom drawing? How do you plan to handle events
that overlaps in time? e.g. 1pm - 3pm  1pm - 2pm

Thanks,
Mike

On Thu, May 3, 2012 at 6:47 AM, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, May 3, 2012 at 9:40 AM, duadinam somethingcleve...@gmail.com wrote:
 1) If each hour slot is a single row in a ListView, how do you create events
 that cross rows?  It seems you would have to have views that belong to two
 parents, which doesn't seem possible.

 That's not necessarily the case. You could have several rows that look
 like they form one contiguous event (e.g., colored bubble), even
 though they are composed of multiple row views. You would have four
 basic row styles for rows with an event:

 - One where the entire event fits in the row (whole bubble)
 - One where the row is the beginning of the event (top of the bubble)
 - One where the row is the end of the event (bottom of the bubble)
 - One where the row is in the middle of the event

 So long as the widths and colors and such are set up properly, the
 user will see one tall bubble instead of perceiving distinct rows.

 2) Along the same line, how would you create 2 events in a one-hour slot?
  Can you populate one row in a ListView with two items?

 You can make a single ListView row be as complicated as you wish.
 However, from the standpoint of the Adapter, you cannot have two
 adapter positions in one row of a ListView. So, you would not have an
 EventsAdapter, but an HoursAdapter. You would need that anyway, to
 handle hours without any events.

 Any suggestions or ideas?

 Port the iosched timeline to a standalone component and use that:

 http://code.google.com/p/iosched/

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 Android Training...At Your Office: http://commonsware.com/training

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

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