In this tutorial we are going to explain how to create circular seekbar view with progress update. There are a number of settings also available from sweep angle to rotation that can be set. This way the seekbar can grow in size with assigning dif-2 value. Also it is still possible to set the seekbar to a specific size by setting the container layouts width and height to specific dp values. This sizing approach gives the best of both worlds. To further adjust how the arc fits in its container a padding attribute can also be used.
To understanding how to use the circular seekbar download the complete source code and try with a number of controls that can be used to adjust the attributes of the seekbar . This is by far the best way to get a good understanding of how to use the circular seekbar .
CircleDemo.java
To understanding how to use the circular seekbar download the complete source code and try with a number of controls that can be used to adjust the attributes of the seekbar . This is by far the best way to get a good understanding of how to use the circular seekbar .
CircleDemo.java
public class CircleDemo extends Activity {
ProgressCircle progressCircle;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_circle_demo);
progressCircle = (ProgressCircle) findViewById(R.id.progress_circle);
progressCircle.startAnimation();
}
public void animate(View view) {
float val = new Random().nextFloat();
progressCircle.startAnimation();
}
}
ProgressCircle.java
public class ProgressCircle extends View {
private final RectF mOval = new RectF();
private float mSweepAngle = 0;
private int startAngle = 90;
private int angleGap = 4;
private Bitmap icon;
float mEndAngle = 1.0f;
Paint progressPaint = new Paint();
TextPaint textPaint = new TextPaint();
Paint incompletePaint = new Paint();
Paint percentagePaint = new Paint();
private float strokeWidth = 30.0f;
public ProgressCircle(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray a = context.getTheme().obtainStyledAttributes(
attrs,
R.styleable.ProgressCircle,
0, 0);
int textColor;
float textSize;
int progressColor;
int incompleteColor;
try {
textColor = a.getColor(R.styleable.ProgressCircle_android_textColor, Color.BLUE);
textSize = a.getDimension(R.styleable.ProgressCircle_android_textSize, 100);
strokeWidth = a.getDimension(R.styleable.ProgressCircle_strokeWidth, 30.0f);
progressColor = a.getColor(R.styleable.ProgressCircle_progressColor, Color.RED);
incompleteColor = a.getColor(R.styleable.ProgressCircle_incompleteProgressColor, Color.GRAY);
} finally {
a.recycle();
}
progressPaint.setColor(progressColor);
progressPaint.setStrokeWidth(strokeWidth);
progressPaint.setStyle(Paint.Style.STROKE);
progressPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
textPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
textPaint.setColor(textColor);
textPaint.setTextSize(textSize);
Typeface tf = Typeface.create("Roboto Condensed Light", Typeface.BOLD);
textPaint.setTypeface(tf);
percentagePaint.setFlags(Paint.ANTI_ALIAS_FLAG);
percentagePaint.setColor(textColor);
percentagePaint.setTextSize(textSize / 3);
incompletePaint.setColor(incompleteColor);
incompletePaint.setStrokeWidth(strokeWidth);
incompletePaint.setStyle(Paint.Style.STROKE);
incompletePaint.setFlags(Paint.ANTI_ALIAS_FLAG);
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
float currentAngleGap = mSweepAngle == 1.0f || mSweepAngle == 0 ? 0 : angleGap;
mOval.set(strokeWidth / 2, strokeWidth / 2, getWidth() - (strokeWidth / 2), getWidth() - (strokeWidth / 2));
canvas.drawArc(mOval, -startAngle + currentAngleGap, (mSweepAngle * 360) - currentAngleGap, false,
progressPaint);
mOval.set(strokeWidth / 2, strokeWidth / 2, getWidth() - (strokeWidth / 2), getWidth() - (strokeWidth / 2));
canvas.drawArc(mOval, mSweepAngle * 360- startAngle + currentAngleGap, 360 - (mSweepAngle * 360) - currentAngleGap, false,
incompletePaint);
drawText(canvas, textPaint, String.valueOf((int) (mSweepAngle * 100)), percentagePaint);
if(icon != null)
canvas.drawBitmap(icon, canvas.getWidth() / 2 - icon.getWidth() / 2, strokeWidth + (canvas.getHeight() / 15), null);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, widthMeasureSpec);
}
private void drawText(Canvas canvas, Paint paint, String text, Paint percentagePaint) {
Rect bounds = new Rect();
paint.getTextBounds(text, 0, text.length(), bounds);
Rect percentageBounds = new Rect();
percentagePaint.getTextBounds("%", 0, 1, percentageBounds);
int x = (canvas.getWidth() / 2) - (bounds.width() / 2) - (percentageBounds.width() / 2);
int y = (canvas.getHeight() / 2) + (bounds.height() / 2);
canvas.drawText(text, x, y, paint);
canvas.drawText("%", x + bounds.width() + percentageBounds.width() / 2, y - bounds.height() + percentageBounds.height(), percentagePaint);
}
public void setTextColor(int color) {
textPaint.setColor(color);
}
public void setProgressColor(int color) {
progressPaint.setColor(color);
}
public void setIncompleteColor(int color) {
incompletePaint.setColor(color);
}
public void setProgress(float progress) {
if (progress > 1.0f || progress < 0) {
throw new RuntimeException("Value must be between 0 and 1: " + progress);
}
mEndAngle = progress;
this.invalidate();
}
public void startAnimation() {
ValueAnimator anim = ValueAnimator.ofFloat(mSweepAngle, mEndAngle);
anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
ProgressCircle.this.mSweepAngle = (Float) valueAnimator.getAnimatedValue();
ProgressCircle.this.invalidate();
}
});
anim.setDuration(10000);
anim.setInterpolator(new AccelerateDecelerateInterpolator());
anim.start();
}
}
Android Vertical Stepper Form Library
ReplyDeleteIt may display a transient feedback message after a step is saved. And today we’re going to see a cool library which help you to implement that stepper form in your applications. This Android library implements a vertical stepper form following Google Material Design guidelines.
http://www.tellmehow.co/android-vertical-stepper-form-library/
You can check it out once through Andorid Online Training
ReplyDeleteGood one... i am very much interested to start my career as Android Developer, i think to start my learning in Android Training in Chennai can you suggest me what is the future strategies in Android across the world market.. Thanks Abdul..
ReplyDeleteHi,
ReplyDeleteThanks for sharing the info about Android Plz keep sharing on...
Thank you...
nice article... for android classes in Jaipur
ReplyDeleteplease visit Our Website
Thanks for the information and code.
ReplyDeleteWe are Netguru Solution India Pvt Ltd, one of the leading and developing Website Design and Mobile Application Development Company in Pune with a specialist management and expert group.
Mobile Application Development Company In Pune
Website Design Company In Pune
Wonderful post however I was wondering if you could write a litte more on this subject? I'd be very thankful if you could elaborate a little bit more. Cheers! iPhone application development
ReplyDeleteThanks for providing Best Content.
ReplyDeleteKvch Delhi delivers Java Six Weeks Project Based Summer Training In Delhi for M.Tech, B.Tech CSE, MCA, BCA. The Skilled Development Company has been recently entered in the list of top ten JAVA summer training institute in Delhi. The core skills of the JAVA summer training are based-on the trainers and learning environment provided to the students.
G-18, 2nd Floor, Preet Vihar, Delhi-110092
Email: delhi.trg1@kvch.in
Contact: +919212260630, +919212577708
BEST 6 WEEKS JAVA INTERNSHIP COMPANIES IN DELHI
BEST JAVA SIX WEEKS PROJECT BASED SUMMER TRAINING IN DELHI
great post thanks a lot for providing good blog
ReplyDeleteJAVA Summer Internship
Best android Summer Training
good work! keep it up. it's really helpful coding for us.
ReplyDeleteAndroid training in Chandigarh
Great thoughts you got there, believe I may possibly try just some of it throughout my daily life.
ReplyDeleteData Science with Python training in chenni
Data Science training in chennai
Data science training in velachery
Data science training in tambaram
Data Science training in anna nagar
Data Science training in chennai
Data science training in Bangalore
Great thoughts you got there, believe I may possibly try just some of it throughout my daily life.
ReplyDeletejava training in omr | oracle training in chennai
java training in annanagar | java training in chennai
Thanks you for sharing this unique useful information content with us. Really awesome work. keep on blogging
ReplyDeleteDevops training in sholinganallur
I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site
ReplyDeleteBlueprism training in btm
Blueprism online training
Its really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing....
ReplyDeleteangularjs Training in chennai
angularjs-Training in pune
angularjs-Training in chennai
angularjs Training in chennai
angularjs-Training in tambaram
Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.
ReplyDeleteAWS Interview Questions And Answers
AWS Training in Bangalore | Amazon Web Services Training in Bangalore
AWS Training in Pune | Best Amazon Web Services Training in Pune
Amazon Web Services Training in Pune | Best AWS Training in Pune
AWS Online Training | Online AWS Certification Course - Gangboard
Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.
ReplyDeleteAWS Interview Questions And Answers
AWS Training in Bangalore | Amazon Web Services Training in Bangalore
AWS Training in Pune | Best Amazon Web Services Training in Pune
Amazon Web Services Training in Pune | Best AWS Training in Pune
AWS Online Training | Online AWS Certification Course - Gangboard
Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.
ReplyDeleteSelenium Interview Questions and Answers
Best Selenium Training in Chennai | Selenium Training Institute in Chennai | Besant Technologies
Selenium Training in Bangalore | Best Selenium Training in Bangalore
Best AWS Training in Marathahalli | AWS Training in Marathahalli
Amazon Web Services Training in Anna Nagar, Chennai |Best AWS Training in Anna Nagar, Chennai
After reading your post I understood that last week was with full of surprises and happiness for you. Congratz! Even though the website is work related, you can update small events in your life and share your happiness with us too.
ReplyDeleteJava training in Chennai | Java training institute in Chennai | Java course in Chennai
Java training in Bangalore | Java training institute in Bangalore | Java course in Bangalore
Java interview questions and answers
Core Java interview questions and answers
The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
ReplyDeleteBest Devops training in sholinganallur
Devops training in velachery
Devops training in annanagar
Devops training in tambaram
Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging.
ReplyDeletepython course in pune
python course in chennai
python course in Bangalore
I am so proud of you and your efforts and work make me realize that anything can be done with patience and sincerity. Well I am here to say that your work has inspired me without a doubt.
ReplyDeletePython training in bangalore
Python course in pune
Python training in bangalore
Great thoughts you got there, believe I may possibly try just some of it throughout my daily life.
ReplyDeleteJava interview questions and answers
Core Java interview questions and answers
Java training in Chennai | Java training in Tambaram
Java training in Chennai | Java training in Velachery
Thanks for such a great article here. I was searching for something like this for quite a long time and at last I’ve found it on your blog. It was definitely interesting for me to read about their market situation nowadays.
ReplyDeleteBest Devops Training in pune
excel advanced excel training in bangalore
This is very good content you share on this blog. it's very informative and provide me future related information.
ReplyDeleteData Science course in Indira nagar
Data Science course in marathahalli
Data Science Interview questions and answers
Data science training in tambaram | Data Science Course in Chennai
Data Science course in btm layout | Data Science training in Bangalore
Data science course in kalyan nagar | Data Science Course in Bangalore
hank you for benefiting from time to focus on this kind of, I feel firmly about it and also really like comprehending far more with this particular subject matter. In case doable, when you get know-how, is it possible to thoughts modernizing your site together with far more details? It’s extremely useful to me
ReplyDeleteangularjs-Training in velachery
angularjs-Training in pune
angularjs Training in bangalore
angularjs Training in bangalore
angularjs Training in btm
angularjs Training in electronic-city
ReplyDeleteHmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.
Top 250+AWS Interviews Questions and Answers 2019 [updated]
Learn Amazon Web Services Tutorials 2019 | AWS Tutorial For Beginners
Best AWS Interview questions and answers 2019 | Top 110+AWS Interview Question and Answers 2019
Best and Advanced AWS Training in Bangalore | Amazon Web Services Training in Bangalore
AWS Training in Pune | Best Amazon Web Services Training in Pune
AWS Online Training 2018 | Best Online AWS Certification Course 2018
Best Amazon Web Services Training in Pune | Best AWS Training in Pune
ReplyDeleteHmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.
Top 250+AWS Interviews Questions and Answers 2019 [updated]
Learn Amazon Web Services Tutorials 2019 | AWS Tutorial For Beginners
Best AWS Interview questions and answers 2019 | Top 110+AWS Interview Question and Answers 2019
Best and Advanced AWS Training in Bangalore | Amazon Web Services Training in Bangalore
AWS Training in Pune | Best Amazon Web Services Training in Pune
AWS Online Training 2018 | Best Online AWS Certification Course 2018
Best Amazon Web Services Training in Pune | Best AWS Training in Pune
Woah this blog is wonderful i like studying your posts. Keep up the great work! You understand, lots of persons are hunting around for this info, you could help them greatly.
ReplyDeletePython Online certification training
python Training institute in Chennai
Python training institute in Bangalore
This is a nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
ReplyDeleterpa training in bangalore
best rpa training in bangalore
rpa training in pune
Thank For Sharing Your Information The Information Shared Is Very Valuable Please Keep Updating Us Time Went On Just Reading The Article Python Online Course
ReplyDeleteNice Post! Thank you for sharing very good post, it was so Nice to read and useful to improve my knowledge as updated one, keep blogging.
ReplyDeleteAngular js Training in Electronic City
I got what i am seraching from last few days in your Blog. I hope you will share more info about it. Please keep sharing.
ReplyDeleteLaptop Service center in Ameerpet
Dell Service center in Ameerpet
HP Service center in Ameerpet
Lenovo Service center in Ameerpet
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteData Science is the future of Artificial Intelligence. Therefore, it is very important to understand what is Data Science and how can it add value to your business.
ReplyDeleteBest Institute for Data Science in Mumbai which includes classroom and online training. Along with Classroom training, we also conduct online training using state-of-the-art technologies to ensure the wonderful experience of online interactive learning. Best Institute for Data Science
Data Science is the future of Artificial Intelligence. Therefore, it is very important to understand what is Data Science and how can it add value to your business.
ReplyDeleteData Science institute in Mumbai which includes classroom and online training. Along with Classroom training, we also conduct online training using state-of-the-art technologies to ensure the wonderful experience of online interactive learning. Data Science institute in Mumbai
This is good information and really helpful for the people who need information about this.
ReplyDeleteAndroid Summer Training Program in Delhi
Android Summer Training Institute in Delhi
Android Summer internship in Delhi
Amazing article. Your blog helped me to improve myself in many ways thanks for sharing this kind of wonderful informative blogs in live.thanks for the updation.
ReplyDeleteAi & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai
Thank you for your helping blog.The article is nice. Java training in Chennai | Certification | Online Course Training | Java training in Bangalore | Certification | Online Course Training | Java training in Hyderabad | Certification | Online Course Training | Java training in Coimbatore | Certification | Online Course Training | Java training in Online | Certification | Online Course Training
ReplyDeleteI would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.
ReplyDeleteSalesforce Training in Chennai
Salesforce Online Training in Chennai
Salesforce Training in Bangalore
Salesforce Training in Hyderabad
Salesforce training in ameerpet
Salesforce Training in Pune
Salesforce Online Training
Salesforce Training
I’ve beeen exploring for a little for any high quakity articles or weblog posts on this kind of space.
ReplyDeleteBU Bhopal BA 3rd Year Result mark sheet
Content on your blog is really informative 50 High Quality for just 50 INR
ReplyDelete2000 Backlink at cheapest
5000 Backlink at cheapest
Boost DA upto 15+ at cheapest
Boost DA upto 25+ at cheapest
Boost DA upto 35+ at cheapest
Boost DA upto 45+ at cheapest
Infycle Technologies, the best software training institute in Chennai offers the best Data Science training in Chennai for tech professionals and freshers. In addition to Big Data, Infycle also offers other professional courses such as Python, Oracle, Java, Power BI, Digital Marketing, Big Data, etc., which will be trained with 100% practical classes. After the completion of training, the trainees will be sent for placement interviews in the top MNC's. Call 7502633633 to get more info and a free demo.
ReplyDeleteमैं आपके b a 3rd year time table घोषित ब्लॉग को बुकमार्क कर दूंगा और इसे नियमित रूप से यहीं पर फिर से देखूंगा।
ReplyDeleteIt was wonderfull reading your article. Great writing style # BOOST Your GOOGLE RANKING.It’s Your Time To Be On #1st Page Our Motive is not just to create links but to get them indexed as will Increase Domain Authority (DA).We’re on a mission to increase DA PA of your domain High Quality Backlink Building Service Boost DA upto 15+ at cheapest Boost DA upto 25+ at cheapest Boost DA upto 35+ at cheapest Captured Current News
ReplyDeleteThanks for sharing the info. keep up the good work going.
ReplyDeleteBCom 1st Year Admit Card 2021
BCom 2nd Year Admit Card 2021
BCom 3rd Year Admit Card 2021
Allow expert Congress face apply. Spend size network hope sing civil floor step.news today live
ReplyDeleteInteresting blog.keep posting
ReplyDeletepython training in hyderabad
This post was incredibly detailed, thank you for going the extra mile! It’s clear you put a lot of thought into explaining circular seekbar in android thoroughly, and it made a big difference in my understanding.
ReplyDeletehttps://iimskills.com/data-science-courses-in-westminster/
Thanks for sharing insights on creating a circular seekbar in Android! Your step-by-step approach makes it easy to understand the implementation process. Circular seekbars are a great way to enhance user interaction, and your examples will definitely help developers create more engaging interfaces. This is a fantastic resource for anyone looking to innovate in their Android applications!
ReplyDeleteData science Courses in hamburg
This was very informative! I always learn something new from your posts
ReplyDeleteData science courses in Dubai
Important page on tutorial for andriod
ReplyDeleteData science Courses in London
ReplyDeleteThis tutorial is incredibly useful for anyone looking to add a custom circular seekbar to their Android app. The explanations are clear, and it's great that it covers all the adjustable attributes, from sweep angle and rotation to padding and stroke width. Data science courses in Visakhapatnam
Your dedication to sharing knowledge is truly admirable."
ReplyDeleteThanks for the nice blog
ReplyDeleteData science courses in Pune
Amazing Article ! Keep sharing such articles.
ReplyDeleteData science Courses in Ireland
Awesome post! Enhance your marketing skills with these recommended Digital Marketing Courses in Bangalore.
ReplyDeleteI found this post to be extremely helpful. Your perspective is refreshing, and I look forward to more content like this
ReplyDeleteData Analytics Courses In Chennai
A showcase of beautifully manufactured park model homes in Florida.
ReplyDeleteData Analytics Courses In Bangalore