MSMaterialDrawer

Anser

Well-Known Member
Licensed User
Longtime User
B4X:
.....
    Dim p8 As MSIconicDrawable : p8.Initialize("faw-user-plus"): p8.Color = Colors.ARGB(255, 255, 255, 255): p8.BackgroundColor = Colors.ARGB(255, 89,89,89 )
.....

is there a way to centralize the same ??
Thank you
Marco

Did you try
B4X:
p8.paddingDP(IconPading as Int)
 

lomosami

Member
Licensed User
Longtime User
I'm guessing you didnt try any of the samples or demos?
That is an account selection header. You dont need the header at all, just dont add it to your drawer.
You cannot make that particular one a popup menu, it displays a list of accounts to select from.

You can include a custom header, and add a popup menu with it. Should be very easy.

Great lib. I tried your demo to understand how to use the lib, but the selection header in your example doesn't do anything. I think that when a selection header is pressed it will show the list of account but not appear.
 

lomosami

Member
Licensed User
Longtime User
Great lib. I tried your demo to understand how to use the lib, but the selection header in your example doesn't do anything. I think that when a selection header is pressed it will show the list of account but not appear.

OK after some test I understand that when press the arrow profile call MSA_ProfileClicked. But now the question is: how create a selectable profile menu inside the drawer?
 

Prosg

Active Member
Licensed User
Longtime User
hi
i try where i extract md-lib.zip (values/dimens.xml) to find where is the line to change the margin between the text and the icon. ?

B4X:
  <dimen name="material_drawer_item_primary_icon_padding_right">24dp</dimen>
padding_right only reduce the icon if we up the dp

Could u help

ty
 

MarcoRome

Expert
Licensed User
Longtime User
Hi all. I have this:

Immagine.jpg


When i write this code in
Sub MD_ItemClick(Position As Int, Identifier As Int)

B4X:
Dim p9 As MSIconicDrawable : p9.Initialize("faw-check"): p9.Color = Colors.ARGB(255,  255,255,255)

    If Position = 2 Then

        MD.updateName(2, "Proviamo" )
        MD.updateIcon(2, p9.Drawable )
 
    End If

I have this result:

Immagine2.jpg


Is right icon, but seem that
MD.updateName(2, "Proviamo" )
dont work.
Any idea ??
Thank you
Marco
 

DonManfred

Expert
Licensed User
Longtime User
Any idea ??
Maybe a bug in the old MaterialDrawer library.

I´m doing a completely new wrap for this library. It is not finished as yet but i´ll try to reproduce your issue and see if it is doing the same with my wrap..

Before you ask; i´ll make an beta available this weekend for a few people. But the lib will be chargeable as i spent a lot of work on it actually.
 

MarcoRome

Expert
Licensed User
Longtime User
Maybe a bug in the old MaterialDrawer library.

I´m doing a completely new wrap for this library. It is not finished as yet but i´ll try to reproduce your issue and see if it is doing the same with my wrap..

Before you ask; i´ll make an beta available this weekend for a few people. But the lib will be chargeable as i spent a lot of work on it actually.

Great Don ;) I cant wait to try out your new masterpiece
 

DonManfred

Expert
Licensed User
Longtime User
I cant wait to try out your new masterpiece
You´ll receive a link to test on weekend ;)

Look like this at present.

Note that the profiles are just "ProfileDrawerItems". they are not really profiles... The header and profiles are not working as yet.

But there are other issues. different theme for switch and toggle for example.
The icon is not working as yet...

Screenshot_20160603-070637.png
 

DonManfred

Expert
Licensed User
Longtime User
MD.updateIcon(2, p9.Drawable )
as seen in my lib i would guess you should hold a reference to the DrawerItem which you added to the drawer.

Change the properties of the stored Draweritem and then update the item with
B4X:
    mnu3.withBadge(Rnd(1,5001))
    mdrawer.updateItem(mnu3)
 

MarcoRome

Expert
Licensed User
Longtime User
You´ll receive a link to test on weekend ;)

Look like this at present.

Note that the profiles are just "ProfileDrawerItems". they are not really profiles... The header and profiles are not working as yet.

But there are other issues. different theme for switch and toggle for example.
The icon is not working as yet...

View attachment 44617

Great work Don as usual ;) and the look is really very, very interesting.
I wait you link
 

itgirl

Active Member
Licensed User
Longtime User
Maybe a bug in the old MaterialDrawer library.

I´m doing a completely new wrap for this library. It is not finished as yet but i´ll try to reproduce your issue and see if it is doing the same with my wrap..

Before you ask; i´ll make an beta available this weekend for a few people. But the lib will be chargeable as i spent a lot of work on it actually.
count me in :) in the new lib
 

jazzzzzzz

Active Member
Licensed User
Longtime User
Maybe a bug in the old MaterialDrawer library.

I´m doing a completely new wrap for this library. It is not finished as yet but i´ll try to reproduce your issue and see if it is doing the same with my wrap..

Before you ask; i´ll make an beta available this weekend for a few people. But the lib will be chargeable as i spent a lot of work on it actually.

I would like to test it...!
 

DonManfred

Expert
Licensed User
Longtime User
I wait you link
A step further... Icons seems to be working now

Compare the two images. You´ll see a similarity between your issue here.
And you´ll see it is working for me :)
B4X:
icon.icon("gmd_account_circle").color(Colors.Blue).contourColor(Colors.Red).drawContour(True).backgroundColor(Colors.White).iconOffsetXDp(8)
 

Attachments

  • Screenshot_20160604-000224.png
    Screenshot_20160604-000224.png
    161.4 KB · Views: 374
  • Screenshot_20160604-001007.png
    Screenshot_20160604-001007.png
    160.4 KB · Views: 352
Top