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

Add functionality to dynamically add groups, paths etc. to the Vector #3

Open
ViewMikeZhou opened this issue Jul 18, 2017 · 11 comments

Comments

@ViewMikeZhou
Copy link

i do this but no work ;
setPathData(M M806.004057 333.205894 364.566136 333.2.271448-167...)
update();
how can i do it?

@harjot-oberai
Copy link
Owner

harjot-oberai commented Jul 18, 2017

setPathData() function currently doesn't do anything. It will be really expensive to build whole path data again and perform the scaling.
Instead of changing path data , just create a new vector resource file and use it. Use two VectorMasterDrawable and set the different source vectors for each of them. Then just use these two drawables anywhere you want to use.

@ViewMikeZhou
Copy link
Author

Thank you for your answer.But I have a demand,I get the .svg from the server, but I can not manipulate it, so I want to get it on his path settings, but I can not find a way to set the vector dynamically.

@ViewMikeZhou
Copy link
Author

oh ! i did it like this;
leftPath.setPathData("M806.004057 333.20589..)
leftPath.buildPath(true);
left.update(); -->need buildpath(true) it work
but why when i do like this it not work anymore
public void onClick(View v){
leftPath.setPathData("M806.004057 333.20589..)
leftPath.buildPath(true);
left.update();
}

@ViewMikeZhou
Copy link
Author

if pathdata too long it also not work,I need to dynamically add group, path, pathDate ,plesase help me
thank you

@harjot-oberai harjot-oberai changed the title hello Add functionality to dynamically add groups, paths etc. to the Vector Jul 19, 2017
@harjot-oberai
Copy link
Owner

@ViewMikeZhou : I will add the functionality to dynamically add groups,paths etc. in some time.

@ViewMikeZhou
Copy link
Author

Very much looking forward,thank you

@SubhaSarkar
Copy link

Hey bro is now setpathdata working???

@harjot-oberai
Copy link
Owner

Not yet, never got around to add the functionality. I currently don't have time to work on this issue.

Sorry

@SubhaSarkar
Copy link

ok bro , no problem....By the way what do u do?

@harjot-oberai
Copy link
Owner

@SubhaSarkar I am a 4th Year CSE Student at IIT Roorkee. I work on these projects in my free time. If you have any queries feel free to reach me at my email id.

@SubhaSarkar
Copy link

WOW

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

No branches or pull requests

3 participants