Circular Battery Indicator

Circular Battery Indicator

Use this in a custom view:

Comment #1: Create script

Comment #2: Dummy Binding

You can also take this script as an inspiration to create circular progressbars for other things.

]]>

2 Commentsto Circular Battery Indicator

  1. Anonymous says:

    < ![CDATA[

    LL.bindClass(“android.graphics.drawable.GradientDrawable”);


    LL.bindClass(“android.widget.ProgressBar”);


    LL.bindClass(“android.R”);



    var d = new GradientDrawable();


    d.setShape(GradientDrawable.RING);


    d.setUseLevel(true);


    d.setColor(0xffff0000);


    var batteryProgressBar = new ProgressBar(LL.getContext(),null,R.attr.progressBarStyleHorizontal);


    batteryProgressBar.setProgressDrawable(d);


    batteryProgressBar.setProgress(LL.getVariables().getInteger(“bat_level”));


    return batteryProgressBar;

    ]]>

  2. Anonymous says:

    < ![CDATA[

    item.getView().setProgress($bat_level);


    return $bat_level;

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *