کنترل سفارشی ProgressWheel اندروید

کنترل سفارشی ProgressWheel اندروید

کتابخونه کنترل سفارشی ProgressWheel  یا به زبان خودمون یه ProgressBar چرخشی هست، و می تونید با اضافه کردن اون به پروژه هاتون ازش استفاده کنید.

نمونه هایی رو که می تونید با این کتابخونه بسازید رو در زیر مشاهده می کنید:

ProgressWheel_1_fullkade.com

ProgressWheel_2_fullkade.com ProgressWheel_3_fullkade.com ProgressWheel_4_fullkade.com ProgressWheel_5_fullkade.com


در پایین مثال به همراه کلاس 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>

 

جعبه دانلود نیم‌بها

  • پسورد (در صورت نیاز) www.fullkade.com

پاسخ دهید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *

cp-codfk

نظرات ثبت شده بدون دیدگاه

توضیحات دانلود نظرات اشتراک