SlideShare una empresa de Scribd logo
1 de 13
Android App Basics
l

A First Example: Advent Devotions
l

UML Class Diagram
Two Activities in Advent
Devotions displays a single
AdventDevos displays the
Devo
l

l

l

calendar of dates

devotion

• Intent myIntent = new Intent(AdventDevos.this, Devo.class);
• myIntent.putExtra("ButtonNum", "" + index);
• startActivity(myIntent);
l

l

Two Activities in Advent
Devotions

AdventDevos displays the
calendar of dates

l

Devo displays a single
devotion

• Bundle extras = getIntent().getExtras();
• String value = extras.getString("ButtonNum");
• Integer buttonNum = Integer.valueOf(value);
l

l

Launching an Intent you didn’t
write

Devos has button to
URL

l

Browser launched

Intent i = new Intent(Intent.ACTION_VIEW,
•
Uri.parse("http://www.biblegateway.com/passage/?search="+
•
passage +"&version=NIV"));
• startActivity(i);
l
l

l

Android Activity

“An activity is a single, focused thing that the user can do.
Almost all activities interact with the user, so the Activity
class takes care of creating a window for you in which you
can place your UI with setContentView(View).”

• http://developer.android.com/reference/android/app/
• Activity.html#ActivityLifecycle
l

AndroidManifest.xml

•
• <?xml version="1.0" encoding="utf-8"?> Each upload to Market requires versionCode increment
• <manifest xmlns:android="http://schemas.android.com/apk/res/android"
•
package="com.simexusa.adventdevotions"
•
android:versionCode="2"
• Specifies icon for launching app
•
android:versionName="1.0">
•
<application android:icon="@drawable/star" android:label="@string/app_name" android:debu
•
<activity android:name=".AdventDevos"
•
android:label="@string/app_name">
• Specifies icon for launching app
•
<intent-filter>
•
<action android:name="android.intent.action.MAIN" />
•
<category android:name="android.intent.category.LAUNCHER" />
•
</intent-filter>
•
</activity>
•
<activity android:name=".Devo"/>
•
</application>
• Specifies activity to be launched at startup
•
<uses-sdk android:minSdkVersion="3" />
•
<uses-permission android:name="android.permission.INTERNET" />
• </manifest>
• Security permissions requested from user on install
l

Look around the files
l

l

Layouts and Resources

See main.xml and devo.xml
l Activity associates with layout xml file using
setContentView(R.layout.main); or
setContentView(R.layout.devo); in onCreate()
l Note TableLayout and TableRow similar to <table>
and <tr> in html
l Note use of dimen (see values/dimens.xml) and color
(see values/colors.xml)
l Also see strings.xml
l

l

l

l

l

l

l

l

l

l

l

l

l

l

l

l

l

l

l

l

l

main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@color/background">
<TableLayout android:layout_width="wrap_content"
android:id="@+id/TableLayout01" android:layout_height="wrap_content">
<TableRow android:paddingTop="8px">
<Button android:text="Nov. 29" android:id="@+id/Button01"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="@dimen/button_width"></Button>
<Button android:text="Nov. 30" android:id="@+id/Button02"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="@dimen/button_width"></Button>
<Button android:text="Dec. 1" android:id="@+id/Button03"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="@dimen/button_width"></Button>
<Button android:text="Dec. 2" android:id="@+id/Button04"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="@dimen/button_width"></Button>
</TableRow> …
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l

devo.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:gravity="center_horizontal"
android:background="@color/background">
<TextView android:text="Date" android:id="@+id/Date"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="center_horizontal" android:textStyle="italic"
android:textSize="@dimen/reference_width" android:typeface="serif"
android:textColor="@color/text"></TextView>
<TextView android:text="Title" android:id="@+id/Title"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="center_horizontal" android:textStyle="bold"
android:textSize="@dimen/reference_width" android:typeface="serif"
android:textColor="@color/text"></TextView>
<Button android:text="Read Scripture" android:id="@+id/ButtonScripture"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="center_horizontal" android:textSize="@dimen/reference_width"></Button>
<ScrollView android:id="@+id/ScrollView01"
android:layout_height="fill_parent" android:layout_width="fill_parent">
<TextView android:text="Body" android:id="@+id/Body"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="left" android:textSize="@dimen/reference_width"
android:typeface="serif" android:textColor="@color/text"></TextView>
l

