B4A Library DesignSupport - Additional Material Design components

corwin42

Expert
Licensed User
I haven't tried this but it may be possible to add a Expandable List as ActionView to the menu. (Like the switch in the NavigationView example).

Another solution may be to show and hide the sub menus on click on the parent menu item.

Using the itemcollapsed attribute will not work.
 

beaker

Member
Licensed User
I haven't tried this but it may be possible to add a Expandable List as ActionView to the menu. (Like the switch in the NavigationView example).

Another solution may be to show and hide the sub menus on click on the parent menu item.

Using the itemcollapsed attribute will not work.
Thanks @corwin42 I've had a quick look but I'm not having any luck 'catching' the click on the submenu heading itself or managing to show/hide the submenu items. I'll take a look at the Expandable List you kindly linked to as that might do what I need. I thought it was going to be an basic property/behaviour of the submenu but obviously I was wrong! :( Thanks again for your help.
 

stanks

Active Member
Licensed User
i tested this with adding CustomListView, CustomListeView Expandable and ExpandablePanel. the result is very bad or i am doing something really wrong! number of items i tested was at least 100. so slow even on S7. (native) ListView doesn't have this problem so i guess the problem is somewhere with that modules i tested. just a note....nothing more
 

DonManfred

Expert
Licensed User
1. You should start a new thread in the questionsforum
2. You should upload a sample project which demonstrates the issue.

I am using the Navdrawer together with CLV in my App which runs on Android 7 with no problem.
 

Lello1964

Active Member
Licensed User
Hello,
using this Lib i have those message in log during app start:
-Start-
State: 16842910
State: 16843597
-End-
Yeah, it is!


who can tell me what is ?

this message is started when i have use an activity with this component.

Thanks
 

AldoRodrigo

Member
Licensed User
hi, I have estos problemas,

ERROR:
An error occurred.
Maven artifact not found:
com.android.support/appcompat-v7

LINE ERROR:
30 Unknown type: dstablayout
33 Unknown type: dsnavigationdrawer
131 Unknown member: pageconti
134 Variable 'Ac' is never assigned any value.

IDE:
B4A V. 6.8

LIB:
lib XmlViewEx V.2.0
lib AppCompat V.3.52

SDK:
Android Support Repository V.47
SDK Platform API 25
 
Last edited:

AldoRodrigo

Member
Licensed User
hi, I have estos problemas,

ERROR:
An error occurred.
Maven artifact not found:
com.android.support/appcompat-v7

LINE ERROR:
30 Unknown type: dstablayout
33 Unknown type: dsnavigationdrawer
131 Unknown member: pageconti
134 Variable 'Ac' is never assigned any value.

IDE:
B4A V. 6.8

LIB:
lib XmlViewEx V.2.0
lib AppCompat V.3.52

SDK:
Android Support Repository V.47
SDK Platform API 25

I solved reinstalling everything
 

so27

Active Member
Licensed User
Without the lines the NavigationDrawer will not display above the Statusbar.

Create two themes for your app (one can have the other as parent). One with the lines and one without. Assign the different themes to the activites with navigationdrawer and without.
How can I start an Activy with another theme?
 

Cebuvi

Active Member
Licensed User
Hello,

Is it possible to add a Custom List View to a Navigation Drawer?

A small example would be very useful.

Thanks.
 

hanyelmehy

Active Member
Licensed User
every thing was work when update i get this error
B4X:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference
    at de.amberhome.objects.NavigationDrawerWrapper.InitDrawerToggle(NavigationDrawerWrapper.java:179)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:755)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:345)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
    at com.myapp.web2android.mainscreen.afterFirstLayout(mainscreen.java:104)
    at com.myapp.web2android.mainscreen.access$000(mainscreen.java:17)
    at com.myapp.web2android.mainscreen$WaitForLayout.run(mainscreen.java:82)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5551)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
this is the code
B4X:
NavDrawer.Initialize2("NavDrawer", Activity, NavDrawer.DefaultDrawerWidth, NavDrawer.GRAVITY_START)
        NavDrawer.InitDrawerToggle
 

hanyelmehy

Active Member
Licensed User
This is not possible. A theme can only be set at object creation time.
It may be possible to recreate the ToolBar at runtime.
Thank you for your answer ,Is there a way to access/set Theme property i only found PopupTheme but not Theme.
also can i set ToolBar and NavigationDrawer to RTL
 

JohnC

Well-Known Member
Licensed User
Hi,

Your NavDrawer Example extends the background color of the actionbar to the status bar (notifications), with a slight dark tine - so the status bar background color is a slight tint darker then the action bar background color.

1) It seems setting the background color of the status bar like this assumes the status bar text color on the users device will be either white or black, otherwise there is a chance the background color of my app will make reading the status bar text difficult if the colors are too close to each other. So, is it safe to assume the user's status bar text color is black or white?

2) Since it appears that background color under the status bar is a slight tint darker then the actionbar background color, this will make user's devices that have a "white" status bar text color stand out and easier to read. But if the user's status text color is black, this could make it harder to read. So, is there any suggested method in setting the status bar background color so it wont work against the user's statusbar text color? Meaning, is there a way to see if the user's status bar color is white or black and then set the background color to something safe?
 
Top