PREP - Concurrency

Introduction – Threads and Runnables

MainActivity1

import java.util.Date;
public class MainActivityextends AppCompatActivity {
Object fence ;
// String [] dishes;
TextViewtxtMsg;
Button btnGetDate;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
txtMsg= (TextView) findViewById(R.id.txtMsg);
btnGetDate= (Button) findViewById(R.id.btnGetDate);
btnGetDate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
txtMsg.setText("" + (new Date().toString()));
}
});
fence = new Object();
// dishes = getResources().getStringArray(R.array.dishes);
// txtMsg.setText(Html.fromHtml(dishes[1]));
Runnable myRunnable1 = new MyRunnableClass();
Thread t1 = new Thread(myRunnable1);
t1.start();
MyThread t2 = new MyThread("t2");
t2.start();
MyThread t3 = new MyThread("t3");
t3.start();
}//onCreate
// ------
public class MyRunnableClassimplements Runnable {
@Override
public void run() {
try {
for (inti = 100; i105; i++){
Thread.sleep(2000);
synchronized (fence){
//area protected by exclusive lock
//change critical resources here...
String recipe = txtMsg.getText().toString();
Log.e("t1:<runnable>", "" + recipe);
//txtMsg.setText("You kill my father, prepare to die!");
}//end of protected area
Log.e("t1:<runnable>", "runnable talking: " + i);
}
} catch (InterruptedException e) {
Log.e("t1:<runnable>", e.getMessage() );
}
}//run
}//class
public class MyThreadextends Thread{
final intN = 5; //try N= 60; stop app, see back threads still working
String threadName;
// Random randomMillis;
// intsleepTime;
public MyThread() {threadName= "t";}
public MyThread(String threadName) {this.threadName= threadName;}
@Override
public void run() {
super.run();
//randomMillis = new Random();
try {
for(inti=0; iN; i++){
//sleepTime = 1000 * (1 + randomMillis.nextInt(3));
//Thread.sleep(sleepTime);
Thread.sleep(1000);
Log.e(threadName+ ":[thread]>", "Thread talking: " + i);
}
} catch (InterruptedException e) {
Log.e(threadName+ ":[thread]>", e.getMessage() );
}
}//run
}//MyThread
}

LOGCAT – Showing Log.e

Resource – Strings

