android - Android Material LinearProgressIndicator 不重复
问题描述
调用show
a后LinearProgressIndicator
,指示器会前进到最后一次,然后隐藏。
从我发现的所有内容中,它应该不断重复,直到我隐藏它。
我宣布它喜欢
<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/busyIndicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/map_view"
android:visibility="invisible"
android:indeterminate="true"
app:indicatorColor="?attr/colorAccent"
/>
然后隐藏并显示它就像
if (busy) {
binding.content.busyIndicator.show()
} else {
binding.content.busyIndicator.hide()
}
我已经尝试删除对的调用,hide
但它仍然被隐藏。我得到相同的行为CirclularProgressIndicator
。
我已经测试了 1.3.0 和 1.4.0-alpha02 版本
我已经更改了 XML 以使其开始可见,然后从不调用hide
or show
,然后它会正确重复。
有我缺少的功能吗?我不应该使用show
吗?
解决方案
推荐阅读
- spring-boot - Spring Boot 按日期设置会话时间
- sql - 如何在 PostgreSQL 中对范围使用 Group By?
- sql - 如何更改列中一条记录的拼写?
- twig - 用替换在树枝上添加字符
- python - 按钮的 padx 不是有意的?
- node.js - Sequelize 查询子结构
- javascript - 如果日期字段等于今天或自创建之日起 40 天内,则在平面列表中显示 Firestore 文档
- kubernetes - 使用 ansible 获取 k8s pod 列表
- vue.js - 为什么我的 Vue-router 没有路由到我的页面?
- java - Nifi 自定义 Kafka 处理器代码在有限的时间内工作