> I'm just phantasizing now,
> but what if a future device features not only a "back" button, but
> also a "forward" button to switch between activities? If you had hard-
> coded the "back" button functionality, the "forward" button would fail
> in your application.

Such a button is not implemented in the actual SDK. If it causes
trouble, you might need to re-build your software with the future SDK,
where the 'forward' button is contained (even if you handed the logics
to the framework).
Compared to Java, it would be quite the same as if you write code with
the standard library dealing with keyboard and mouse input, and one
day maybe the joystick is also included to the standard libraries in a
newer SDK. The application you wrote with the old SDK wouldn't adapt
by itself to the joystick input, but you have to rewrite your code in
the new version SDK. A new 'forward' button would be a very similar
case.

On the other hand I don't think this would be a problem. I just change
the functionality of the 'back' button when it is necessary, so that
it doesn't jump out of the application, but returns to the last view
or menu for example. All the other button functionalities remain the
same, as designed by default. If you press 'home', it still returns to
desktop, and an imaginable forward button would do what it always does
(it may leave my application though, as it is only one activity).

> It may seem strange and novel at first, but the intent passing
> mechanism is really powerful, in the sense that part of your
> applications can be reused or replaced by other applications if they
> agree on the intents.

Yes, i agree. But the question is, if it makes sense that a special
screen of your application is used by foreign applications. There are
lots of cases, where it is not considerable to use it outside of the
original one.
Anyway, if this part is generally useful and if it makes sense to
deploy it for the outside, then I fully agree in using Activities for
that. But if the single views of the application (especially if there
are more than 10 pieces, for example) is only needed for this
particular application, then it is different.

I have taken a look on the Intent and Activity class sources...these
definitely belong to the most heavy-weight ones of the entire
framework. So I doubt if it makes sense to use Activity by Activity
for each single screen. I think, Activities are useful, but not for
universal purpose.
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to