Java Question XverhelstX's B4ALibGen

Theera

Well-Known Member
Licensed User
Longtime User
Hi all,
@XverhelstX ,I would like to thank you very much this tool.
Have you ever used XverhelstX's B4ALibGen? I have just tried it. It's more interesting for the developer who have no java programming skill. This is example as below,but it has a few error how to finish(I still not make library by this strategy ,but I beleave it help ).
@Erel, I think you should study this way for help it completely. (More libraries, B4A will be power tool) Please don't deny my request.

The First I use dex2jar convert apk file to be jarfile and then use XverhelstX's B4ALibGen for generate java file for using SLC compile it again.

B4X:
import android.graphics.Canvas;
import android.util.AttributeSet;
import com.lylc.widget.circularprogressbar.example.CircularProgressBar.ProgressAnimationListener;
import anywheresoftware.b4a.BA.ActivityObject;
import anywheresoftware.b4a.BA.Author;
import anywheresoftware.b4a.BA.DependsOn;
import anywheresoftware.b4a.BA.ShortName;
import anywheresoftware.b4a.BA.Version;
import com.lylc.widget.circularprogressbar.example.*;

@ShortName("CircularProgressBar")
@Author("Theera Soontornwongsakorn")
@Version(1.0f)
@ActivityObject
@DependsOn(values = { "CircularProgressBarExample-dex2jar" })

/**
* Created with Basic4Android Library Generator - by XverhelstX
*/
public class CircularProgressBar{

    private BA ba;
    private String eventName;
    private CircularProgressBar circularprogressbar;

    public void Initialize(final BA ba, String EventName) {
        this.ba = ba;
        this.eventName = EventName.toLowerCase(BA.cul);
        this.circularprogressbar = new CircularProgressBar();
    }

    public CircularProgressBar getCircularProgressBar() {
        return this.circularprogressbar;
    }

    public void setCircularProgressBar(CircularProgressBar circularprogressbar) {
        this.circularprogressbar = circularprogressbar;
    }

    public void animateProgressTo(int arg0, int arg1, ProgressAnimationListener arg2){
        this.circularprogressbar.animateProgressTo(arg0, arg1, arg2);
    }

    public boolean getHasShadow() {
        return this.circularprogressbar.getHasShadow();
    }

    public String getTitle() {
        return this.circularprogressbar.getTitle();
    }

    public void init(AttributeSet arg0, int arg1){
        this.circularprogressbar.init(arg0, arg1);
    }

    public void onDraw(Canvas arg0){
        this.circularprogressbar.onDraw(arg0);
    }

    public void onMeasure(int arg0, int arg1){
        this.circularprogressbar.onMeasure(arg0, arg1);
    }

    public void setHasShadow(boolean arg0){
        this.circularprogressbar.setHasShadow(arg0);
    }

    public void setProgress(int arg0){
        this.circularprogressbar.setProgress(arg0);
    }

    public void setShadow(int arg0){
        this.circularprogressbar.setShadow(arg0);
    }

    public void setSubTitle(String arg0){
        this.circularprogressbar.setSubTitle(arg0);
    }

    public void setSubTitleColor(int arg0){
        this.circularprogressbar.setSubTitleColor(arg0);
    }

    public void setTitle(String arg0){
        this.circularprogressbar.setTitle(arg0);
    }

    public void setTitleColor(int arg0){
        this.circularprogressbar.setTitleColor(arg0);
    }


}
 
Last edited:

tchart

Well-Known Member
Licensed User
Longtime User
There is no 100% automated way. I wrote a .Net app which scrapes the Java Doc for a specific library I use. It generates around 80% of the code for the library but I still have to manually tweak things.
 

Theera

Well-Known Member
Licensed User
Longtime User
Hi all,
I don't understand that Erel'message "It is not possible to build libraries with an automatic tool". Now I can compile it,but I don't know to test it. I would like someone help test (copy all of 3 files in your custom libraries folder )
 

Attachments

  • CircularProgressBar.zip
    258.3 KB · Views: 350
Cookies are required to use this site. You must accept them to continue using the site. Learn more…