Menu icons doesnt appears propertly
Opened this issue · 7 comments
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
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?
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>
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.
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