resources
<string name="app_name">PREP-Concurrency</string
<string-array name="dishes"
<item<![CDATA[ This "is" <b>bold</b> ]]</item
<item> <![CDATA[
<body>
<div class="recipeIngredients primary" style="margin: 0px 10px 0px 90px; padding: 0px; border: 0px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-numeric: inherit; font-weight: normal; font-stretch: inherit; font-size: 15px; line-height: inherit; font-family: &quot;MuseoSlab&quot;, Times, serif; vertical-align: top; -webkit-box-ordinal-group: 6; order: 5; display: block; white-space: normal; width: calc(100% - 500px); float: left; clear: left; color: rgb(51, 51, 51); letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">
<div id="gmi_rp_recipeIngredients_div" class="recipePartIngredients" style="margin: 0px 0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
<h4 id="gmi_rp_recipeIngredients_header" style="margin: 0px 0px 20px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 1.375rem; line-height: 1.625rem; font-family: &quot;MuseoSlab&quot;, Times, serif; vertical-align: baseline; color: rgb(219, 0, 56);">
Ingredients</h4>
<div class="recipePartIngredientGroup" style="margin: 0px 0px 30px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
<h2 style="margin: 0px 0px 20px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 1.125rem; line-height: 1.375rem; font-family: &quot;MuseoSlab&quot;, Times, serif; vertical-align: baseline; color: rgb(219, 0, 56);">
Meatloaf</h2>
<div id="gmi_rp_recipeIngredients_parts_1" class="recipePartIngredient" data-base-ingredient="Lean Ground Beef" data-category="Meat (Fresh)" itemprop="ingredients" style="margin: 0px 0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; display: flex;">
<div class="quantity" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 55px; text-align: right; color: rgb(219, 0, 56); white-space: nowrap; letter-spacing: 1.5px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
1</span</div>
<div class="description" style="margin: 0px 0px0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 639.734px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
<span class="type" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
</span>lb lean (at least 80%) ground beef</span</div>
</div>
<div id="gmi_rp_recipeIngredients_parts_2" class="recipePartIngredient" data-base-ingredient="Onion" data-category="Vegetables (Produce)" itemprop="ingredients" style="margin: 0px 0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; display: flex;">
<div class="quantity" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 55px; text-align: right; color: rgb(219, 0, 56); white-space: nowrap; letter-spacing: 1.5px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
1/4</span</div>
<div class="description" style="margin: 0px 0px0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 639.734px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
<span class="type" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
</span>cup finely chopped onion<span&nbsp;</span</span>
</div>
<div id="gmi_rp_recipeIngredients_parts_3" class="recipePartIngredient" data-base-ingredient="Eggs" data-category="Dairy" itemprop="ingredients" style="margin: 0px 0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; display: flex;">
<div class="quantity" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 55px; text-align: right; color: rgb(219, 0, 56); white-space: nowrap; letter-spacing: 1.5px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
2</span</div>
<div class="description" style="margin: 0px 0px0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 639.734px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
<span class="type" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
</span>eggs, beaten<span&nbsp;</span</span>
</div>
<div id="gmi_rp_recipeIngredients_parts_4" class="recipePartIngredient" data-base-ingredient="Progresso Italian Style Bread Crumbs" data-brand="Progresso Breadcrumbs" data-category="Baking Goods" data-flavor-format="REGULAR BREADCRUMBS" itemprop="ingredients" style="margin: 0px 0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; display: flex;">
<div class="quantity" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 55px; text-align: right; color: rgb(219, 0, 56); white-space: nowrap; letter-spacing: 1.5px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
1</span</div>
<div class="description" style="margin: 0px 0px0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 639.734px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
<span class="type" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
</span>cup Progresso™ plain bread crumbs<span&nbsp;</span</span>
</div>
<div id="gmi_rp_recipeIngredients_parts_5" class="recipePartIngredient" itemprop="ingredients" style="margin: 0px 0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; display: flex;">
<div class="quantity" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 55px; text-align: right; color: rgb(219, 0, 56); white-space: nowrap; letter-spacing: 1.5px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
1</span</div>
<div class="description" style="margin: 0px 0px0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 639.734px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
<span class="type" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
</span>teaspoon Italian seasoning</span</div>
</div>
<div id="gmi_rp_recipeIngredients_parts_6" class="recipePartIngredient" data-base-ingredient="Ketchup" data-category="Condiments / Oils" itemprop="ingredients" style="margin: 0px 0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; display: flex;">
<div class="quantity" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 55px; text-align: right; color: rgb(219, 0, 56); white-space: nowrap; letter-spacing: 1.5px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
1/2</span</div>
<div class="description" style="margin: 0px 0px0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 639.734px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
<span class="type" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
</span>cup ketchup</span</div>
</div>
<div id="gmi_rp_recipeIngredients_parts_7" class="recipePartIngredient" data-base-ingredient="Milk" data-category="Dairy" itemprop="ingredients" style="margin: 0px 0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; display: flex;">
<div class="quantity" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 55px; text-align: right; color: rgb(219, 0, 56); white-space: nowrap; letter-spacing: 1.5px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
1/2</span</div>
<div class="description" style="margin: 0px 0px0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 639.734px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
<span class="type" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
</span>cup milk<span&nbsp;</span</span>
</div>
</div>
<div class="recipePartIngredientGroup" style="margin: 0px 0px 30px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
<h2 style="margin: 0px 0px 20px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 1.125rem; line-height: 1.375rem; font-family: &quot;MuseoSlab&quot;, Times, serif; vertical-align: baseline; color: rgb(219, 0, 56);">
Topping</h2>
<div id="gmi_rp_recipeIngredients_parts_8" class="recipePartIngredient" data-base-ingredient="Ketchup" data-category="Condiments / Oils" itemprop="ingredients" style="margin: 0px 0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; display: flex;">
<div class="quantity" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 55px; text-align: right; color: rgb(219, 0, 56); white-space: nowrap; letter-spacing: 1.5px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
1/4</span</div>
<div class="description" style="margin: 0px 0px0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 639.734px;">
<span style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
<span class="type" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
</span>cup ketchup</span</div>
</div>
<div class="power-div" data-js="chicory-button" data-position="within" style="margin-top: 9px !important; margin-right: 0px; margin-bottom: 18px !important; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; display: inline-block !important; position: relative !important;">
</div>
</div>
</div>
</div>
<div class="recipeSteps primary" style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px 10px 0px 90px; padding: 0px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-numeric: inherit; font-weight: normal; font-stretch: inherit; font-size: 15px; line-height: inherit; font-family: &quot;MuseoSlab&quot;, Times, serif; vertical-align: top; -webkit-box-ordinal-group: 7; order: 6; position: relative; display: block; white-space: normal; width: 1292px; float: left; clear: left; color: rgb(51, 51, 51); letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; left: -74px; top: 0px;">
<div id="gmi_rp_recipeSteps_div" class="recipePartSteps" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
<h4 id="gmi_rp_recipeSteps_header" style="margin: 0px 0px 20px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 1.375rem; line-height: 1.625rem; font-family: &quot;MuseoSlab&quot;, Times, serif; vertical-align: baseline; color: rgb(219, 0, 56); display: inline-block;">
Steps</h4>
<ul class="recipePartStepsList" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; list-style: none; clear: both;">
<li id="gmi_rp_recipeSteps_step_1" class="recipePartStep" itemprop="recipeInstructions" style="margin: 0px 0px 20px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; white-space: nowrap;">
<div class="recipeStepText" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; display: flex;">
<div class="recipePartStepHeading" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: top; display: inline-block; text-align: right; color: rgb(219, 0, 56);">
1</div>
<div class="recipePartStepDescription" style="margin: 0px 0px0px 15px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: top; white-space: normal; display: inline-block; width: calc(100% - 15px);">
Heat oven to 350°F. In large bowl, mix Meatloaf ingredients
well. Press mixture in ungreased 8x4-inch loaf pan. Bake 40
minutes.</div>
</div>
</li>
<li id="gmi_rp_recipeSteps_step_2" class="recipePartStep" itemprop="recipeInstructions" style="margin: 0px 0px 20px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; white-space: nowrap;">
<div class="recipeStepText" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; display: flex;">
<div class="recipePartStepHeading" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: top; display: inline-block; text-align: right; color: rgb(219, 0, 56);">
2</div>
<div class="recipePartStepDescription" style="margin: 0px 0px0px 15px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: top; white-space: normal; display: inline-block; width: calc(100% - 15px);">
Remove from oven. Spread 1/4 cup ketchup evenly over top.
Bake an additional 15 to 20 minutes or until meat
thermometer inserted in center of loaf reads 160°F. Let
stand 10 minutes before serving.</div>
</div>
</li>
</ul
</div>
</div>
</body>
]]> </item
<item>Recipe3</item
</string-array
</resources