gpt4 book ai didi

android - 环在 android kitkat 中旋转时变形

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

我正在使用以下链接创建一个循环进度条: http://mrigaen.blogspot.in/2013/12/create-circular-progress-bar-in-android.html

现在要从底部设置进度,我们使用旋转动画旋转进度条。这在 android 4.1.1 中工作正常(请看截图) enter image description here

然而,当在 android kitkat 4.4.2 上运行相同时,我得到以下结果 enter image description here

请帮忙...为什么会这样

最佳答案

我有同样的问题,我用列表中的两个环解决了它(其中一个是透明的)。我实际上不知道为什么,但它有效!

<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/progress">
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="ring"
android:innerRadius="80dp"
android:thickness="6dp"
android:useLevel="false">
<solid android:color="#00000000" />
</shape>
</item>
<item android:id="@android:id/progress">
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="ring"
android:innerRadius="80dp"
android:thickness="6dp"
android:useLevel="false"
>

<gradient
android:centerColor="#0099cc"
android:endColor="#d1186b"
android:startColor="#d1186b"
android:type="sweep" />
</shape>
</item>

关于android - 环在 android kitkat 中旋转时变形,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24904179/

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