B4A Library StdActionBarHelper - Utilities for the Standard ActionBar

bermooda

Member
Licensed User
Longtime User
Hi
i tried to test your lib, but i got exception on
B4X:
NavDrawer.Initialize("Drawer", pContent, 240dip)
line 54
message:
** Activity (main) Create, isFirst = true **
java.lang.NoClassDefFoundError: de.amberhome.navdrawer.DrawerLayout$ViewDragCallback
at de.amberhome.navdrawer.DrawerLayout.<init>(DrawerLayout.java:232)
at de.amberhome.navdrawer.DrawerLayout.<init>(DrawerLayout.java:222)
at de.amberhome.navdrawer.DrawerLayout.<init>(DrawerLayout.java:218)
at de.amberhome.navdrawer.NavigationDrawer.Initialize2(NavigationDrawer.java:84)
at de.amberhome.navdrawer.NavigationDrawer.Initialize(NavigationDrawer.java:63)
at de.amberhome.navdraweractionbar.main._activity_create(main.java:327)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:174)
at de.amberhome.navdraweractionbar.main.afterFirstLayout(main.java:98)
at de.amberhome.navdraweractionbar.main.access$100(main.java:16)
at de.amberhome.navdraweractionbar.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5144)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
at dalvik.system.NativeStart.main(Native Method)

is there anything I'm missing?
 

corwin42

Expert
Licensed User
Longtime User
Hi
i tried to test your lib, but i got exception on
B4X:
NavDrawer.Initialize("Drawer", pContent, 240dip)

is there anything I'm missing?

Have you copied the latest support v4 library to your custom libs folder and are you sure it is really the latest?
 

corwin42

Expert
Licensed User
Longtime User
hey! this forum never took so much time to reply either affirmatively or otherwise.
i am stuck on the project, if this is not possible ...plz let me know so that i could find some other way round.
regards,
sanjib

The PopupMenu object uses the standard Android PopupMenu class. There is no way to control the width ob the menu to set it to 100%x. The width of the PopupMenu is calculated from the size of its contents.
 

corwin42

Expert
Licensed User
Longtime User
hello corwin42
how can i display multilevel navigation in NavDrawer just like this



your help will be appreciated ....
regards

This question is not really related to this library nor the AHNavigationDrawer library. It may be possible to use something like the Ultimate ListView Library.

If you need further help on this please start a new thread in the questions forum.
 

corwin42

Expert
Licensed User
Longtime User
You have to create your own theme with a modified style for the PopupMenu. I haven't done it manually by myself but have a look at this link. The solution there should work.

You can even use the Action Bar Style Generator to create a complete theme for the ActionBar which will change the appearance of the PopupMenu, too.
 

b4auser1

Well-Known Member
Licensed User
Longtime User
I initialize PopupMenu in ULV_DBQ_CellLongClick each time in order to have MenuItem Title based on data in ULV Row. I noticed, that icon is shown only for the first time. Then Menu is shown and works correctly, but icon is not displayed.
 

corwin42

Expert
Licensed User
Longtime User
I initialize PopupMenu in ULV_DBQ_CellLongClick each time in order to have MenuItem Title based on data in ULV Row. I noticed, that icon is shown only for the first time. Then Menu is shown and works correctly, but icon is not displayed.

This is indeed a bug which occurs if the PopupMenu is initialized again. Try to Dim it again, too not just initialize. This should fix the problem.
 

Myr0n

Active Member
Licensed User
Longtime User
Hi
How can show permanently the action overflow menu on the action bar with this library?
I would like to do that, because my device has a physical menu button but I have other devices that do not and I would like that my app, show as same is possible in any device.

Thank you
 

corwin42

Expert
Licensed User
Longtime User
Hi
How can show permanently the action overflow menu on the action bar with this library?
You can't. This library does not control the overflow menu.
 

b4auser1

Well-Known Member
Licensed User
Longtime User
Hi corwin42,

Could you remove the messages in the LOG like
"Set Icon"
"Set Icons visible"
"Done"
from the PopupMenu class.

Thank you.
 

NeverGiveUp2

Member
Licensed User
Longtime User
Hi Corwin42,

thank's for your good work here in the community. I start with the actionbar in last week and find
your StdActionbar-lib. Is it possible to change the hook-icon on the left side in another icon. I tried some different
code, but the icon is every time only the hook-icon. I would like to change this icon. Is this
possible, or do you can modify your lib.
 

NeverGiveUp2

Member
Licensed User
Longtime User
The answer of my question is:

You have to generate your own theme!

B4X:
<resources>

  <style name="Theme.Meal4up" parent="@android:style/Theme.Holo.Light">
  
  <!-- This is the icon for close the menu. Original-Icon is "ic_cab_done_holo_light" -->
       <item name="android:actionModeCloseDrawable">@drawable/ic_action_back</item>
  
  
  </style>
</resource>

Here an importand information for custom xml-theme-files. The file name is not importand for the b4a-manifest-file.

You have to use the name inside the File.

Example: Filename: theme.xml

inside File:

<style name="Theme.Meal4up" parent="@android:style/Theme.Holo.Light">

Line in the b4a-Manifest-Editor:

SetApplicationAttribute(android:theme, "@style/Theme.Meal4up")

Hope it will helpfull.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…