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. AudioFlinger and SurfaceFlinger

Hello all,

I am looking for the exact location where AudioFlinger and
SurfaceFlinger get invoked in Video capture using MediaRecorder.

Can anyone please tell me the location?

i am tracing the path of MediaRecorder class(the flow of events from
Java MediaRecorder to hardware drivers) for video capture.

Thanks in advance
Nandu

-- 

2. Help - Android SDK and AVD Manager tool

Does anyone know if we have to use the internet through this tool to
install the updates/add-ons,

I currently use a development machine that STRICTLY cannot have access
to the internet.

Of course I can use my other machine to download the add-ons (but it
seems the only way is via the Android SDK and AVD Manager tool.


-- 

3. Successful to install ADT in Eclipse, but Windows > Preferences doesn't show "Android" on the left panel

4. SERIOUS problem w/ uninstalled apps and update notifications

5. Users marking down free apps because missing paid app features

6. How to determine what apps are using data on my phone?

7. alt key