dimens.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="button_width">17sp</dimen>
<dimen name="reference_width">20sp</dimen>
</resources>

l
l
l
l
l

• colors.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="background">#AAFFFF99</color>
<color name="text">#FF000000</color>
</resources>

l
l
l
l
l

• strings.xml

l
l
l
l
l

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, AdventDevos!</string>
<string name="app_name">Advent Devotions</string>
</resources>

Más contenido relacionado

La actualidad más candente

Android activity
Android activityAndroid activity
Android activity
Krazy Koder
 
Android App Development 07 : Intent &amp; Share
Android App Development 07 : Intent &amp; ShareAndroid App Development 07 : Intent &amp; Share
Android App Development 07 : Intent &amp; Share
Anuchit Chalothorn
 
Day 4: Activity lifecycle
Day 4: Activity lifecycleDay 4: Activity lifecycle
Day 4: Activity lifecycle
Ahsanul Karim
 
Android intents, notification and broadcast recievers
Android intents, notification and broadcast recieversAndroid intents, notification and broadcast recievers
Android intents, notification and broadcast recievers
Utkarsh Mankad
 

La actualidad más candente (18)

Lecture8 oopj
Lecture8 oopjLecture8 oopj
Lecture8 oopj
 
Events and Listeners in Android
Events and Listeners in AndroidEvents and Listeners in Android
Events and Listeners in Android
 
Presentation on Android application life cycle and saved instancestate
Presentation on Android application life cycle and saved instancestatePresentation on Android application life cycle and saved instancestate
Presentation on Android application life cycle and saved instancestate
 
Android Basic Components
Android Basic ComponentsAndroid Basic Components
Android Basic Components
 
Ppt 2 android_basics
Ppt 2 android_basicsPpt 2 android_basics
Ppt 2 android_basics
 
Android development session 2 - intent and activity
Android development   session 2 - intent and activityAndroid development   session 2 - intent and activity
Android development session 2 - intent and activity
 
Android Components & Manifest
Android Components & ManifestAndroid Components & Manifest
Android Components & Manifest
 
Android UI Fundamentals part 1
Android UI Fundamentals part 1Android UI Fundamentals part 1
Android UI Fundamentals part 1
 
Android activity
Android activityAndroid activity
Android activity
 
Android App Development 07 : Intent &amp; Share
Android App Development 07 : Intent &amp; ShareAndroid App Development 07 : Intent &amp; Share
Android App Development 07 : Intent &amp; Share
 
Android Bootcamp Tanzania: android manifest
Android Bootcamp Tanzania: android manifestAndroid Bootcamp Tanzania: android manifest
Android Bootcamp Tanzania: android manifest
 
Android training day 2
Android training day 2Android training day 2
Android training day 2
 
Using intents in android
Using intents in androidUsing intents in android
Using intents in android
 
Day 4: Activity lifecycle
Day 4: Activity lifecycleDay 4: Activity lifecycle
Day 4: Activity lifecycle
 
Open social
Open socialOpen social
Open social
 
Android intents, notification and broadcast recievers
Android intents, notification and broadcast recieversAndroid intents, notification and broadcast recievers
Android intents, notification and broadcast recievers
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
 
Chapt 04 user interaction
Chapt 04 user interactionChapt 04 user interaction
Chapt 04 user interaction
 

Destacado

Destacado (8)

Guide me Android APP to Student enrolling Subjects
Guide me Android APP to Student enrolling SubjectsGuide me Android APP to Student enrolling Subjects
Guide me Android APP to Student enrolling Subjects
 
Android Camera Architecture
Android Camera ArchitectureAndroid Camera Architecture
Android Camera Architecture
 
BoscoChat(A Free Wi-Fi Chat Room in Android)
BoscoChat(A Free Wi-Fi Chat Room in Android)BoscoChat(A Free Wi-Fi Chat Room in Android)
BoscoChat(A Free Wi-Fi Chat Room in Android)
 
