How to add these java in B4A ?

Discussion in 'Chinese Forum' started by guxiaojiang, Mar 26, 2015.

  1. guxiaojiang

    guxiaojiang Member Licensed User

    How to add these java in B4A ?and call these java code
    java code:
    LinearLayout container = (LinearLayout) findViewById(R.id.ad_frame);
    BaiduBanner banner = new BaiduBanner (MainActivity.this);
    container.addView(banner);

    or(layout file)
    <com.baidu.ops.appunion.sdk.banner.BaiduBanner android:id="@+id/baiduBanner"
    android:layout_width="wrap_content" android:layout_height="wrap_content" />
     
  2. xiaoyao

    xiaoyao Member Licensed User

    BaiduBanner banner = new BaiduBanner (MainActivity.this);
    这些要用反射法去实现的,addView,你可以直接addView到一个PANEL上或者ACTIVITY.ADDVIEW

    你也可以把IMPORT等信息直接写在B4A代码中
    用 #if java这样的方式,这就不需要去理会怎么写B4A了。我写过有米广告,和你这百度广告原理是差不 多的
     
  3. guxiaojiang

    guxiaojiang Member Licensed User

    有米的我会,就是这个百度的bannner让我难倒了
     
  4. guxiaojiang

    guxiaojiang Member Licensed User

    你说的反射法是什么意思,有源码吗
     
  5. xiaoyao

    xiaoyao Member Licensed User

    这种有的人专门写SDK接口的,费用比较高,最好你用JAVA写JAR库给B4A调用
     
  6. imbault

    imbault Well-Known Member Licensed User

    Should be correct...:)
    Erel, you have to setup a Chinese forum
     
  7. Beja

    Beja Expert Licensed User

    fash866 likes this.
  8. xiaoyao

    xiaoyao Member Licensed User

    thank you
     
  9. Beja

    Beja Expert Licensed User

    Bukeqi
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice