Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu icons doesnt appears propertly #4

Open
karmil32 opened this issue May 20, 2017 · 7 comments
Open

Menu icons doesnt appears propertly #4

karmil32 opened this issue May 20, 2017 · 7 comments

Comments

@karmil32
Copy link

karmil32 commented May 20, 2017

I added this menu to my application and child menu icons doesnt show propertly. There is only icons - no background color like fab menu. Also one of the text label is cut off.
Here's screen how it looks:
https://www.dropbox.com/s/nn7r3itti08oip0/menu-issue.PNG?dl=0

@BrotherV
Copy link
Owner

BrotherV commented May 20, 2017 via email

@karmil32
Copy link
Author

karmil32 commented May 20, 2017

XML:
<com.bvapp.arcmenulibrary.ArcMenu android:id="@+id/arcMenu" android:layout_width="wrap_content" android:layout_height="wrap_content" arc:menuType="normal" arc:menuChildSize="24dp" arc:menuGravity="Right_Middle" arc:menuClickAnim="true" arc:menuChildAnim="false" arc:menuShadowElevation="true" arc:menuNormalColor="@color/colorAccent" android:layout_gravity="center_horizontal|end"> </com.bvapp.arcmenulibrary.ArcMenu>

Java:
`ArcMenu menu = (ArcMenu) view.findViewById(R.id.arcMenu);
menu.attachToRecyclerView(mRecyclerView);
menu.showTooltip(true);
menu.setToolTipBackColor(Color.WHITE);
menu.setToolTipCorner(6f);
menu.setToolTipPadding(2f);
menu.setToolTipTextColor(Color.BLUE);
menu.setAnim(300,300,ArcMenu.ANIM_MIDDLE_TO_RIGHT,ArcMenu.ANIM_MIDDLE_TO_RIGHT,
ArcMenu.ANIM_INTERPOLATOR_ACCELERATE_DECLERATE,ArcMenu.ANIM_INTERPOLATOR_ACCELERATE_DECLERATE);

    final int itemCount = ITEM_DRAWABLES.length;
    for (int i = 0; i < itemCount; i++) {
        ImageView item = new ImageView(getActivity());
        item.setImageResource(ITEM_DRAWABLES[i]);
        final int position = i;
        menu.addItem(item, STR[i], new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //You can access child click in here
            }
        });
    }`

Can I use here vector XML drawable or there must be png with background?

@BrotherV
Copy link
Owner

BrotherV commented May 20, 2017 via email

@karmil32
Copy link
Author

Ok, i resolved problem with "layer-list" and now I can use vector XML drawable with circle backgroud.

Example:
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="oval"> <solid android:color="@color/colorAccent"/> </shape> </item> <item android:drawable="@drawable/refresh_18dp" android:bottom="3dp" android:left="3dp" android:right="3dp" android:top="3dp"/> </layer-list>

@BrotherV
Copy link
Owner

Hello my friend, send me a direct email then I'll send you another instruction which you'll be able to add internal fab as child.
Have nice day.

@karmil32
Copy link
Author

karmil32 commented May 20, 2017 via email

@BrotherV
Copy link
Owner

Hello again, Actually I checked readme.me and I saw there was some instruction for this work but I put this instruction for first part.
Have nice day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants