Task 1 Add several text views
1. Buat project baru dengan ketentuan berikut
Attribute | Value |
Application Name | Scrolling Text |
Company Name | android.example.com (or your own domain) |
Phone and Tablet Minimum SDK | API15: Android 4.0.3 IceCreamSandwich |
Template | Empty Activity |
Generate Layout File checkbox | Checked |
2. expand App > res > layout, buka activity_main.xml
3.
TextView #1 attribute | Value |
android:id | “@+id/article_heading” |
layout_width | “match_parent” |
layout_height | “wrap_content” |
android:background | “@color/colorPrimary” |
android:textColor | “@android:color/white” |
android:padding | “10dp” |
android:textAppearance | “@android:style/TextAppearance.Large” |
android:textStyle | “bold” |
android:text | “Article Title” |
4.
TextView #2 Attribute | Value |
android:id | “@+id/article_subheading” |
layout_width | “match_parent” |
layout_height | “wrap_content” |
android:layout_below | “@id/article_heading” |
android:padding | “@dimen/padding_regular” |
android:textAppearance | “@android:style/TextAppearance” |
android:text | “Article Subtitle” |
5.
TextView Attribute | Value |
android:id | “@+id/article” |
android:lineSpacingExtra | “5sp” |
android:layout_below | “@id/article_subheading” |
android:text | Change to “Article text” |
6. App > res > values, buka strings.xml
Task 2 Add active web links and a ScrollView
1. menambahkan autoLink attribute
Leave a Reply