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. options menu problem

is there anyway to make the options menu appear with out clicking on
the menu button ? . Thanks in advance

-- 

2. how do you guys feel about the develop tools?

hello guys,

i really like android and hope that it can surpass iphone in the near
future. I like it, because it's open.

But i really don't like the develop tools of android. it is so slow
and buggy.

Specifically, I don't like these two things:
Eclipse
Android emulator.

Sometimes, the de{*filter*} tool cannot show the log.
Eclipse cannot install apk if the there is a apk with the same name
running.
occasionally Eclipse fails to pack the resource files correctly.
.....
I can write a long problem list of these two.

everyone can tell the difference by simply playing xcode and iphone
sdk for awhile. one click on the build and run in xcode, the iphone
simulator pops up immediately. and the xcode debugging tools are so
easy to use.

develop tools are so important, even more important than the platform
itself, if not as equal important.
I think the android team should pay more attention to that, say,
improve the emulator performance and provide some other default ide
other that eclipse. (the QT creator looks good)

in addition, android should be more c++ friendly, because then
millions of c++ projects can be easily ported to android.


eclipse is just so so terrible

-- 

3. problem in creating options menu

4. Android Development Tools - Support for Additional JDKs

5. file:// problem - nothing seems to work

6. Paging mba Dessy

7. Diplay exisiting 3D model