i am trying to add a Text-view in a Scroll-view and then adding this scroll view to Relative-layout programmatically but its just showing empty view even adding only text-view to Relative-layout its working.
TextView aboutTextView = new TextView(this);
aboutTextView.setText(R.string.aboutText);
aboutTextView.setId(5);
aboutTextView.setLayoutParams(new LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
ScrollView scroll = new ScrollView(this);
scroll.setPadding(R.dimen.scroll_padding, R.dimen.scroll_padding,
R.dimen.scroll_padding, R.dimen.scroll_padding);
scroll.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.FILL_PARENT));
scroll.addView(aboutTextView);
RelativeLayout fragmentContainer = (RelativeLayout) findViewById(R.id.fragmentContainer);
fragmentContainer.addView(scroll);