gpt4 book ai didi

android - 在没有 ActionBarSherlock 的情况下隐藏共享操作提供者附近的共享操作图标

转载 作者:行者123 更新时间:2023-11-29 01:51:13 25 4
gpt4 key购买 nike

我是 Android 开发的新手,我正在尝试通过 ShareActionProvider 构建一个 ActionBar,使用“stock”ActionBar(即使用 ActionBarSherlock) ,因为我只想定位 ICS+ 设备。

我希望启用历史功能(默认情况下),但我不希望共享按钮附近最常用的 Intent 图标,因为它占用太多空间。
我知道使用 ActionBarSherlock 这是可能的,但正如我所说,我正在尝试使用库存 ActionBar 来做到这一点,所以我想知道如何克服这个问题。

我找到了这两个相关的答案:
How to hide the share action (which use most) icon near the share action provider?
Android: ShareActionProvider with no history

但他们都没有明确说明如何编辑 Android 源代码以获得隐藏图标的 ActionBar 的另一个“版本”。
我的意思是,我如何结合这两个答案并使用隐藏最常用图标的修改后的 ActionBar 类发布我的应用程序?

编辑:
我正在寻找扩展三个类 ShareActionProviderActivityChooserViewActivityChooserMode 以构建修改后的类必须执行的操作的简短列表它们的版本不会在 Eclipse 中引发错误。据我所知,这在网络上的其他地方没有记录(谷歌没有给出结果)。

最佳答案

but none of them clearly say how to edit the Android sources to have another "version" of the ActionBar that hides the icon.

那是因为你没有改变操作栏。您更改 ShareActionProvider。如果您不喜欢 ShareActionProvider 的现有实现,请创建您自己的实现,或许使用现有实现作为起点。

例如,这就是the accepted answerAndroid: ShareActionProvider with no history 上问题描述。问题和答案均未引用 ActionBarSherlock。

关于android - 在没有 ActionBarSherlock 的情况下隐藏共享操作提供者附近的共享操作图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17930865/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com