Giter VIP home page Giter VIP logo

Comments (7)

lopspower avatar lopspower commented on September 8, 2024

It's possible to show your implementation of that?
I think setColor work well because the sample demo app use this.

You need to used setColor with color integer this way :
int color = Color.RED;
or
int color = Color.parseColor("#00ff00")
and
circularFillableLoaders.setColor(color);

from circularfillableloaders.

serkandyck avatar serkandyck commented on September 8, 2024
@Bind(R.id.loaderCpu)
CircularFillableLoaders  loaderCpu;

@Bind(R.id.loaderRam)
CircularFillableLoaders loaderRam;

@Bind(R.id.loaderSd)
CircularFillableLoaders loaderSd;

private void fillData() {

    long l = AppUtil.getAvailMemory(mContext);
    long y = AppUtil.getTotalMemory(mContext);
    final double x = (((y - l) / (double) y) * 100);
    loaderSd.setProgress((int) x);

    SDCardInfo mSDCardInfo = StorageUtil.getSDCardInfo();
    SDCardInfo mSystemInfo = StorageUtil.getSystemSpaceInfo(mContext);

    long nAvailaBlock;
    long TotalBlocks;
    if (mSDCardInfo != null) {
        nAvailaBlock = mSDCardInfo.free + mSystemInfo.free;
        TotalBlocks = mSDCardInfo.total + mSystemInfo.total;
    } else {
        nAvailaBlock = mSystemInfo.free;
        TotalBlocks = mSystemInfo.total;
    }

    final double percentStore = (((TotalBlocks - nAvailaBlock) / (double) TotalBlocks) * 100);


    capacity.setText(StorageUtil.convertStorage(TotalBlocks - nAvailaBlock) + "/" + StorageUtil.convertStorage(TotalBlocks));
    ram.setText(getUsageMemory() + "/" + getTotalRAM());
    loaderRam.setProgress((int) percentStore);
    loaderCpu.setColor(color);

Can i use all customization border, amplitude, progress but color get java.lang.IllegalArgumentException: width and height must be > 0

from circularfillableloaders.

serkandyck avatar serkandyck commented on September 8, 2024

at com.mikhaellopez.circularfillableloaders.CircularFillableLoaders.updateWaveShader(CircularFillableLoaders.java:196)
at com.mikhaellopez.circularfillableloaders.CircularFillableLoaders.setColor(CircularFillableLoaders.java:306)
at com.androidcleaner.rambooster.fragment.MainFragment.fillData(MainFragment.java:124)
at com.androidcleaner.rambooster.fragment.MainFragment.onResume(MainFragment.java:80)

Maybe, Problem on Butterknife

from circularfillableloaders.

serkandyck avatar serkandyck commented on September 8, 2024

if i put only <com.mikhaellopez.circularfillableloaders.CircularFillableLoaders and not any customization java code. Only XML Screenshot: http://prntscr.com/9dqll7 This Fragment Layout.

from circularfillableloaders.

serkandyck avatar serkandyck commented on September 8, 2024

Problem on executing Code early and view's layout has not yet been measured by Android. i set timer and problem fixed. Sorry

from circularfillableloaders.

lopspower avatar lopspower commented on September 8, 2024

Cool, the goal is that you are a solution 👍

from circularfillableloaders.

kiaanpillay avatar kiaanpillay commented on September 8, 2024

I'm having the exact same issue. Please elaborate on how to fix

from circularfillableloaders.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.