views:

38

answers:

2

So, I noticed that I can organize apps into folders (HTC Incredible). However these folders are fairly limited in their capabilities. I want to implement an activity that extends the "base" folder activity (at the very least I want to add the ability to rearrange items in folders), but I can't figure out the class name... So, what's the name of the class that is used when adding a "New Folder" to the Home screen?

PS I did take a look at the Android developer website. But the discussion there revolves mostly around content providers. I assume that's not quite what I need since I'd have to create a separate content provider for each new folder, or am I misunderstanding something?

+2  A: 

So, what's the name of the class that is used when adding a "New Folder" to the Home screen?

For the HTC Incredible, it impossible to say what the class name is, since the Incredible is an HTC Sense device, so it's home screen implementation is proprietary.

For the Nexus One, it's the Folder class as implemented in either the Launcher or Launcher2 application built into the Android firmware. It's a bit unclear which of those versions of the launcher is used by the Nexus One.

In other words, this is a feature of the home screen application, not a "live folder" per the documentation you cited.

You are certainly welcome to try your hand at writing your own home screen replacement that offers greater capability in this area.

CommonsWare
Ah, that makes sense. So, the folders are HTC's thing, not Android's. Thank you for clarifying that!
Andrey
A: 

I'm not sure this is something you can do. From what I know, the folder feature is built in the Home application and the only way to integrate with it is through LiveFolders which can't really be used for what you intend, because:

  1. As you said, each LiveFolder defined is tied to a ContentProvider
  2. There is no LiveFolder API for handling the user "dropping" things (such as apps) on your folder.

The way I see it, your only hope is to write your own Home app that supports the features you want :)

Felix