I have ImageView and I want to share its image.
Following is my code,
btshare.setOnClickListener(new OnClickListener() {
@Override
Bundle intent = getIntent().getExtras();
cardView = (CardView) findViewById(R.id.card);
final String query = intent.getString("Query1");
db = new DataBaseHelper(Image.this);
Cursor c = db.getData(query);
if (c.getCount() != 0) {
c.moveToFirst();
do {
image = c.getString(5);
title=c.getString(3);
} while (c.moveToNext());
}
txt.setText(title);
img.setImageDrawable(getResources()
.getDrawable(getResources().getIdentifier(image, "drawable", getPackageName())));