====== About the script ======
* Purpose : This script show a round battery bar
* Author : F43nd1r
* Current Version : 1.0
* Link: https://plus.google.com/+LukasMorawietz/posts/ZMet1uZi3eM
====== Changelog ======
* Version 1.0 (28/6/2016): initial release in wiki
====== How to use the script ======
* Create a custom view.
* Set first script in the "Create" event
* Set second script in "Dummy" binding
====== Issues and Hints ======
//please report all bugs in the g+ community!//
====== Create Script ======
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;
====== Dummy Binding ======
item.getView().setProgress($bat_level);
return $bat_level