Java Question How to implement this method in B4A Library ?

Discussion in 'Libraries developers questions' started by jahswani, Jun 17, 2015.

  1. jahswani

    jahswani Active Member Licensed User

    I want to understand i'am trying a Wrapper but i'm stuck here.This is the method i want to implement in my B4A project.
    public void setLicenses(int id) throws NotFoundException,
                XmlPullParserException, IOException {
    List<License> licenses = ParseLicenseXml.Parse(getResources()
            LayoutInflater inflater = (LayoutInflater) getContext()

    View child;
    TextView title;
    TextView name;
    TextView license;

    for (License l : licenses) {
                child = inflater.inflate(R.layout.license_layout, 
                title = (
    TextView) child.findViewById(;
                name = (
    TextView) child.findViewById(;
                license = (
    TextView) child.findViewById(;

                        l.getType() == License.TYPE_FILE ? R.string.file
                        + l.getName());
    This is the usage.I want to load the file on my view.
    LicenseView licenseView = (LicenseView) findViewById(;
    try {
    } catch (NotFoundException e1) {
    } catch (XmlPullParserException e1) {
    } catch (IOException e1) {
    This is the original github project.
    Thanks for your help.
    I attached what what i've already done.

    Attached Files:

  2. DonManfred

    DonManfred Expert Licensed User

    And this a working wrapper for it

    Please find the wrapper including an example here :D
    jahswani likes this.