me tun wrote:
> OK, time to come clean, I know people who "are hacking the framework"
> are not generally well received around here...

It's more that there are other lists for those who "are hacking the
framework":

http://source.android.com/discuss

> But when we launch an activity we want to pass some data (lets say
> FULL_SCREEN / HALF_SCREEN) and we want the activity to start in full
> screen or half screen.  Is this possible?

Not directly. And, when you "are hacking the framework", you might
consider making a patch to allow one to define "extras" in the manifest
to put in the Intent used to launch from the launcher. Or, perhaps you
can use an alternative home screen (e.g., dxTop) and work with that
developer on this project.

However, it should be fairly trivial for you to create a shallow
activity class hierarchy to handle this, at least as a workaround.

For example, suppose the name of the activity you presently have is
FooActivity. You're trying to launch FooActivity in one of two modes,
and your attempts to do so via modifying the Intent used to launch the
activity has been foiled.

So, do the following:

1. Make FooActivity abstract, requiring a boolean useFullScreen() method

2. Create FullFooActivity and HalfFooActivity, each extending
FooActivity, with FullFooActivity implementing useFullScreen() to return
true and HalfFooActivity to implement useFullScreen() to return false

3. Create separate entries in the manifest for FullFooActivity and
HalfFooActivity, each with the standard launcher intent-filter

4. Use useFullScreen() to do whatever it was you were looking to handle
via the customized Intent

Clunky, but it works, until you can amend a home application that is
more amenable to your requirements.

-- 
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 Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to