Je veux convertir un graphique linéaire que j'ai fait avec AChartEngine lib en bitmap.Comment devrais-je faire? Je n'ai pas trouvé sur le net tout ce qui peut aider. La méthode toBitmap() est-elle adaptée? Si oui, comment l'utiliser?Comment convertir un graphique AChartEngine en bitmap
Mise à jour: Je utilisé cette méthode:
public static Bitmap loadBitmapFromView(View v) {
v.setDrawingCacheEnabled(true);
v.layout(0,0,800,600);
v.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);
v.buildDrawingCache();
v.getDrawingCache();
Bitmap bmp = Bitmap.createBitmap(800,600, Bitmap.Config.ARGB_8888);
v.setDrawingCacheEnabled(false);
return bmp; }
et enregistré le résultat dans un fichier .png, mais tout ce que je suis est un fichier vide!
je viens d'essayer cela, il renvoie null trop – user2137817