Sub GetDimValInt(Cls As String ,dimName As String ) As Int
':Msgbox(GetDimValInt("net.youmi.android.spot.SpotManager","ORIENTATION_PORTRAIT"),"")=0,ORIENTATION_LANDSCAPE=1
'dimName:Constant variable names in the library, Cls: reference package name class name
Dim A As Int
Dim jo As JavaObject
jo.InitializeStatic(Cls)
A= jo.GetField(dimName)
Return A
End Sub
i have a jar file,name is :YoumiSdkpic.jar
if i want to get the value like java:SpotManager.ORIENTATION_PORTRAIT
i can use GetDimValInt("net.youmi.android.spot.SpotManager","ORIENTATION_PORTRAIT"),the value =0
it's a number.
if i want to get a view ,how to do? and it's need to create new view from jar.
java code is:
// 实例化广告条
AdView adView = new AdView(this, AdSize.FIT_SCREEN);
// 获取要嵌入广告条的布局
LinearLayout adLayout=(LinearLayout)findViewById(R.id.adLayout);
// 将广告条加入到布局中
adLayout.addView(adView);
how can i write the code to use this jar? (it's no xml file,only put JAR FILE TO LIB PATH(YoumiSdkpic.jar
),WITH "#AdditionalJar: YoumiSdkpic" IN MAIN ACTIVITY.
':Msgbox(GetDimValInt("net.youmi.android.spot.SpotManager","ORIENTATION_PORTRAIT"),"")=0,ORIENTATION_LANDSCAPE=1
'dimName:Constant variable names in the library, Cls: reference package name class name
Dim A As Int
Dim jo As JavaObject
jo.InitializeStatic(Cls)
A= jo.GetField(dimName)
Return A
End Sub
i have a jar file,name is :YoumiSdkpic.jar
if i want to get the value like java:SpotManager.ORIENTATION_PORTRAIT
i can use GetDimValInt("net.youmi.android.spot.SpotManager","ORIENTATION_PORTRAIT"),the value =0
it's a number.
if i want to get a view ,how to do? and it's need to create new view from jar.
java code is:
// 实例化广告条
AdView adView = new AdView(this, AdSize.FIT_SCREEN);
// 获取要嵌入广告条的布局
LinearLayout adLayout=(LinearLayout)findViewById(R.id.adLayout);
// 将广告条加入到布局中
adLayout.addView(adView);
how can i write the code to use this jar? (it's no xml file,only put JAR FILE TO LIB PATH(YoumiSdkpic.jar
),WITH "#AdditionalJar: YoumiSdkpic" IN MAIN ACTIVITY.