gpt4 book ai didi

android - 如何在android中的 fragment 上设置箭头指示器?

转载 作者:太空狗 更新时间:2023-10-29 14:13:32 28 4
gpt4 key购买 nike

我创建了一个 android 应用程序,它有九个 ImageButton 和三个 FrameLayout。

This image has 9 ImageButton and 3 FrameLayout which is invisible

在每个ImageButton 上都有onclick 事件,它将Fragment 添加到FrameLayout。当我单击 ImageButton1 时,Fragment1 被添加到 FrameLayout。

Fragment1 is Added to FrameLayout1 on ImageButton1 click

我想显示 Fragment 的箭头指示器,如上图所示。现在我已经在 Fragment 上放了一张背景图片来指示 ImageButton 上的箭头。这暂时解决了我的问题,但作为

> Mobile screen size change or fragment height increase this background image size also change, Which make the arrow narrow.

background image arrow size change as width of Fragment increase

> Is there any other way to display arrow indicator for each Fragment?

提前致谢..!!!

最佳答案

您应该尝试使用 QuickAction View,它会根据您的需要提供类似的功能。

下面是一些库,可以指导您如何实现它。

1) QuickActionView
2) QuickActionView 3D
3) Quick action pattern in Android and simple implemention.

希望对您有所帮助。

关于android - 如何在android中的 fragment 上设置箭头指示器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24736725/

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