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

API 16 not visible VectorMasterView, VectorMasterDrawable #10

Open
edgelv34 opened this issue Feb 27, 2018 · 4 comments
Open

API 16 not visible VectorMasterView, VectorMasterDrawable #10

edgelv34 opened this issue Feb 27, 2018 · 4 comments

Comments

@edgelv34
Copy link

edgelv34 commented Feb 27, 2018

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.

@SrikalyanBurra
Copy link

I am facing the same problem. Any Solutions?

@SrikalyanBurra
Copy link

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.

@edgelv34
Copy link
Author

edgelv34 commented Apr 4, 2018

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

@rubenspischedda
Copy link

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?

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

3 participants