madcyph3r / advancedmaterialdrawer Goto Github PK
View Code? Open in Web Editor NEWA Gmail-like Material Drawer implementation
License: Apache License 2.0
A Gmail-like Material Drawer implementation
License: Apache License 2.0
How can I use Master Child Navigation up to multilevel ??
Bcoz of multi-level navigation does not work properly..
how can i add section dynamically? is it possible?
Can we have two Drawers that are both Side i.e. On Left & Right Side as well ??
If so, then how can I achieve this ?
Could you please add Switcher menu item like in google play music app? Or maybe there are some suggestions so I can do it easilly?
Thanks!
How to Check weather Drawer is open or not ??
And How to toggle the Drawer ??
When I do this the layout of the activity doesn't show. It displays a blank screen
how do i make it to navigate from the first menu to the second menu list within the drawer?
Kinda lost There are a lot of examples with explanations...
where?
if i remove section in a for() the section are not removed correctly
for (int i = 0; i < categorySections.size() - 1; i++) {
getCurrentMenu().removeItem(categorySections.get(i));
categorySections.remove(i);
}
for (QUICategory category : quiCategories) {
if (QUICategoryUtils.isRealCategory(category)) {
MaterialSection categorySection = newSection(category.getName(), DrawableController.getWalletIcon(PromotionsActivity.this), PromotionsListFragment.newInstance(category, address), false, drawer.getCurrentMenu());
categorySection.getText().setTextColor(getResources().getColor(R.color.primary));
categorySection.setIcon(new ColorDrawable(getResources().getColor(android.R.color.transparent)));
categorySections.add(categorySection);
} else {
newLabel(category.getName(), false, drawer.getCurrentMenu());
}
}
start to heading up. I want to add this lib into our drawer as a part of the feature.
Hi,
First of all thanks for this useful library with ripple support on lower android version.
I am trying to include this library as 2 level navigation with using BaseActivity
.
What I have done is:
BaseActivity
to include all code that you have given in your sample code.MainActivity
extends this base activity and I get the drawer as expected with first section fragment loaded(Wiki on neokree repo suggest that first section should should always be fragment, is there a alternative?)What I have to do is:
SecondActivity
. Is this possible to make this section as selected when SecondActivity
is launched(Currently no section is selected when SecondActivity
is launched).DrawerToggle
while setting a back arrow instead of hamburger in SecondActivity
. I followed same step as you mentioned in issue #16, but didn't help.How can I achieve this type of navigation drawer across all activity (like Gmail does, loading a particular email has Inbox section highlighted, maybe they are using fragment) . Is this possible with Activity or I have to use fragment everywhere to achieve this?
Please help.
By the way please add DummyActivity in your example's manifest.xml, as it causes exception.
Thanks.
why if i press back exit app??? please make it customizable
since there is heavy loading from the layout and binding layout within the fragment. I want to ask for a better solution to transit different fragments in the layout. accordingly article. is there anyway to implement that into the code base?
Hi, great work you put on improving this library!
I have a question though. Is there a way I can change the toolbar's typeface on fragment change?
I've tried adding a custom textview into Toolbar by getToolbar()
method, but it still uses default font.
Is there a way I can set this globally so that all fragments are using this custom font on its Toolbar?
Hi madcyph3r!
I'm using your repositorie for an app but I have a problem with the head item: I have copied your head item example but in my app it doesn't show the "Head title" and "Head Subtitle", only the "Head Image"... and I don't know what can I do for fix this...
Have you any idea about fix this problem?
when i add more item in menu and appear scroll than bottom item disappear
if u fix this problem can u release ASAP the lib on maven? also as snapshot please
Can't seem to do this. I can only open fragments with the drawer
How can I have same Menu in all fragments ??
If i use OnCreateMenu in DrawerActivity then I cannot access the Drawer, so how can I achieve this ??
if you would to make more beautiful you can implement ripple effect on section pressed
i used the code like so:
newDevisor(menu);
newSection("Fashion", listpage.newInstance(fashion()), false, menu);
newDevisor(menu);
it doesnt work as expected.
Is it possible to change the font of the section text in the drawer?
There is an action bar on V21 and V19 styling issue followed by the material drawer. There is a request that I want to make my own pattern or images for the background of the action bar but it doesnt seem to let me doing so. I would like to ask if there is a possible way to achieve this. I would really want to get this under control by a custom attribution declaration in the nagivationdrawer theme.
How can I Replace Fragment from Curr. Fragment but not like Master Child Navigation , want to replace as in the done in Section Selection in DrawerActivity..??
please change default case at line 830 in this way
if(actionBarToggle != null) {
getActionBarToggle().setDrawerIndicatorEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
}
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().invalidateOptionsMenu();
break;
Hi. how to show slide from right to left?
I'm trying to set each sections colour individually by getting the view and setting the background but it doesn't seem to be working. Any ideas how i could do this?
I have 6 sections ( 6 fragments ) inside the Drawer and the problem is that when I press on a section there's a small glitch. I just don't like the fact that the drawer executes 2 operations in the same time ( it closes the drawer and it opens the new fragment in the same time ) --> which causes that glitch.
How can I avoid this?
I was thinking to implement a handler ( even if it's not a good practice ) but I can't get it done.
Or maybe someone can come up with a better solution, thanks!
Hi
Thanks for the useful library.
I'm trying to achieve a two levels navigation.
I'm using a BaseActivity
that creates the common navigation drawer.
MainActivity
extends BaseActivity
and shows the first fragment.
Every navigation drawer item replaces a fragment. These fragments contain lists.
If I click the second navigation drawer item, it correctly replaces the fragment and select the item in the navigation drawer.
Clicking a list item opens a DetailActivity
. DetailActivity
extends BaseActivity
, so I have the common navigation drawer. Now, I have a few needs:
If you think I'm using the wrong approach, please, let me. I'd appreciate feedbacks.
Thanks
Hi, first thanks for this very USEFUL library,
I have just one problem, when i want to start another activity, i don't know how to keep action bar.
// my home activity with navigation drawer
public class MainActivity extends MaterialNavigationDrawer
....
startActivity(intent);
....
// my second activity
public class GainActivity extends ActionBarActivity
I hope i was clear :)
Thank you.
Hi. I'm trying to edit the lib to handle the rotation for tablet without reload all activity and fragment. But i can't do it. The problem is:
Start app in landscape
Menu is opened fixed to left and content to right
Change fragment in content fragment
Rotate tablet and all is reload, so menu is with slide but first fragment is show and not second
if i put "configChanges orientation" in manifest, the content fragment show the latest fragment that i loaded, but menu still with slide both for landscape and portrait.
can you help me please?
is that possible to make it generic on the textview for the MaterialSection so that people can use their own textview to render the styled fonts from their choice.. follow up
Hi,
top bar alweys is dark (like have extra layer with #66000000"), even with :
< item name=" autoDarkStatusBar ">false< /item >
to be shure i also change:
autoDarkStatusbar = false;
in init, but effect stay, how to disable it?
hi, thanks you for develop for this lib
i want use this lib but i'm not. run of the project show me this errors :
03-31 12:42:54.427 2130-2130/com.example.tellfa.myapplication4 E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.tellfa.myapplication4, PID: 2130
java.lang.NoSuchFieldError: de.madcyph3r.materialnavigationdrawer.R$id.current_head_item_title
at de.madcyph3r.materialnavigationdrawer.MaterialNavigationDrawer.initViews(MaterialNavigationDrawer.java:300)
at de.madcyph3r.materialnavigationdrawer.MaterialNavigationDrawer.onCreate(MaterialNavigationDrawer.java:184)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
please help me, this lib is important for me
How can I Start Fragment from Another Fragment ?
And Current Fragment is in Material Drawer & New Fragment to be replaced is not in the Material Drawer..So how can I start New Fragment on Button Click that is in Current Fragment ?
if i set custom fragment at startup app crash. please edit this method so:
// own methods
public void reloadMenu() {
loadMenu(false, false);
if (null != currentSection) currentSection.select();
}
if you have better solution good work :D
I add
repositories {
maven { url 'http://dl.bintray.com/madcyph3r/maven/' }
}
dependencies {
compile 'de.madcyph3r:materialDrawer:1.1.3@aar'
}
in build.gradle. But it return Failed to resolve: de.madcyph3r:materialDrawer:1.1.3
Any help will be appreciated.
can i change text section size? can i set status bar color only?
on android 2.3 selector aren't visible on section
so are there any config for the menu width?
how can i handle the change fragment and show back button? than if first fragment show again menu button? and how can i lock menu?
private void addLabel(MaterialLabel label) {
...
}
private void addBottomLabel(MaterialLabel label) {
...
}
private void addSection(MaterialSection section) {
...
}
private void addBottomSection(MaterialSection section) {
...
}
I saw that they are the same. We need to make it more concise.
i cannot set windows overlay property. neither from manifest and neither dynamically
Hi,
Sorry for bugging you again.
But I want to clear few more things like:
Thanks for your example with MasterChildNavigation, though you forgot to add that in your app I think.
To test I have added this in your FunctionallyFragment.java and added this activity to manifest.
content.add(new ExampleData("Master/Child Fragment Activity", MasterChildNavActivity.class));
Thanks again.
I want to change photo after creation of MaterialHeadItem. I'm using picasso and when i do setPhoto(drawable), nothing happens (no refresh).
Hey madcyph3r,
First off great lib! its freaking awesome!!!
I'd like to use this lib in a project where i have an array of custom objects and am using this array to build the head items. Sometimes i may have up to 50+ custom objects in the array and need a head item for each one. I'd like to have a static background between them. Or a way to load the background initially for the first item then only on head item change. (I ran into memory issues when setting the same background (~12kb jpg) to 50+ header items).
I need to be able to load the custom object from the array based on the position of the head item that was clicked (either by avatar clicked or from extra menu).
I'd attempted to use bits and pieces from the header item types 5 item with extra menu and i can successfully build 50+ header items with a transparent xml background and a onheaditemchange listener. However this listener seems to only be being called when i click the avatars and not when clicking from the extra menu (not sure why).
Any advise or explanation on how to go about this would be greatly appreciated. Also do you have in the pipeline a demo with large amounts of head items or something similar to my query? thanks for your time.
please, if you can, apply one of the technique of there answer on stack overflow
http://stackoverflow.com/questions/18343018/optimizing-drawer-and-activity-launching-speed
thanks
I'm passing a DialogFragment into newSection in my drawer. In order for the dialog event to show, it needs to use .show()
method. The problem with this is every time my drawer started, it will automatically trigger the event without having me to click on the section.
Here is the code for clarification:
FragmentManager fm = getSupportFragmentManager();
FragmentLogoutDialog fragmentLogoutDialog = new FragmentLogoutDialog();
fragmentLogoutDialog.show(fm, "logout_dialog_fragment");
this.newSection(getString(R.string.section_bottom_logout), fragmentLogoutDialog, true, menu);
Anything else besides DialogFragment is fine with this. How do I make DialogFragment trigger only when I click on the section? Or is there something I missed?
Thanks
is this possible that we can combine the sliding menu into this library and make a choice on the xml to make it works?
I'm not entirely sure of the cause, but I'm quietly confident recent changes in Android have caused a conflict with your library:
~PathToMyProject\app\build\intermediates\exploded-aar\de.madcyph3r\materialDrawer\1.1.3\res\values\values.xml
Error:(2) Attribute "rippleColor" has already been defined
I'm pretty sure it's adding this new dependency which is causing the problem since it seems to compile without it:
compile 'com.android.support:design:22.2.0'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.