gpt4 book ai didi

android - 如何使用库 CircleProgress?

转载 作者:行者123 更新时间:2023-11-29 00:06:42 25 4
gpt4 key购买 nike

我想使用库 CircleProgress 。我已经从以下链接下载。 cricleProgress并将其导入到eclipse中以下错误分钟。activity_my.xml

    <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.github.lzyzsd.circleprogress.DonutProgress
android:layout_marginLeft="50dp"
android:id="@+id/donut_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
custom:donut_unfinished_stroke_width="5dp"
custom:donut_finished_stroke_width="10dp"
custom:donut_progress="70"
custom:donut_inner_bottom_text="Loading..."
custom:donut_inner_bottom_text_size="10dp"
custom:donut_inner_bottom_text_color="#214193"/>

<com.github.lzyzsd.circleprogress.DonutProgress

错误

    Description Resource    Path    Location    Type
error: No resource identifier found for attribute 'arc_bottom_text' in package 'com.github.lzyzsd.circleprogressexample' activity_my.xml /MyActivity/res/layout line 82 Android AAPT Problem
error: No resource identifier found for attribute 'arc_bottom_text' in package 'com.github.lzyzsd.circleprogressexample' activity_my.xml /MyActivity/res/layout line 73 Android AAPT Problem

因此,我创建了一个文件 attrs.xml。我从上面的地址中获取的以下代码并放入其中。

         <declare-styleable name="DonutProgress">
<attr name="donut_progress" format="integer"/>
<attr name="donut_max" format="integer"/>
<attr name="donut_unfinished_color" format="color"/>
<attr name="donut_finished_color" format="color"/>
<attr name="donut_finished_stroke_width" format="dimension"/>
<attr name="donut_unfinished_stroke_width" format="dimension"/>
<attr name="donut_text_size" format="dimension"/>
<attr name="donut_text_color" format="color"/>
<attr name="donut_text" format="string"/>
<attr name="donut_prefix_text" format="string"/>
<attr name="donut_suffix_text" format="string"/>
<attr name="donut_background_color" format="color"/>
</declare-styleable>

但报错

         Description    Resource    Path    Location    Type
error: No resource identifier found for attribute 'donut_inner_bottom_text_color' in package 'com.github.lzyzsd.circleprogressexample' activity_my.xml /MyActivity/res/layout line 14 Android AAPT Problem

最佳答案

请在您的父级 view xml 布局文件中添加此行。

  xmlns:custom="http://schemas.android.com/apk/res-auto"

另见 this对于 eclipse 中的 AAPT 错误,它为解决您的问题提供了更多思路

关于android - 如何使用库 CircleProgress?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33289783/

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