There are generally two ways of layout in Android, one is XML declaration, the other is program declaration:
Xml:
<?XML version= "1.0" encoding= "Utf-8"?><LinearLayoutXmlns:android= "Http://schemas.android.com/apk/res/android"Android:layout_width= "Fill_parent"Android:layout_height= "Fill_parent"Android:orientation= "Vertical"><ScrollViewAndroid:id= "@+id/scroll"Android:layout_width= "Fill_parent"Android:layout_height= "Fill_parent"><TextViewAndroid:id= "@+id/txt"Android:layout_width= "Wrap_content" android:layout_height< Span style= "margin:0px; padding:0px; Color: #0000ff; Line-height:1.5!important; " >= "Wrap_content" /> Span style= "margin:0px; padding:0px; Color: #0000ff; Line-height:1.5!important; " ></scrollview> </linearlayout>
Manual Code declaration:
TextView txt=New TextView (this); Txt.settext (str); New ScrollView (this); Scrollview.addview (TXT); Setcontentview (ScrollView)
Use of ScrollView in Android