I want to be able to print text on an image in my android app.
Currently, the code below allows the picture and text to be shared separately from each other. Please refer to the picture to see the result. How can I get the text to print on the image?
Please help me out. I would really appreciate.
holder.shareBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
bitmapDrawable = (BitmapDrawable) holder.imageView.getDrawable();// get the from imageview or use your drawable from drawable folder
bitmap1 = bitmapDrawable.getBitmap();
String imgBitmapPath= MediaStore.Images.Media.insertImage(context.getContentResolver(),
bitmap1,"title",null);
Uri imgBitmapUri=Uri.parse(imgBitmapPath);
String shareText=paheliItem.getTitle();
Intent shareIntent=new Intent(Intent.ACTION_SEND);
shareIntent.setType("*/*");
shareIntent.putExtra(Intent.EXTRA_STREAM,imgBitmapUri);
shareIntent.putExtra(Intent.EXTRA_TEXT, shareText);
context.startActivity(Intent.createChooser(shareIntent,"Share Wallpaper using"));
}
});