VectorMaster icon indicating copy to clipboard operation
VectorMaster copied to clipboard

API 16 not visible VectorMasterView, VectorMasterDrawable

Open edgelv34 opened this issue 8 years ago • 4 comments

hello. your VectorMaster is very good. but It is not visible in API 16.

first of all, Successfully registered VectorMasterView on XML. Then, animation was made in Java source using PathModel.

However, when the app was running, no images were visible.

So i registered ImageView to the XML and did setImageDrawable to ImageView as VectorMasterDrawable from java source.

but not visible too.

Let me show you my XML and Java source parts.

[xml]

<ImageView
            android:id="@+id/header_menu"
            android:layout_width="30dp"
            android:layout_height="24dp"
            android:layout_centerVertical="true"/>

[java]

headerMenuView = (ImageView) activity.findViewById(R.id.header_menu);
headerMenuVMView = new VectorMasterDrawable(mContext, R.drawable.ic_menu);
headerMenuView.setImageDrawable(headerMenuVMView);

VectorMasterDrawable menuView = headerMenuVMView;
final GroupModel menuGroupModel = menuView.getGroupModelByName("menu_group");
final PathModel menuPathModel1 = menuView.getPathModelByName("menu1");

menuGroupModel.setRotation(MathUtil.lerp(0, (float) 360, offset));
menuPathModel1.setTrimPathEnd(1 - offset);

why not show image?


You can check VectorMaster Demos when operating the API 16.

edgelv34 avatar Feb 27 '18 06:02 edgelv34

I am facing the same problem. Any Solutions?

SrikalyanBurra avatar Mar 14 '18 15:03 SrikalyanBurra

Actually the issue was that android:layout_width and layout_height cannot have wrap_content as arguments. At least that was the issue for me in this case. After I declared specific values it worked.

SrikalyanBurra avatar Mar 14 '18 15:03 SrikalyanBurra

uhm.. maybe ... I think it is available from version 17.

edgelv34 avatar Apr 04 '18 04:04 edgelv34

I have the same problem. But giving a fixed size or match_parent to the VectorMasterView did not solve it. I've tried to give a background to the View, and I can see it. It means that the view is there at runtime, but the vector is not drawn. Is there any workaround?

rubenspischedda avatar Jul 19 '18 15:07 rubenspischedda