>
> I am struggling with the following problem.  I need an activity that
> lists seven items, each corresponding to a day of the week.  It should
> be scrollable.  Each day item consists of a date heading and below
> that one or two items, call them tasks, each with an icon and text.
> Clicking on a task item calls an activity specific to that task.  It
> should look something like this:
>
> January 1, 2010
> [(icona) (Task 1 description)]
> [(iconb) (Task 2 description)]
>
> January 2, 2010
> [(iconc) (Task 3 description)]
>
> January 3, 2010
> [(icona) (Task 4 description)]
> [(iconc) (Task 5 description)]
>
> etc.
>
> I can see how I could use a ListView for the seven items, with each
> day a separate view produced by a custom ListAdapter.  But how could I
> distinguish between clicks on different tasks on a two-task day?  What
> kind of view should the task list be?  Is is possible to have
> listviews within listviews?  I'm sure this is real Noob question.

Option #1: Use an ExpandableListView.

Option #2: Have the day heading and each task be individual rows in the
ListAdapter. Make the day heading be disabled (areAllItemsEnabled() and
isEnabled() in ListAdapter). Then, each task is individually clickable.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to