/** Add a TextView containing the question text. */ private void AddQuestionText(PromptElement p) { TextView tv = new TextView(getContext()); tv.setText(p.getQuestionText()); tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, TEXTSIZE); tv.setTypeface(null, Typeface.BOLD); tv.setPadding(0, 0, 0, 5); // wrap to the widget of view tv.setHorizontallyScrolling(false); mView.addView(tv); }