timqi / sectorprogressview Goto Github PK
View Code? Open in Web Editor NEWa simple progress prompt or chart widget of android using circle and a sector
a simple progress prompt or chart widget of android using circle and a sector
I use it in the listview, but when i try to change color, it throws exception.
java.lang.NullPointerException: Attempt to read from field 'float android.graphics.RectF.left' on a null object reference
at com.timqi.sectorprogressview.ColorfulRingProgressView.setFgColorStart(ColorfulRingProgressView.java:138)
here is my code
@BindColor(R.color.yellow) int yellow;
@BindColor(R.color.red) int red;
List<timeUtils> data;
public View getView(int i, View view, ViewGroup viewGroup) {
view = inflater.inflate(R.layout.view_list_details, viewGroup, false);
ViewHolder viewHolder = new ViewHolder(view);
timeUtils time = data.get(i);
float present = time.getPresent();
if (present >= 50) {
viewHolder.crp.setFgColorStart(yellow);
viewHolder.crp.setFgColorEnd(red);
}
viewHolder.crp.setPercent(present);
return view;
}
Is there anything to help me solve the problem?
Is there a way to set a dynamic max value for the percent.!?
hi
i have two ColorfulRingProgressView on each other
because i have 2 data Percent
and its tricky to show these this way
my problem is :
<com.timqi.sectorprogressview.ColorfulRingProgressView
android:id="@+id/chart_earn"
android:layout_width="110dp"
android:layout_height="110dp"
android:layout_marginBottom="8dp"
app:bgColor="#dbdbdb"
app:fgColorEnd="#8a8792"
app:fgColorStart="#8a8792"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline5"
app:percent="50"
app:startAngle="0"
app:strokeWidth="16dp" />
<com.timqi.sectorprogressview.ColorfulRingProgressView
android:id="@+id/chart_today"
android:layout_width="110dp"
android:layout_height="110dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:padding="6dp"
app:bgColor="#23E1E1E1"
app:fgColorEnd="#dd6504"
app:fgColorStart="#fca700"
app:layout_constraintBottom_toBottomOf="@+id/chart_earn"
app:layout_constraintEnd_toEndOf="@+id/chart_earn"
app:layout_constraintStart_toStartOf="@+id/chart_earn"
app:layout_constraintTop_toTopOf="@+id/chart_earn"
app:percent="40"
app:startAngle="0"
app:strokeWidth="10dp" />
in this code one Ring background is transparent another have color , its ok in XML View
but after Run App ... shows Nothing...
what can i do !?
any tricky way ?!
If you double-click the view, the progress will be distorted, can not reach the progress of the target
Currently, setBgColor
and setFgColor
do not update the paint objects so calling either one has no effect on the view colors.
Hi there, Is there indeterminate state for ColorfulRingProgressView
?!
导入的时候提示跟系统v7的命名冲突
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.