کتابخونه کنترل سفارشی ProgressWheel یا به زبان خودمون یه ProgressBar چرخشی هست، و می تونید با اضافه کردن اون به پروژه هاتون ازش استفاده کنید.
نمونه هایی رو که می تونید با این کتابخونه بسازید رو در زیر مشاهده می کنید:
در پایین مثال به همراه کلاس ProgressWheel جهت دانلود قرار داده شده است.
1- کلاس ProgressWheel رو از سورس پایین در برنامه خود کپی نمایید.
2- این ویژگی رو به ویوی ریشه Layout خودتون اضافه کنید: (در پروژه مثال می تونید مشاهده کنید)
xmlns:ProgressWheel="http://schemas.android.com/apk/res/com.visualdenim.schooltraq"
3- برای قرار دادن ProgressWheel در Layout می تونید از این کد استفاده کنید:
<com.fullkade.lib.components.progressbar.ProgressWheel android:id="@+id/progressBarTwo" android:layout_width="150dp" android:layout_height="150dp" ProgressWheel:pwTextColor="#222222" ProgressWheel:pwTextSize="14sp" ProgressWheel:pwRimColor="#44000000" ProgressWheel:pwBarLength="60dp" ProgressWheel:pwBarColor="#339BB9" ProgressWheel:pwBarWidth="25dp" ProgressWheel:pwRimWidth="25dp" ProgressWheel:pwSpinSpeed="3dp"/>
4- درون پوشه values یه فایل xml به نام attrs.xml بسازید و اینو توش قرار بدید:
<?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="ProgressWheel"> <attr name="pwText" format="string" /> <attr name="pwTextColor" format="color" /> <attr name="pwTextSize" format="dimension" /> <attr name="pwBarColor" format="color" /> <attr name="pwRimColor" format="color" /> <attr name="pwRimWidth" format="dimension" /> <attr name="pwSpinSpeed" format="dimension" /> <attr name="pwDelayMillis" format="integer" /> <attr name="pwCircleColor" format="color" /> <attr name="pwRadius" format="dimension" /> <attr name="pwBarWidth" format="dimension" /> <attr name="pwBarLength" format="dimension" /> <attr name="pwContourColor" format="color"/> <attr name="pwContourSize" format="dimension"/> </declare-styleable> </resources>
نظرات ثبت شده بدون دیدگاه