Layout question - how to replicate what the iPhone does...

by Anna PS » Tue, 28 Apr 2009 05:05:11 GMT


Sponsored Links
 Hi there,

I have an application that consists of a series of tasks, and I'm
struggling to replicate a user experience that is simple to implement
on the iPhone.

In the abstract: on the home screen, I'd like there to be a list of
four tasks, of various kinds.

-- Two will invite the user to click on them, with an arrow. When they
are complete, they show a tick.
-- One task is dependent on the others, so it will be greyed out until
the others are completed. Then it looks like the others.
-- Another task runs in the background, so it has a progress icon
running until it's finished, instead of an arrow.

To show what I mean concretely, this is the application that I'm
trying to replicate - check out the home screen: 
 http://www.fixmystreet.com/iphone/ 

How would I even start to create a home screen that looks like this in
Android? Essentially I need clickable areas with text and icons.
Buttons can't have images attached, nor can they be greyed out. Maybe
a List... but you can't attach checkboxes or progress indicators to
individual items. Is a series of WebViews the best way?

Or should I use something radically different like a TabWidget? I do
like the layout here, though...

Can anyone help? I'm really struggling to know what to do!

Thank you for your help!

Anna
--~--~---------~--~----~------------~-------~--~----~



Layout question - how to replicate what the iPhone does...

by Streets Of Boston » Tue, 28 Apr 2009 05:27:52 GMT


 Hi Anna,

You can have any view inside your list-items.

Create a ListView with an Adapter (BaseAdapter or any other type of
Adapter).
The Adapter has 4 elements; your four tasks.

Then override the Adapter's getView(...) method.
Based upon the 'position' (from the parameters of getView(....)), you
can return a View that is as complex as you want. You can use
'inflate' this view from XML or create the entire view
programatically. Look at the API Demos for list-view for sample code.

This complex view is selectable, since it is a list-item.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Layout question - how to replicate what the iPhone does...

by Jon Colverson » Tue, 28 Apr 2009 12:49:38 GMT


 


Yes, they can have images: use the drawableLeft etc. attributes, or
setCompoundDrawables() method. They can also be grayed out by using
setEnabled().

--
Jon

--~--~---------~--~----~------------~-------~--~----~



Layout question - how to replicate what the iPhone does...

by Anna PS » Tue, 28 Apr 2009 20:34:59 GMT


 Thank you Jon, this is exactly what I needed!

best wishes,
Anna





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. destructor, constructor in c++

destructor, constructor in c++
destructor, constructor in c++
destructor, constructor in c++
destructor, constructor in c++
http://bestcollectionimage.blogspot.com

-- 

2. droidcon London 2009 (conference for android developers) on December 2nd Wednesday in London

droidcon London 2009 will take place in London on December 2nd,
Wednesday.

This is UK's first community event for Android developers.

The aim of droidcon is to bring together the Android development
community in an informal environment where they can share ideas, demo
new apps, talk to the experts and generally have lots of Android-
related fun.

This conference will feature Carl-Gustaf Harroch, Kevin McDonagh ,
Andreas Reuterberg, Alex Shaw, Akshay Dashrath, Gabor Paller, Martin
Roth and two ParkBench Panel Discussions.

For more information go to: 
http://skillsmatter.com/event/os-mobile-server/droidcon-london-2009/wd-451

And also follow the event on twitter #droidconlondon

droidcon has a limited space of 125 delegates only, so reserve your
ticket now.

Fancy just sharing some ideas, hack and meet other Android developers?
Attend Droidcamp London, on December 1st, tickets are free!

-- 

3. Changing view then sleeping does not show up on screen.

4. Phone calls: read phone state and identity

5. Longitude and latitude

6. Query phone capabilities

7. How to be notified of power button, volume button and camera button presses?