在 Android 中禁用 ExpandableListActivity 的组标头焦点

发布于 2024-12-13 21:04:15 字数 200 浏览 3 评论 0原文

我正在扩展 SimpleExpandableListActivity 并扩展了 SimpleExpandableListAdapter。因此列表显示组标题及其子项。现在我希望 GroupHeader 不应该有焦点,焦点应该直接应用于子项。那么有什么方法可以实现这一目标吗?

我还尝试扩展 getGroupView 方法,但无法禁用组标题的焦点。

谢谢,无

I am extending SimpleExpandableListActivity and also extended the SimpleExpandableListAdapter. So list shows Group header and its children. Now I wish that GroupHeader should not have the focus and focus should be directly applied to children directly. So is there a way I could achieve this?

I also tried extending getGroupView method but was not able to disable focus of group header.

Thanks, nil

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

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

发布评论

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

评论(1

夜巴黎 2024-12-20 21:04:15

您是否尝试过在您的设备上设置 android:focusable 属性组标题视图为 false?

Have you tried setting the android:focusable attribute on your group header view to false?

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