thuytrinh / android-collage-views Goto Github PK
View Code? Open in Web Editor NEWDraggable, rotatable, and scalable views for Android
Draggable, rotatable, and scalable views for Android
So, first of all thanks for great library! I've added your MultiTouchListener to my ImageView, it works great. The thing is I have to save my image to file. I did it like this:
Bitmap bitmap = Bitmap.createBitmap(imageContainer.getWidth(), imageContainer.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
canvas.drawColor(Color.WHITE);
imageContainer.draw(canvas);
try {
newBitmap.compress(Bitmap.CompressFormat.JPEG, 100, new FileOutputStream(new File("/sdcard/preview.jpg")));
System.out.println("Saved successfully!");
}
catch (Exception e){
e.printStackTrace();
}
It works, but orginal image is much bigger than one I got from rendering "imageContainer" (which contains ImageView) onto canvas.
I tried something like that:
Bitmap newBitmap = Bitmap.createBitmap(image.getWidth(), image.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(newBitmap);
canvas.drawColor(Color.WHITE);
Paint paint = new Paint();
paint.setAntiAlias(true);
canvas.drawBitmap(image, imageView.getMatrix(), paint);
But I'm getting some strange results. Can you maybe help me?
Can anyone share the code to save the final image after all the required modifications?
Could you tell me how to calculate the view's position after translated/Scaled ?
I know view.setTranslationX() and view.setTranslationY() don't change the view's real position( because the view's getLeft() and getTop() are not change), but after being dragged and scaled, How to get the visual position (such as get the distance to parent's left and top)?
could you implement a way to set if the view is allowed to be translated/Scaled beyond the parents boarders.
it would be really nice if you can.
I want drag and drop only in entire layout ,
if my drag view is touch to parent layout edge should be stop.
Hi,
Am using this library code to make collage ,but i don't know how to get selected bottom image on top of
other image.Because the last image always comes under other images.
Thanks
Hi,
How can i add multiple collage-views on different positions by creating single object?
Currently, I have a problem, that after using bringtofront with views, after switching to another fragment and then back, or shutting down the app and then turning it back on, the view bringtofront has been crushed. How to save which view bringtofront before which view?
.
Does this library have a maven repo?
Can I move videos like pictures?
Hi, i want to add some action when on click of image. How can I achieve that?
Thanks in advance.
I add a button in a LinearLayout and set LinearLayout MultiTouchListener.
when I press the button and move, LinearLayout doesnt move
if I press outside the button, it works just fine.
Is there a convenient way to make these button clickable and make the parentView swipe even if the user puts his finger on a button initially?
thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.