Android ppt with example of budget manager
Android ppt with example of budget managerAndroid ppt with example of budget manager
Android ppt with example of budget manager
 
Location Tracking of Android Device Based on SMS.
Location Tracking of Android Device Based on SMS.Location Tracking of Android Device Based on SMS.
Location Tracking of Android Device Based on SMS.
 
Android Project Presentation
Android Project PresentationAndroid Project Presentation
Android Project Presentation
 
Bus tracking application in Android
Bus tracking application in AndroidBus tracking application in Android
Bus tracking application in Android
 
Android College Application Project Report
Android College Application Project ReportAndroid College Application Project Report
Android College Application Project Report
 

Similar a App basic

11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
MugiiiReee
 
Android application development
Android application developmentAndroid application development
Android application development
slidesuren
 
Quick Intro to Android Development
Quick Intro to Android DevelopmentQuick Intro to Android Development
Quick Intro to Android Development
Jussi Pohjolainen
 
Android activity
Android activityAndroid activity
Android activity
Krazy Koder
 
Unit 5 Activity and Activity Life Cycle.pptx
Unit 5 Activity and Activity Life Cycle.pptxUnit 5 Activity and Activity Life Cycle.pptx
Unit 5 Activity and Activity Life Cycle.pptx
ShantanuDharekar
 
Static Reference Analysis for GUI Objects in Android Software
Static Reference Analysis for GUI Objects in Android SoftwareStatic Reference Analysis for GUI Objects in Android Software
Static Reference Analysis for GUI Objects in Android Software
Dacong (Tony) Yan
 

Similar a App basic (20)

Data Transfer between activities and Database
Data Transfer between activities and Database Data Transfer between activities and Database
Data Transfer between activities and Database
 
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
 
Android lifecycle
Android lifecycleAndroid lifecycle
Android lifecycle
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & Databases
 
B2. activity and intent
B2. activity and intentB2. activity and intent
B2. activity and intent
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_program
 
Android application development
Android application developmentAndroid application development
Android application development
 
Quick Intro to Android Development
Quick Intro to Android DevelopmentQuick Intro to Android Development
Quick Intro to Android Development
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart Jfokus
 
Android L01 - Warm Up
Android L01 - Warm UpAndroid L01 - Warm Up
Android L01 - Warm Up
 
Android activity
Android activityAndroid activity
Android activity
 
Advance Android application development workshop day 3
Advance Android application development workshop day 3Advance Android application development workshop day 3
Advance Android application development workshop day 3
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivities
 
Lecture exercise on activities
Lecture exercise on activitiesLecture exercise on activities
Lecture exercise on activities
 
Unit 5 Activity and Activity Life Cycle.pptx
Unit 5 Activity and Activity Life Cycle.pptxUnit 5 Activity and Activity Life Cycle.pptx
Unit 5 Activity and Activity Life Cycle.pptx
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
 
MD-IV-CH-ppt.ppt
MD-IV-CH-ppt.pptMD-IV-CH-ppt.ppt
MD-IV-CH-ppt.ppt
 
Activity & Shared Preference
Activity & Shared PreferenceActivity & Shared Preference
Activity & Shared Preference
 
Static Reference Analysis for GUI Objects in Android Software
Static Reference Analysis for GUI Objects in Android SoftwareStatic Reference Analysis for GUI Objects in Android Software
Static Reference Analysis for GUI Objects in Android Software
 

Más de Training Guide (8)

Map
MapMap
Map
 
Persistences
PersistencesPersistences
Persistences
 
Theads services
Theads servicesTheads services
Theads services
 
Application lifecycle
Application lifecycleApplication lifecycle
Application lifecycle
 
Deployment
DeploymentDeployment
Deployment
 
Getting started
Getting startedGetting started
Getting started
 
Intents broadcastreceivers
Intents broadcastreceiversIntents broadcastreceivers
Intents broadcastreceivers
 
Tdd
TddTdd
Tdd
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

