Comments (2)
i want it too
from android-collage-views.
@brar07 and @bigtotorouk checkout how I do it below..
public Bitmap getBitmapOfImageViewsTable(View imageViewsParent){
imageViewsParent.setDrawingCacheEnabled(true);
imageViewsParent.buildDrawingCache();
Bitmap b = imageViewsParent.getDrawingCache();
if(b == null){
b = getViewBitmapAlt(imageViewsParent);
}
return getCopyOfBitmap(b); // because android automatically recycles the bitmap after some time
}
//https://stackoverflow.com/a/11937411/1463931
public Bitmap getViewBitmapAlt(View v)
{
Bitmap b = Bitmap.createBitmap(v.getWidth(), v.getHeight(), Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
v.layout(0, 0, v.getLayoutParams().width, v.getLayoutParams().height);
v.draw(c);
return b;
}
public Bitmap getCopyOfBitmap(Bitmap bm){
//then create a copy of bitmap bmp1 into bmp2
return bm.copy(bm.getConfig(), true);
}
from android-collage-views.
Related Issues (13)
- option to prevent views from translating beyond the boarders of parent HOT 4
- How to drag only entire layout HOT 1
- Maven Repo? HOT 1
- Multiple Collage-view
- is possible for videoview?
- Save the view position that has bringToFront other views when closing the app and open again
- How to get the view's position after translation and scale? HOT 3
- Bottom image on top of other images HOT 1
- .
- Button in viewgroup can not move HOT 1
- How to transform original image? HOT 2
- How to enable onclick listener for image HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-collage-views.