android - 如何引导用户单击 View ?

标签 android android-layout kotlin androidx

我想引导我的应用程序的用户单击我的设置 Activity 中的特定设置(而不是自动单击)。
我见过一些应用,在这些应用中,当打开 Activity /片段以引导用户单击该项目/ View 时,该 View 将获得半透明的波纹动画。
就我而言

AlertDialog.Builder(this)
            .setTitle("Complete Sign Up")
            .setMessage("Please Enter Additional Details To complete Sign Up")
            .setPositiveButton("Take Me There") { dialog, whichButton ->
                   val settingsAlertIntent=Intent(this, SettingsActivity::class.java)
                   this.startActivity(settingsAlertIntent)
            }.setNegativeButton("I'll Do it later"){ dialog, whichButton ->
                   dialog.cancel()
            }
            .show()

在打开“设置意图”之后,我想显示某种波纹动画,以指导用户单击设置 Activity 中的 View 。

我的想法是获得半透明的背景色,并在处理程序完成后进行重置,但这似乎是一个不好的实现。

最佳答案

您可以使用许多库在 View 上显示操作及其描述。我们称其为 View 的展示。

我列出了一些您可以用来满足要求的库。

  • https://github.com/TakuSemba/Spotlight
  • https://github.com/mreram/ShowCaseView
  • https://github.com/deano2390/MaterialShowcaseView
  • https://github.com/faruktoptas/FancyShowCaseView
  • https://github.com/florent37/TutoShowcase
  • 关于android - 如何引导用户单击 View ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60680342/

    相关文章:

    android - 操作栏选项卡 : How do I pass arguments when using a single fragment instantiated more than once

    android - 是否可以在水平方向的布局编辑器中显示 RecyclerView 预览?

    kotlin - 链式调用和继承

    android - 自定义 JUnit 规则允许所有测试无论如何都通过

    Android Volley SSL 错误

    java - android:使用包安装程序以编程方式安装应用程序

    java - VerticalSeekbar 在水平 ScrollView 中工作不流畅

    android - Fragment Android Kotlin 中的 DataBinding+ViewModel

    android - 向服务器唯一标识 Android 用户的最佳方式是什么?

    安卓 : orientation issue