Closed thailey01 closed 8 years ago
Can you post how you used it and the error? It is dependent on appcompat and that is a dependency
Thank you for responding. I just followed your readme page to put the menu in. However I ran across a few problems when implementing. There were values that I had to add to my project that were giving me errors because Android Studio said it was missing from the library such as default_radius, default_elevation and fab_margin. I had to add these in the dimens page in my project because doing it in the layout wasn't working. It also told me about having to use AppCompat which I know many projects use but every time I try I get unexpected results like missing actionbar and such. I think this project is really cool and would love to use it, I just can't seem to implement it correctly.
That's extremely weird because it does include all these values. Are you using it via gradle?
Can you look at the sample once? Or. Probably upload your sample and I can have a look at it?
Yeah, I added the project via gradle. How can I upload a sample for you? I'm new to github.
Here's my xml file `<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" >
<ImageView
android:id="@+id/background"
android:layout_above="@+id/toolbar"
style="@style/BackgroundImageView" />
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/toolbar">
<android.support.v4.view.PagerTabStrip
android:id="@+id/pager_tab_strip"
style="@style/PagerTabStrip"/>
</android.support.v4.view.ViewPager>
<RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
style="@style/ToolBar">
<com.sa90.materialarcmenu.ArcMenu
android:id="@+id/arc_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
app:menu_src="@android:drawable/ic_dialog_dialer"
app:menu_open="arc_left" >
<com.melnykov.fab.FloatingActionButton
android:id="@+id/action_order"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_margin="5dp"
android:src="@drawable/ic_shopping_cart"
app:fab_type="mini"
app:fab_shadow="true"
app:fab_colorNormal="@color/normalFloatColor"
app:fab_colorPressed="@color/pressedFloatColor"
app:fab_colorRipple="@color/normalFloatColor"/>
<com.melnykov.fab.FloatingActionButton
android:id="@+id/action_notifications"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="5dp"
android:src="@android:drawable/ic_menu_agenda"
app:fab_type="mini"
app:fab_shadow="true"
app:fab_colorNormal="@color/normalFloatColor"
app:fab_colorPressed="@color/pressedFloatColor"
app:fab_colorRipple="@color/normalFloatColor"/>
<com.melnykov.fab.FloatingActionButton
android:id="@+id/action_add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_margin="5dp"
android:src="@android:drawable/ic_menu_add"
app:fab_type="mini"
app:fab_shadow="true"
app:fab_colorNormal="@color/normalFloatColor"
app:fab_colorPressed="@color/pressedFloatColor"
app:fab_colorRipple="@color/normalFloatColor"/>
</com.sa90.materialarcmenu.ArcMenu>
<!--<com.melnykov.fab.FloatingActionButton
android:id="@+id/action_order"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_margin="5dp"
android:src="@drawable/ic_shopping_cart"
app:fab_type="mini"
app:fab_shadow="true"
app:fab_colorNormal="@color/normalFloatColor"
app:fab_colorPressed="@color/pressedFloatColor"
app:fab_colorRipple="@color/normalFloatColor"/>
<com.melnykov.fab.FloatingActionButton
android:id="@+id/action_notifications"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="5dp"
android:src="@android:drawable/ic_menu_agenda"
app:fab_type="mini"
app:fab_shadow="true"
app:fab_colorNormal="@color/normalFloatColor"
app:fab_colorPressed="@color/pressedFloatColor"
app:fab_colorRipple="@color/normalFloatColor"/>
<com.melnykov.fab.FloatingActionButton
android:id="@+id/action_add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_margin="5dp"
android:src="@android:drawable/ic_menu_add"
app:fab_type="mini"
app:fab_shadow="true"
app:fab_colorNormal="@color/normalFloatColor"
app:fab_colorPressed="@color/pressedFloatColor"
app:fab_colorRipple="@color/normalFloatColor"/>-->
</RelativeLayout>
`
So, I've changed to AppCompat successfully (finally) and i've added the menu but it doesn't appear where it's supposed to and when I push the menu it moves off screen
I've implemented the ArcMenu correctly so far, I've fixed everything. Is there a way to trim the shadow on the ArcMenu though? I'm trying to put it in a toolbar at the bottom of the screen but the ArcMenu appears half above the toolbar (which is 50dp) and I'm assuming it's because of the shadow on the sides of the button.
Is there a way to get the menu button to actually show up in the corner of the screen as opposed to having some kind of margin it's moved over? It isn't fitting in my toolbar.
Oh! By default the menu has a margin of 16dp from the sides of the screen (bottom and left/right). This is to follow the material design guidelines.
Is the margin the only issue that you are facing? Can you attach a photo to make it more clear? Probably then I can add some functionality to allow you to change the margins?
If it's just the shadow issue, then you can use menu_elevation
to control the shadow cast
Yeah, I've managed to fix the other problems I was having and I've gotten the menu to be functional and it looks great! The margin is the only other problem I have right now because this is what the screen looks like with margins and I've tried changing the elevation and margin but nothing seems to change from my end.
Over relative layout (my toolbar):
Inside relative layout (my toolbar):
Aah. So you want to be able control the bottom and left margins. That functionality isn't there yet. It is fixed to 16dp. I'll add it in a day or two.
Thank you good sir. I love this arc menu and I think you've done a very good job. I can't wait for the update.
@thailey01 I have added support for the margins. You can use:
menu_margin
: to set the margins
menu_elevation
: to control the shadow
Thank you, I will have a look at the updates. You're a saint.
These updates are great! It would be cool if you could add menu size, similar to how floating action button has mini or normal.
can you create a new issue for this? to keep track
Also, I can change the margin but my app is still the same as it is in the first picture that I sent to you.
are you using menu_margin and not layout_margin?
I'm using menu_margin as suggested. menu_margin did change the layout in the second picture as desired, but not the first. The second pictures problem is that it's in a small relative layout and doesn't display over the other (main) layout.
Is this library made to work only with AppCompat? I've implemented it as the directions suggest and I'm getting an error saying ArcMenu could not be instantiated and Resources NotFoundException