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);//need to wrap the width to back ground image resource, not text content, is there any workaround?@Shubhank @Lara