01.3 Text and Scrolling Views
01.3 Text and Scrolling Views
Lesson 1
● TextView
● ScrollView
<TextView android:id="@+id/textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/my_story"/>
<TextView
android:id="@+id/article"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="web"
Don’t use HTML
android:text="@string/article_text"/>
for a web link in
free-form text
autoLink values:"web", "email", "phone", "map", "all"
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
.../>
</ScrollView>
Text and This work is licensed under a
Android Developer Fundamentals V2 Scrolling Views
Creative Commons Attribution 4.0 Inter 14
national License
ScrollView layout with a view group
<ScrollView ...
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/article_subheading"
.../>
<TextView
android:id="@+id/article" ... />
</LinearLayout>
</ScrollView>