App basic

  • 2. l A First Example: Advent Devotions
  • 4. Two Activities in Advent Devotions displays a single AdventDevos displays the Devo l l l calendar of dates devotion • Intent myIntent = new Intent(AdventDevos.this, Devo.class); • myIntent.putExtra("ButtonNum", "" + index); • startActivity(myIntent);
  • 5. l l Two Activities in Advent Devotions AdventDevos displays the calendar of dates l Devo displays a single devotion • Bundle extras = getIntent().getExtras(); • String value = extras.getString("ButtonNum"); • Integer buttonNum = Integer.valueOf(value);
  • 6. l l Launching an Intent you didn’t write Devos has button to URL l Browser launched Intent i = new Intent(Intent.ACTION_VIEW, • Uri.parse("http://www.biblegateway.com/passage/?search="+ • passage +"&version=NIV")); • startActivity(i); l
  • 7. l l Android Activity “An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View).” • http://developer.android.com/reference/android/app/ • Activity.html#ActivityLifecycle
  • 8. l AndroidManifest.xml • • <?xml version="1.0" encoding="utf-8"?> Each upload to Market requires versionCode increment • <manifest xmlns:android="http://schemas.android.com/apk/res/android" • package="com.simexusa.adventdevotions" • android:versionCode="2" • Specifies icon for launching app • android:versionName="1.0"> • <application android:icon="@drawable/star" android:label="@string/app_name" android:debu • <activity android:name=".AdventDevos" • android:label="@string/app_name"> • Specifies icon for launching app • <intent-filter> • <action android:name="android.intent.action.MAIN" /> • <category android:name="android.intent.category.LAUNCHER" /> • </intent-filter> • </activity> • <activity android:name=".Devo"/> • </application> • Specifies activity to be launched at startup • <uses-sdk android:minSdkVersion="3" /> • <uses-permission android:name="android.permission.INTERNET" /> • </manifest> • Security permissions requested from user on install
  • 10. l l Layouts and Resources See main.xml and devo.xml l Activity associates with layout xml file using setContentView(R.layout.main); or setContentView(R.layout.devo); in onCreate() l Note TableLayout and TableRow similar to <table> and <tr> in html l Note use of dimen (see values/dimens.xml) and color (see values/colors.xml) l Also see strings.xml
  • 11. l l l l l l l l l l l l l l l l l l l l l main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/background"> <TableLayout android:layout_width="wrap_content" android:id="@+id/TableLayout01" android:layout_height="wrap_content"> <TableRow android:paddingTop="8px"> <Button android:text="Nov. 29" android:id="@+id/Button01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="@dimen/button_width"></Button> <Button android:text="Nov. 30" android:id="@+id/Button02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="@dimen/button_width"></Button> <Button android:text="Dec. 1" android:id="@+id/Button03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="@dimen/button_width"></Button> <Button android:text="Dec. 2" android:id="@+id/Button04" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="@dimen/button_width"></Button> </TableRow> …
  • 12. l l l l l l l l l l l l l l l l l l l l l l l l l devo.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_horizontal" android:background="@color/background"> <TextView android:text="Date" android:id="@+id/Date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal" android:textStyle="italic" android:textSize="@dimen/reference_width" android:typeface="serif" android:textColor="@color/text"></TextView> <TextView android:text="Title" android:id="@+id/Title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal" android:textStyle="bold" android:textSize="@dimen/reference_width" android:typeface="serif" android:textColor="@color/text"></TextView> <Button android:text="Read Scripture" android:id="@+id/ButtonScripture" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal" android:textSize="@dimen/reference_width"></Button> <ScrollView android:id="@+id/ScrollView01" android:layout_height="fill_parent" android:layout_width="fill_parent"> <TextView android:text="Body" android:id="@+id/Body" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="left" android:textSize="@dimen/reference_width" android:typeface="serif" android:textColor="@color/text"></TextView>
  • 13. l dimens.xml <?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="button_width">17sp</dimen> <dimen name="reference_width">20sp</dimen> </resources> l l l l l • colors.xml <?xml version="1.0" encoding="utf-8"?> <resources> <color name="background">#AAFFFF99</color> <color name="text">#FF000000</color> </resources> l l l l l • strings.xml l l l l l <?xml version="1.0" encoding="utf-8"?> <resources> <string name="hello">Hello World, AdventDevos!</string> <string name="app_name">Advent Devotions</string> </resources>