扩展文件夹(LiveFolder?)类

发布于 2024-09-04 09:40:30 字数 353 浏览 3 评论 0原文

因此,我注意到我可以将应用程序组织到文件夹中(HTC Incredible)。然而,这些文件夹的功能相当有限。我想实现一个扩展“基本”文件夹活动的活动(至少我想添加重新排列文件夹中项目的功能),但我无法弄清楚类名...那么,名称是什么将“新文件夹”添加到主屏幕时使用的类的?

聚苯乙烯 我确实查看了 Android 开发人员网站。但那里的讨论主要围绕内容提供商。我认为这不完全是我所需要的,因为我必须为每个新文件夹创建一个单独的内容提供程序,或者我是否误解了什么?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧情别恋 2024-09-11 09:40:30

那么,这个类的名称是什么?
添加“新文件夹”时使用
主屏幕?

对于 HTC Incredible,无法说出其类名是什么,因为 Incredible 是一款 HTC Sense 设备,因此它的主屏幕实现是专有的。

对于 Nexus One,它是在 Android 固件内置的 LauncherLauncher2 应用程序中实现的 Folder 类。目前还不清楚 Nexus One 使用的是哪个版本的启动器。

换句话说,这是主屏幕应用程序的一项功能,而不是您引用的文档中的“活动文件夹”。

当然,我们欢迎您尝试编写自己的主屏幕替代品,以在该领域提供更强大的功能。

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.

温折酒 2024-09-11 09:40:30

我不确定这是你能做的事情。据我所知,文件夹功能是在 Home 应用程序中内置的,与其集成的唯一方法是通过 LiveFolders,但它不能真正用于您的目的,因为:

  1. 正如您所说,定义的每个 LiveFolder 都与一个ContentProvider
  2. 没有 LiveFolder API 来处理用户将内容(例如应用程序)“拖放到”您的文件夹上。

在我看来,您唯一的希望是编写自己的家庭应用程序来支持您想要的功能:)

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 :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文