Android Question Oredr : CompactActionBar

DonManfred

Expert
Licensed User
Longtime User
The best way is to use AppCompat
 
Upvote 0

Alansari

Member
Licensed User
Longtime User
That lib should work, the original post says B4A 2.5x because that was the current version when I wrote that library.

B4X:
--------- beginning of main
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 380)
java.lang.NoSuchMethodError: No virtual method AddTwoLinesAndBitmap2(Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Bitmap;Ljava/lang/Object;)V in class Lanywheresoftware/b4a/objects/ListViewWrapper; or its super classes (declaration of 'anywheresoftware.b4a.objects.ListViewWrapper' appears in /data/app/com.excel.alansari-1/base.apk)
    at njdude.compact.actionbar.compactactionbar._addmenuitem(compactactionbar.java:90)
    at com.excel.alansari.main._activity_create(main.java:380)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
    at com.excel.alansari.main.afterFirstLayout(main.java:102)
    at com.excel.alansari.main.access$000(main.java:17)
    at com.excel.alansari.main$WaitForLayout.run(main.java:80)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6682)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
 
Upvote 0

Alansari

Member
Licensed User
Longtime User
When I remove these code is working well put no word in the menu
B4X:
ActionBar.AddMenuItem(LoadBitmap(File.DirAssets, "addfav.png"), "          Add Fav", Colors.White, 1)
         ActionBar.AddMenuItem(LoadBitmap(File.DirAssets, "favlist.png"), "           Fav List", Colors.White, 2)
         ActionBar.AddMenuItem(LoadBitmap(File.DirAssets, "share.png"), "          Share", Colors.White, 3)

With thses code the app stopped
 
Upvote 0

udg

Expert
Licensed User
Longtime User
@NJDude : I had to recompile my own dgActionBar due to a similar problem. When using old libs with B4A 7+ (I guess from the charsequence introduction) it leads to that kind of error. No need to modify anything, just recompile with a recent B4A release.
IMHO, it will be better to have a pre-charseq library version (as it is now) and an updated one.
 
Upvote 0

Alansari

Member
Licensed User
Longtime User
A new version is attached to the first post HERE.

IMPORTANT: This is an improved version which BREAKS previous versions (I wrote this lib long time ago and never posted the new version on the forums).

Sorry for the inconvenience.

Thanks

I will try it

;)
 
Upvote 0
Top