相关疑难解决方法(0)

android图像按钮工具提示

我正在尝试构建一个带有图像按钮的应用程序,它像操作栏一样工作,但我无法让它们在长按时显示工具提示.

   <ImageButton
        android:id="@+id/editUrgent"
        style="?android:attr/borderlessButtonStyle"
        android:layout_width="48dp"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_toLeftOf="@+id/editImportant"
        android:hint="@string/hint_urgent"
        android:contentDescription="@string/hint_urgent"
        android:text="@string/hint_urgent"
        android:src="@drawable/clock_light" />
Run Code Online (Sandbox Code Playgroud)

android:contentDescription适用于悬停(s-pen)但长按仍然无效.

xml android tooltip imagebutton

16
推荐指数
4
解决办法
1万
查看次数

在ActionBar项目下方显示工具提示

我尝试了很多但是却找不到任何简单的解决方案.基本上我想在ActionBar项目下面显示一个工具提示气球.

参考图像

android android-actionbar android-toolbar

7
推荐指数
1
解决办法
2369
查看次数

android如何为TextView制作工具提示

我的活动中有一个ListView.它不包含任何文本视图.我对textviews执行了拖放操作.所以我想当我拖动一个项目时,它上面和下面的项目应该被突出显示为工具提示.我该怎么做.请给我回答Thanx

android tooltip

6
推荐指数
1
解决办法
1万
查看次数

setTooltipText()和android:tooltipText在Nougat中不起作用

我有一个ImageButton,当我对我的应用程序进行测试时,发现无法tooltipText在带有Android N设备的小米Note 4中显示。但这在带有Android O的三星S8中显示得很好,您知道为什么会发生这种情况以及如何缓解这种情况吗?最小的可复制代码非常简单,只需在android studio中创建一个基本的android项目,然后将默认的HelloWorld Textview替换为

<ImageButton
        android:layout_width="36dp"
        android:layout_height="36dp"
        android:tooltipText="Show tooltip"
        android:src="@mipmap/ic_launcher"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
Run Code Online (Sandbox Code Playgroud)

我认为必须有某种方法可以使它起作用,因为自动生成的工具栏显然具有工具提示。因此,必须缺少一些东西才能使其在小米设备中正常工作。

android tooltip imagebutton

3
推荐指数
1
解决办法
2156
查看次数