Skip to content

Instantly share code, notes, and snippets.

View hafs-r's full-sized avatar
🏠
Working from home

Hafs hafs-r

🏠
Working from home
View GitHub Profile
TextView tvd = new TextView(this);
tvd.setBackgroundResource(R.drawable.annotation_discover);
tvd.setText(getString(R.string.ANNOTATION_DISCOVER_MESSAGE));
tvd.setGravity(Gravity.CENTER_VERTICAL);
tvd.setTextColor(Color.WHITE);
targetedShareIntent.setType("application/twitter");
//I tried this too, targetedShareIntent.setType("image/*");
targetedShareIntent.putExtra(Intent.EXTRA_SUBJECT, getResources().getString(R.string.app_name));
targetedShareIntent.putExtra(Intent.EXTRA_STREAM, dataUri);
targetedShareIntent.putExtra(Intent.EXTRA_TEXT, shareTwitter);