Code example for ScrollView

Methods: addView, setLayoutParams, setVerticalScrollBarEnabled

0
    	subtitleBar.setVisibility(View.GONE);
        layout.addView(subtitleBar, new LinearLayout.LayoutParams(FPAR, WCON));
 
        // Create a ScrollView to put the text in.  Shouldn't be necessary, 
        // but...? 
    	ScrollView tscroll = new ScrollView(parentApp);
    	tscroll.setVerticalScrollBarEnabled(true);
    	tscroll.setLayoutParams(new LinearLayout.LayoutParams(WCON, WCON, 1));
    	layout.addView(tscroll);
 
    	// Now create the text view and add it to the scroller.  Note: when 
        // we use Linkify, it's necessary to call setTextColor() to 
        // avoid all the text blacking out on click. 
        textView = new TextView(parentApp);
    	textView.setTextSize(16);
    	textView.setTextColor(0xffffffff);
    	textView.setAutoLinkMask(Linkify.WEB_URLS);
    	textView.setLayoutParams(new LinearLayout.LayoutParams(FPAR, FPAR));
    	tscroll.addView(textView);
 
        // Add a layout to hold the buttons. 
    	buttonHolder = new LinearLayout(parentApp);
    	buttonHolder.setBackgroundColor(0xf08080);
    	buttonHolder.setOrientation(LinearLayout.HORIZONTAL);