Friday, May 4, 2012

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

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 <somethingclever77@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate