<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6360515232972921654</id><updated>2024-11-14T03:50:10.005+05:30</updated><category term="Android"/><category term="Java"/><category term="Custom"/><category term="Customized"/><category term="Windows Phone 7"/><category term="ANDROID_ID"/><category term="Alert"/><category term="AsyncTask"/><category term="Blend 4"/><category term="Conversion"/><category term="Conversion to Dalvik format failed with error 1"/><category term="Custom Dialog Box"/><category term="Delvik"/><category term="Density"/><category term="Design Guideline"/><category term="Device ID"/><category term="Device Unique Identifier"/><category term="Dialog"/><category term="Eclipse"/><category term="Expression Blend"/><category term="LargeScreen"/><category term="ListView"/><category term="ListView Section"/><category term="ListView with Separator"/><category term="PHP"/><category term="Result"/><category term="Screen Size"/><category term="Segments"/><category term="Separator"/><category term="Smartphone"/><category term="TelephonyManager"/><category term="UDID"/><category term="Unique Identifier"/><category term="UserControl"/><category term="Widget"/><category term="Windows Mango"/><category term="XLarge Screen."/><category term="error"/><category term="failed"/><category term="getDeviceID()"/><category term="iPhone Like AlertView"/><category term="iPhone Like Section ListView"/><category term="mistake"/><category term="win"/><category term="wp7 Custom Control"/><title type='text'>SmartPhone by Sachin Shelke ™</title><subtitle type='html'>Delivering What You Demand....</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-4012581856569775837</id><published>2012-11-01T12:19:00.004+05:30</published><updated>2012-11-01T12:23:30.707+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="AsyncTask"/><category scheme="http://www.blogger.com/atom/ns#" term="Customized"/><category scheme="http://www.blogger.com/atom/ns#" term="Result"/><title type='text'>How to Return value from Async task in android</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hi,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;After bit R&amp;amp;D, reach on some fatastic solution to get return data from Custom AsyncTask in your activity without using onPostExecute() Method.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Following are the steps to for our Goal.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Create your android simple project.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Write &quot;MySampleAsyncTask.java&quot; which extends AsyncTask class. (For example check below class)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;MySampleAsyncTask.java&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisw_5wnkv1aEaSZSuKghYVjx_FjWNj66_GQUiqw0N6OkfwLiEuZTHro3mNjbrQkzjXVzVBMd80ReuDrp6-OQ0mvrCENdYJHf-hvwvDhgImLH3_48YexqqWPRsLidLjy8bTp_PR-7TyFZTf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;1:  package com.sks.asyncresultback;  
2:  import java.util.Random;  
3:  import android.os.AsyncTask;  
4:  public class MySampleAsyncTask extends AsyncTask&amp;lt;Void, Void, Void&amp;gt; {  
5:       OnAsyncResult onAsyncResult;  
6:       public void setOnResultListener(OnAsyncResult onAsyncResult) {  
7:            if (onAsyncResult != null) {  
8:                 this.onAsyncResult = onAsyncResult;  
9:            }  
10:       }  
11:       @Override  
12:       protected Void doInBackground(Void... params) {  
13:            if (onAsyncResult != null) {  
14:                 // TODO apply your business logic  
15:                 int someNumber = new Random().nextInt(999);  
16:                 if (someNumber % 2 == 0) {  
17:                      onAsyncResult.onResultSuccess(0, &quot;Congratulations\nYou Got Success Value&quot;);  
18:                 } else {  
19:                      onAsyncResult.onResultFail(1, &quot;Ohhhhhhhhhhh\n Your Result failed&quot;);  
20:                 }  
21:            }  
22:            return null;  
23:       }  
24:       public interface OnAsyncResult {  
25:            public abstract void onResultSuccess(int resultCode, String message);  
26:            public abstract void onResultFail(int resultCode, String errorMessage);  
27:       }  
28:  }  
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Look into class&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;At the bottom of code created a new Interface to code.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #f0f0f0; border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; width: 646.4666748046875px;&quot;&gt;&lt;code style=&quot;word-wrap: normal;&quot;&gt;public interface OnAsyncResult {  
            public abstract void onResultSuccess(int resultCode, String message);  
            public abstract void onResultFail(int resultCode, String errorMessage);  
       }&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;You are free to use this listener. Here I didn&#39;t use onPostExecute() Method. so you can use your business logic as per your way.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Now lets Create your &quot;MainActivity.java&quot; from which we are calling our&amp;nbsp;MySampleAsyncTask for our purpose.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisw_5wnkv1aEaSZSuKghYVjx_FjWNj66_GQUiqw0N6OkfwLiEuZTHro3mNjbrQkzjXVzVBMd80ReuDrp6-OQ0mvrCENdYJHf-hvwvDhgImLH3_48YexqqWPRsLidLjy8bTp_PR-7TyFZTf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;1:  public class MainActivity extends Activity {  
2:       public TextView textView;  
3:       MySampleAsyncTask asyncTask;  
4:       @Override  
5:       public void onCreate(Bundle savedInstanceState) {  
6:            super.onCreate(savedInstanceState);  
7:            setContentView(R.layout.activity_main);  
8:            textView = (TextView) findViewById(R.id.tv_Result);  
9:            findViewById(R.id.btn_clickMe).setOnClickListener(new OnClickListener() {  
10:                 @Override  
11:                 public void onClick(View v) {  
12:                      asyncTask = new MySampleAsyncTask();  
13:                      asyncTask.setOnResultListener(asynResult);  
14:                      asyncTask.execute();  
15:                 }  
16:            });  
17:       }  
18:       OnAsyncResult asynResult = new OnAsyncResult() {  
19:            @Override  
20:            public void onResultSuccess(final int resultCode, final String message) {  
21:                 // need to add this part in ui thread.  
22:                 // as you will then thread exception.  
23:                 runOnUiThread(new Runnable() {  
24:                      public void run() {  
25:                           textView.setText(&quot;Code : &quot; + resultCode + &quot;\nMessage : &quot; + message);  
26:                      }  
27:                 });  
28:            }  
29:            @Override  
30:            public void onResultFail(final int resultCode, final String errorMessage) {  
31:                 // need to add this part in ui thread.  
32:                 // as you will then thread exception.  
33:                 runOnUiThread(new Runnable() {  
34:                      public void run() {  
35:                           textView.setText(&quot;Code : &quot; + resultCode + &quot;\nMessage : &quot; + errorMessage);  
36:                      }  
37:                 });  
38:            }  
39:       };  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
at the last block we have create instance of OnAsynkResult listener and set to our MySampleAsyncTask object on Button Click.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #f0f0f0; border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; width: 646.4666748046875px;&quot;&gt;&lt;code style=&quot;word-wrap: normal;&quot;&gt;18:      OnAsyncResult asynResult = new OnAsyncResult() {  
19:            @Override  
20:            public void onResultSuccess(final int resultCode, final String message) {  
21:                 // need to add this part in ui thread.  
22:                 // as you will then thread exception.  
23:                 runOnUiThread(new Runnable() {  
24:                      public void run() {  
25:                           textView.setText(&quot;Code : &quot; + resultCode + &quot;\nMessage : &quot; + message);  
26:                      }  
27:                 });  
28:            }  
29:            @Override  
30:            public void onResultFail(final int resultCode, final String errorMessage) {  
31:                 // need to add this part in ui thread.  
32:                 // as you will then thread exception.  
33:                 runOnUiThread(new Runnable() {  
34:                      public void run() {  
35:                           textView.setText(&quot;Code : &quot; + resultCode + &quot;\nMessage : &quot; + errorMessage);  
36:                      }  
37:                 });  
38:            }  
39:       };&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;on each method, if you want to set values to view then you have to use&lt;b&gt; runOnUiThread&lt;/b&gt; methods.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;as this listeners are already calling from thread.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #6d6d6d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: left;&quot;&gt;Download Source Code&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://code.google.com/p/smartphone-app-by-sachin-shelke/downloads/list&quot; target=&quot;_blank&quot;&gt;&lt;span id=&quot;goog_766641913&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_1530837409&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_1530837426&quot;&gt;&lt;/span&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-LKv76Gbhc1k/T1CM6WE7wsI/AAAAAAAAAKc/oGzUadqirR8/s1600/download-now_smal.png&quot; /&gt;&lt;span id=&quot;goog_1530837427&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;span id=&quot;goog_1530837410&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_766641914&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Check our Source code&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;svn checkout&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;http://smartphone-app-by-sachin-shelke.googlecode.com/svn/trunk/&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; color: #6d6d6d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; color: #6d6d6d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 20px; text-align: center;&quot;&gt;
&lt;span style=&quot;color: red; font-family: &#39;Times New Roman&#39;; font-size: large; line-height: normal; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; color: #6d6d6d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 20px; text-align: center;&quot;&gt;
&lt;span style=&quot;color: red; font-family: &#39;Times New Roman&#39;; font-size: large; line-height: normal; text-align: left;&quot;&gt;Comments are always welcome&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Times New Roman&#39;; font-size: small; line-height: normal; text-align: left;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: purple; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/4012581856569775837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/4012581856569775837?isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/4012581856569775837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/4012581856569775837'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2012/11/how-to-return-value-from-async-task-in.html' title='How to Return value from Async task in android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-LKv76Gbhc1k/T1CM6WE7wsI/AAAAAAAAAKc/oGzUadqirR8/s72-c/download-now_smal.png" height="72" width="72"/><thr:total>4</thr:total><georss:featurename>National Highway 4, Kasba Peth, Pune, Maharashtra, India</georss:featurename><georss:point>18.5204303 73.8567437</georss:point><georss:box>18.399981800000003 73.6988152 18.6408788 74.014672199999993</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-4563828908508989026</id><published>2012-09-10T16:03:00.000+05:30</published><updated>2012-09-10T16:03:09.777+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Density"/><category scheme="http://www.blogger.com/atom/ns#" term="LargeScreen"/><category scheme="http://www.blogger.com/atom/ns#" term="Screen Size"/><category scheme="http://www.blogger.com/atom/ns#" term="XLarge Screen."/><title type='text'>How to find Screen Size and Density of Device in Android programatically</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi add this below code in on Create method and check your device or emulator screen configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if ((getResources().getConfiguration().screenLayout &amp;amp; Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_LARGE) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Toast.makeText(Util.mContext, &quot;Large Screen&quot;, Toast.LENGTH_SHORT).show();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Util.v(&quot;Screen Size : Large &quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} else if ((getResources().getConfiguration().screenLayout &amp;amp; Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Toast.makeText(Util.mContext, &quot;X Large Screen&quot;, Toast.LENGTH_SHORT).show();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Util.v(&quot;Screen Size : X Large &quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} else if ((getResources().getConfiguration().screenLayout &amp;amp; Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Toast.makeText(Util.mContext, &quot;Normal Screen&quot;, Toast.LENGTH_SHORT).show();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Util.v(&quot;Screen Size : Normal &quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//Determine density&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;DisplayMetrics metrics = new DisplayMetrics();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getWindowManager().getDefaultDisplay().getMetrics(metrics);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int density = metrics.densityDpi;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (density==DisplayMetrics.DENSITY_HIGH) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Toast.makeText(this, &quot;DENSITY_HIGH... Density is &quot; + String.valueOf(density), &amp;nbsp;Toast.LENGTH_LONG).show();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Util.v(&quot;DENSITY_HIGH... Density is &quot; + String.valueOf(density));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if (density==DisplayMetrics.DENSITY_MEDIUM) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Toast.makeText(this, &quot;DENSITY_MEDIUM... Density is &quot; + String.valueOf(density), &amp;nbsp;Toast.LENGTH_LONG).show();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Util.v(&quot;DENSITY_MEDIUM... Density is &quot; + String.valueOf(density));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if (density==DisplayMetrics.DENSITY_LOW) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Toast.makeText(this, &quot;DENSITY_LOW... Density is &quot; + String.valueOf(density), &amp;nbsp;Toast.LENGTH_LONG).show();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Util.v(&quot;DENSITY_LOW... Density is &quot; + String.valueOf(density));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Toast.makeText(this, &quot;Density is neither HIGH, MEDIUM OR LOW. &amp;nbsp;Density is &quot; + String.valueOf(density), &amp;nbsp;Toast.LENGTH_LONG).show();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Util.v(&quot;Density is neither HIGH, MEDIUM OR LOW... Density is &quot; + String.valueOf(density));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/4563828908508989026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/4563828908508989026?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/4563828908508989026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/4563828908508989026'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2012/09/how-to-find-screen-size-and-density-of.html' title='How to find Screen Size and Density of Device in Android programatically'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-7607806030340845074</id><published>2012-07-16T21:05:00.001+05:30</published><updated>2012-07-16T21:05:43.801+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Conversion"/><category scheme="http://www.blogger.com/atom/ns#" term="Conversion to Dalvik format failed with error 1"/><category scheme="http://www.blogger.com/atom/ns#" term="Delvik"/><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="failed"/><title type='text'>How to resolve Conversion to Dalvik format failed with error 1</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Many times we faced problem of &lt;b&gt;&quot;Conversion to Dalvik format failed with error 1&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;When i went through Google and found many solutions but below has solved my problem.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In Eclipse Package Explorer, Right Click on Project -&amp;gt; Select Properties -&amp;gt; Select &quot;Java Build Path&quot; -&amp;gt; and remove all the JARs from library. Then click OK. Project will show you an error.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Then as usual your try fix project property and clean project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Then again follow the above 1st steps to add your JARs.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Now follow again 2nd step to clear and clean your project.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hurreeee,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Your problem has been resolve. Run Project and enjoy Coding&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/7607806030340845074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/7607806030340845074?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/7607806030340845074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/7607806030340845074'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2012/07/how-to-resolve-conversion-to-dalvik.html' title='How to resolve Conversion to Dalvik format failed with error 1'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-299598117372519989</id><published>2012-04-10T13:11:00.003+05:30</published><updated>2012-06-29T14:29:18.466+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ANDROID_ID"/><category scheme="http://www.blogger.com/atom/ns#" term="Device ID"/><category scheme="http://www.blogger.com/atom/ns#" term="Device Unique Identifier"/><category scheme="http://www.blogger.com/atom/ns#" term="getDeviceID()"/><category scheme="http://www.blogger.com/atom/ns#" term="TelephonyManager"/><category scheme="http://www.blogger.com/atom/ns#" term="UDID"/><category scheme="http://www.blogger.com/atom/ns#" term="Unique Identifier"/><title type='text'>How to find Android Unique Device ID or UDID - Part 2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In the previous post&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://smartphonebysachin.blogspot.in/2011/09/how-to-find-android-unique-device-id-or.html&quot;&gt;http://smartphonebysachin.blogspot.in/2011/09/how-to-find-android-unique-device-id-or.html&lt;/a&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;we had seen only how to get ANDROID_D.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Now We will see the Difference Between Android ID &amp;amp; Device ID of Android Phone&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;




&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Android ID :&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: purple;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;ANDROID_ID is&amp;nbsp;a 64-bit number (as a hex string) that is RANDOMLY GENERATED on the device&#39;s first boot and should remain constant for the lifetime of the device.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;i&gt;&lt;b&gt;(The value may change if a factory reset is performed on the device.)&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Device ID :&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Arial, Helvetica, sans-serif;&quot;&gt;Returns the unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones.&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Here is sample Code to get UDID&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public class DemoActivity extends Activity {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void onCreate(Bundle savedInstanceState) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;super.onCreate(savedInstanceState);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;setContentView(R.layout.main);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;TelephonyManager tm = (TelephonyManager) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.getSystemService(Context.TELEPHONY_SERVICE);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;Log.d(&quot;ID&quot;, &quot;Android ID: &quot; + Secure.getString(getContentResolver(), Secure.ANDROID_ID));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; Log.d(&quot;ID&quot;, &quot;Device ID : &quot; + tm.getDeviceId());&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;For getting &lt;b&gt;Device ID&lt;/b&gt;&amp;nbsp;you have to set following permission in AndroidMenifest.xml&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;b&gt; &amp;lt;uses-permission android:name=&quot;android.permission.READ_PHONE_STATE&quot;/&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;For getting &lt;b&gt;ANDROID_ID&lt;/b&gt; you don&#39;t need to set any permission.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;ANDROID_ID seems a good choice for a unique device identifier.&lt;/span&gt;&lt;/div&gt;</content><link rel='enclosure' type='text/html' href='http://smartphonebysachin.blogspot.in/2011/09/how-to-find-android-unique-device-id-or.html' length='0'/><link rel='enclosure' type='text/html' href='http://smartphonebysachin.blogspot.in/2012/04/how-to-find-android-unique-device-id-or.html' length='0'/><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/299598117372519989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/299598117372519989?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/299598117372519989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/299598117372519989'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2012/04/how-to-find-android-unique-device-id-or.html' title='How to find Android Unique Device ID or UDID - Part 2'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-1700593260038541135</id><published>2012-04-05T15:37:00.000+05:30</published><updated>2012-06-29T14:18:30.129+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alert"/><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Custom"/><category scheme="http://www.blogger.com/atom/ns#" term="Custom Dialog Box"/><category scheme="http://www.blogger.com/atom/ns#" term="Customized"/><category scheme="http://www.blogger.com/atom/ns#" term="Dialog"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone Like AlertView"/><title type='text'>How to create iPhone like Custom Dialog / Alert View or Box in Android</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hi,&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;







&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Its very interesting to create &lt;b&gt;iPhone Like AlertView (Dialog Box) in Android.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigUkfPMz2AG1CG9WzB4WdM9GCbd6MZSnio4BI0fyOO9eZ61ZPpX6e3MDrouFG8ygUG5XlhFWHkxAw7IEF7yTZ7B3gwZOQZJkGg3AEO0iV-D6k0qGfl7s-86WpffJnxzCTnquTNx5x8GHSb/s1600/SKS+Custom+Dialog.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;207&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigUkfPMz2AG1CG9WzB4WdM9GCbd6MZSnio4BI0fyOO9eZ61ZPpX6e3MDrouFG8ygUG5XlhFWHkxAw7IEF7yTZ7B3gwZOQZJkGg3AEO0iV-D6k0qGfl7s-86WpffJnxzCTnquTNx5x8GHSb/s320/SKS+Custom+Dialog.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqLVf6vhT7g1sNUHBf9Fz2H78H2CIsHRsdDAzjecCvocEY48kE-fPqGdaXxRD0UBBDUI_dJR9oE01oRfTcRFQhM0K70Po7Tm1dOavkoajKQZpSkYXUQ0WhzrV26j855OoxBNuwIAK_NmbH/s1600/iPhone+like+Custom+Dialog+in+Android.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Follow the steps to create iPhone Like AlertView (Dialog Box) in Android&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Step 1 : Create android Project in&amp;nbsp;Eclipse&amp;nbsp;as shown below&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXC3tpil-ASsDwUgCtGERbt4999AYdpFs5uqAPqstpg0HwB68U6IEl1WCg6dXQNHQCTL57wM74uIxuyQIEi2i79RyVHur1znU5Hf93nawCEbkhUByqEHdBk1jhzmBEvhaO3T8COe6lNagu/s1600/Create+Android+Project+-+Step+1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;380&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXC3tpil-ASsDwUgCtGERbt4999AYdpFs5uqAPqstpg0HwB68U6IEl1WCg6dXQNHQCTL57wM74uIxuyQIEi2i79RyVHur1znU5Hf93nawCEbkhUByqEHdBk1jhzmBEvhaO3T8COe6lNagu/s400/Create+Android+Project+-+Step+1.png&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-9C9ho_FSThE/T31YcTwAd5I/AAAAAAAAANg/Imv-BH3YBxk/s1600/Create+Android+Project+-+Step+2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;362&quot; src=&quot;http://4.bp.blogspot.com/-9C9ho_FSThE/T31YcTwAd5I/AAAAAAAAANg/Imv-BH3YBxk/s400/Create+Android+Project+-+Step+2.png&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-6wLCZjVyQKk/T31YdTKbMcI/AAAAAAAAANo/Gn6ytGDMwRs/s1600/Create+Android+Project+-+Step+3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;361&quot; src=&quot;http://4.bp.blogspot.com/-6wLCZjVyQKk/T31YdTKbMcI/AAAAAAAAANo/Gn6ytGDMwRs/s400/Create+Android+Project+-+Step+3.png&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKHjAO6O-abVEwFZH1rZ2r7-9Xa7etQq6W7oI_BiaRZp513VjSL61oPrjtjtQqFRY5W4lbwb5mlJb72eGC9WwHI2Wqxu89Fb4JaW0K7PAGk28luhXWC0JithXHFhouSWcQFeYY-ZiC5caF/s1600/Create+Android+Project+-+Step+4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;362&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKHjAO6O-abVEwFZH1rZ2r7-9Xa7etQq6W7oI_BiaRZp513VjSL61oPrjtjtQqFRY5W4lbwb5mlJb72eGC9WwHI2Wqxu89Fb4JaW0K7PAGk28luhXWC0JithXHFhouSWcQFeYY-ZiC5caF/s400/Create+Android+Project+-+Step+4.png&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Step 2 : Create New Class for Custom Dialog as given below&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrujk5pxH0B7TYpAaF1X1t7bmwMNBP9lYAEVv5rpXMF1kwTLsV-iFdlZv7NKiz6_hqaVAh55YWEVIOXwUcsZA4ZDoOLEijpJ_q1L7ECy4XNkWrUqUxOk6rXWY_nYb_MZRJKszU3drYMyGe/s1600/Create+Android+Project+-+Step+5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrujk5pxH0B7TYpAaF1X1t7bmwMNBP9lYAEVv5rpXMF1kwTLsV-iFdlZv7NKiz6_hqaVAh55YWEVIOXwUcsZA4ZDoOLEijpJ_q1L7ECy4XNkWrUqUxOk6rXWY_nYb_MZRJKszU3drYMyGe/s400/Create+Android+Project+-+Step+5.png&quot; width=&quot;336&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
After creating &lt;b&gt;CustomizeDialog.java&lt;/b&gt; write following code into it.&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisw_5wnkv1aEaSZSuKghYVjx_FjWNj66_GQUiqw0N6OkfwLiEuZTHro3mNjbrQkzjXVzVBMd80ReuDrp6-OQ0mvrCENdYJHf-hvwvDhgImLH3_48YexqqWPRsLidLjy8bTp_PR-7TyFZTf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: 350px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; package com.sks.dialog.custom;  
 import android.app.Dialog;  
 import android.content.Context;  
 import android.text.method.ScrollingMovementMethod;  
 import android.view.View;  
 import android.view.View.OnClickListener;  
 import android.view.Window;  
 import android.widget.Button;  
 import android.widget.TextView;  
 /** Class Must extends with Dialog */  
 /** Implement onClickListener to dismiss dialog when OK Button is pressed */  
 public class CustomizeDialog extends Dialog implements OnClickListener {  
     Button okButton;  
     Context mContext;  
     TextView mTitle = null;  
     TextView mMessage = null;  
     View v = null;  
     public CustomizeDialog(Context context) {  
         super(context);  
         mContext = context;  
         /** &#39;Window.FEATURE_NO_TITLE&#39; - Used to hide the mTitle */  
         requestWindowFeature(Window.FEATURE_NO_TITLE);  
         /** Design the dialog in main.xml file */  
         setContentView(R.layout.main);  
         v = getWindow().getDecorView();  
         v.setBackgroundResource(android.R.color.transparent);  
         mTitle = (TextView) findViewById(R.id.dialogTitle);  
         mMessage = (TextView) findViewById(R.id.dialogMessage);  
         okButton = (Button) findViewById(R.id.OkButton);  
         okButton.setOnClickListener(this);  
     }  
     @Override  
     public void onClick(View v) {  
         /** When OK Button is clicked, dismiss the dialog */  
         if (v == okButton)  
             dismiss();  
     }  
     @Override  
     public void setTitle(CharSequence title) {  
         super.setTitle(title);  
         mTitle.setText(title);  
     }  
     @Override  
     public void setTitle(int titleId) {  
         super.setTitle(titleId);  
         mTitle.setText(mContext.getResources().getString(titleId));  
     }  
     /**  
      * Set the message text for this dialog&#39;s window.  
      *   
      * @param message  
      *      - The new message to display in the title.  
      */  
     public void setMessage(CharSequence message) {  
         mMessage.setText(message);  
         mMessage.setMovementMethod(ScrollingMovementMethod.getInstance());  
     }  
     /**  
      * Set the message text for this dialog&#39;s window. The text is retrieved from the resources with the supplied  
      * identifier.  
      *   
      * @param messageId  
      *      - the message&#39;s text resource identifier &amp;lt;br&amp;gt;  
      * @see &amp;lt;b&amp;gt;Note : if resourceID wrong application may get crash.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;  
      *   Exception has not handle.  
      */  
     public void setMessage(int messageId) {  
         mMessage.setText(mContext.getResources().getString(messageId));  
         mMessage.setMovementMethod(ScrollingMovementMethod.getInstance());  
     }  
 }  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Very Important part to hide dialog default background.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
below code is used to set transparant background of dialog.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 627px;&quot;&gt;&lt;code style=&quot;word-wrap: normal;&quot;&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 627px;&quot;&gt;&lt;code style=&quot;word-wrap: normal;&quot;&gt;v = getWindow().getDecorView(); &amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 627px;&quot;&gt;&lt;code style=&quot;word-wrap: normal;&quot;&gt;v.setBackgroundResource(android.R.color.transparent);&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 627px;&quot;&gt;&lt;code style=&quot;word-wrap: normal;&quot;&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Step 3 : Now We have to create custom Layout for Dialog.&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;edit &lt;b&gt;main.xml&lt;/b&gt; (you can select layout file name as per your specifications)&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; height: 350px; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;  
 &amp;lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;  
   android:id=&quot;@+id/LinearLayout&quot;  
   android:layout_width=&quot;fill_parent&quot;  
   android:layout_height=&quot;wrap_content&quot;  
   android:layout_gravity=&quot;center&quot;  
   android:layout_margin=&quot;0dip&quot;  
   android:background=&quot;@drawable/alert_bg&quot;  
   android:orientation=&quot;vertical&quot;  
   android:paddingBottom=&quot;15dip&quot;  
   android:paddingLeft=&quot;0dip&quot;  
   android:paddingRight=&quot;0dip&quot;  
   android:paddingTop=&quot;0dip&quot; &amp;gt;  
   &amp;lt;TextView  
     android:id=&quot;@+id/dialogTitle&quot;  
     android:layout_width=&quot;fill_parent&quot;  
     android:layout_height=&quot;wrap_content&quot;  
     android:layout_marginTop=&quot;20dip&quot;  
     android:background=&quot;#00000000&quot;  
     android:gravity=&quot;center&quot;  
     android:text=&quot;&quot;  
     android:textColor=&quot;#fff&quot;  
     android:textSize=&quot;22sp&quot;  
     android:textStyle=&quot;bold&quot; &amp;gt;  
   &amp;lt;/TextView&amp;gt;  
   &amp;lt;TextView  
     android:id=&quot;@+id/dialogMessage&quot;  
     android:layout_width=&quot;fill_parent&quot;  
     android:layout_height=&quot;wrap_content&quot;  
     android:layout_below=&quot;@+id/dialogTitle&quot;  
     android:focusable=&quot;true&quot;  
     android:focusableInTouchMode=&quot;true&quot;  
     android:gravity=&quot;center&quot;  
     android:maxLines=&quot;10&quot;  
     android:padding=&quot;10dip&quot;  
     android:scrollbars=&quot;vertical&quot;  
     android:text=&quot;&quot;  
     android:textColor=&quot;#fff&quot;  
     android:textSize=&quot;18sp&quot; &amp;gt;  
   &amp;lt;/TextView&amp;gt;  
   &amp;lt;Button  
     android:id=&quot;@+id/OkButton&quot;  
     android:layout_width=&quot;fill_parent&quot;  
     android:layout_height=&quot;wrap_content&quot;  
     android:layout_below=&quot;@+id/dialogMessage&quot;  
     android:layout_centerHorizontal=&quot;true&quot;  
     android:layout_marginLeft=&quot;10dip&quot;  
     android:layout_marginRight=&quot;10dip&quot;  
     android:background=&quot;@drawable/button&quot;  
     android:text=&quot;OK&quot;  
     android:textColor=&quot;#FFFFFF&quot; &amp;gt;  
   &amp;lt;/Button&amp;gt;  
 &amp;lt;/RelativeLayout&amp;gt;  
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Step 4 : Add 9 patch image in &lt;b&gt;res-&amp;gt;drawable&lt;/b&gt; folder given below. You can modify image.&lt;/span&gt;&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtOzpzCmPjlpIBNPj5xxkVfntZJefDHvaMV40UADl_BrPaJ-l9G-QZvECWp8cHIg9lJgNeHNfXUuDRrv53mh0fZX2QBD8zEWGdjXEbTlJ7NjP-eV5S5VuAtcAvLvAchY7YKG4-7tpt2hii/s1600/alert_bg.9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtOzpzCmPjlpIBNPj5xxkVfntZJefDHvaMV40UADl_BrPaJ-l9G-QZvECWp8cHIg9lJgNeHNfXUuDRrv53mh0fZX2QBD8zEWGdjXEbTlJ7NjP-eV5S5VuAtcAvLvAchY7YKG4-7tpt2hii/s1600/alert_bg.9.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;alert_bg.9.png&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4_BlrDqrTB0z43hbmlCsSTMx9MRWwZ1CVdU0wuq6m8ShZuWq1nv9TYUXRHq-FFwU2WOkxgV2RdSwgSKw8qXElllxNkzmevPXosT6jO3l3fCLEWif0fv8hbKJ-nYrWbAFLPlufWEhXMmnl/s1600/button_bg_normal.9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4_BlrDqrTB0z43hbmlCsSTMx9MRWwZ1CVdU0wuq6m8ShZuWq1nv9TYUXRHq-FFwU2WOkxgV2RdSwgSKw8qXElllxNkzmevPXosT6jO3l3fCLEWif0fv8hbKJ-nYrWbAFLPlufWEhXMmnl/s1600/button_bg_normal.9.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;button_bg_normal.9.png&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVvBGid2wx6bqcHMO9iqJbt4khCtyERm7cdKeU9UTbiVmYwnWjZpS-ZAdI_H5ooWWJvsCp2Ur73bHHGtbPjFosvsbaSpnIgKy_AEoD-HdI7aeDpks4S-3i_ZUDeDSv6X_hKQKGT9Il8eiO/s1600/button_bg_pressed.9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVvBGid2wx6bqcHMO9iqJbt4khCtyERm7cdKeU9UTbiVmYwnWjZpS-ZAdI_H5ooWWJvsCp2Ur73bHHGtbPjFosvsbaSpnIgKy_AEoD-HdI7aeDpks4S-3i_ZUDeDSv6X_hKQKGT9Il8eiO/s1600/button_bg_pressed.9.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;button_bg_pressed.9&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSXeTYuZ0Wo0PsOFLsgm2uOO5SNNnVFn4EE4A3Xp4Wht3j5gyc7wAuPEZ5UE93YebUm6MAo7-cN93VtFxiJeQ91vrSa0Lznqfv8b7upKrXwfL0w6hpn94eQLSujhj80EYhclFMBfBLnhyphenhyphenq/s1600/titlebg.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;35&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSXeTYuZ0Wo0PsOFLsgm2uOO5SNNnVFn4EE4A3Xp4Wht3j5gyc7wAuPEZ5UE93YebUm6MAo7-cN93VtFxiJeQ91vrSa0Lznqfv8b7upKrXwfL0w6hpn94eQLSujhj80EYhclFMBfBLnhyphenhyphenq/s320/titlebg.png&quot; style=&quot;border-bottom-color: rgb(0, 0, 0); border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-width: 1px; border-style: initial; border-top-color: rgb(0, 0, 0); border-top-width: 1px;&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;titlebg.png&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Arial, Helvetica, sans-serif;&quot;&gt;Note : this image&amp;nbsp;transparency&amp;nbsp;is 90%&amp;nbsp;that&#39;s&amp;nbsp;why invisible&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Step 5 : For adding Focus Effect on Dialog Button create&lt;b&gt; button.xml&lt;/b&gt; in drawable folder as given below&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 12px; height: auto; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;  
 &amp;lt;selector xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&amp;gt;  
     &amp;lt;item android:state_pressed=&quot;true&quot; android:drawable=&quot;@drawable/button_bg_pressed&quot; /&amp;gt; &amp;lt;!-- pressed --&amp;gt;  
     &amp;lt;item android:state_focused=&quot;true&quot; android:drawable=&quot;@drawable/button_bg_pressed&quot; /&amp;gt; &amp;lt;!-- focused --&amp;gt;  
     &amp;lt;item android:drawable=&quot;@drawable/button_bg_normal&quot; /&amp;gt; &amp;lt;!-- default --&amp;gt;  
 &amp;lt;/selector&amp;gt;  
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Step 6 : Now Come to our First Activity i.e. &lt;b&gt;CustomDialogExample.java &lt;/b&gt;and Modify file as given Below&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisw_5wnkv1aEaSZSuKghYVjx_FjWNj66_GQUiqw0N6OkfwLiEuZTHro3mNjbrQkzjXVzVBMd80ReuDrp6-OQ0mvrCENdYJHf-hvwvDhgImLH3_48YexqqWPRsLidLjy8bTp_PR-7TyFZTf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: 350px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; package com.sks.dialog.custom;  
 import android.app.Activity;  
 import android.content.Context;  
 import android.os.Bundle;  
 import android.view.View;  
 import android.view.View.OnClickListener;  
 import android.widget.Button;  
 public class CustomDialogExample extends Activity {  
     Context context;  
     CustomizeDialog customizeDialog = null;  
     /** Called when the activity is first created. */  
     @Override  
     public void onCreate(Bundle savedInstanceState) {  
         super.onCreate(savedInstanceState);  
         /** Display Custom Dialog */  
         context = this;  
         setContentView(R.layout.home);  
         Button btn1 = (Button) findViewById(R.id.btnDialog1);  
         btn1.setOnClickListener(new OnClickListener() {  
             @Override  
             public void onClick(View v) {  
                 customizeDialog = new CustomizeDialog(context);  
                 customizeDialog.setTitle(&quot;My Title&quot;);  
                 customizeDialog.setMessage(&quot;My Custom Dialog Message from \nSmartPhoneBySachin.Blogspot.com &quot;);  
                 customizeDialog.show();  
             }  
         });  
     }  
 }  
&lt;/code&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Now you are ready to Run Project and you will get result as image below&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqLVf6vhT7g1sNUHBf9Fz2H78H2CIsHRsdDAzjecCvocEY48kE-fPqGdaXxRD0UBBDUI_dJR9oE01oRfTcRFQhM0K70Po7Tm1dOavkoajKQZpSkYXUQ0WhzrV26j855OoxBNuwIAK_NmbH/s1600/iPhone+like+Custom+Dialog+in+Android.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqLVf6vhT7g1sNUHBf9Fz2H78H2CIsHRsdDAzjecCvocEY48kE-fPqGdaXxRD0UBBDUI_dJR9oE01oRfTcRFQhM0K70Po7Tm1dOavkoajKQZpSkYXUQ0WhzrV26j855OoxBNuwIAK_NmbH/s640/iPhone+like+Custom+Dialog+in+Android.png&quot; width=&quot;384&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #6d6d6d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: left;&quot;&gt;Download Source Code and &amp;nbsp;Installer Apk&lt;/span&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://code.google.com/p/smartphone-app-by-sachin-shelke/downloads/detail?name=CustomDialogDemoBySKS.apk&amp;amp;can=2&amp;amp;q=#makechanges&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-LKv76Gbhc1k/T1CM6WE7wsI/AAAAAAAAAKc/oGzUadqirR8/s1600/download-now_smal.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; color: #6d6d6d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; color: #6d6d6d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: center;&quot;&gt;
&lt;span style=&quot;color: red; font-family: &#39;Times New Roman&#39;; font-size: small; line-height: normal; text-align: left;&quot;&gt;Comments are always welcome.&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: purple; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: purple; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;Enjoy Customization in Android&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/1700593260038541135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/1700593260038541135?isPopup=true' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/1700593260038541135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/1700593260038541135'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2012/04/how-to-create-iphone-like-custom-dialog.html' title='How to create iPhone like Custom Dialog / Alert View or Box in Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigUkfPMz2AG1CG9WzB4WdM9GCbd6MZSnio4BI0fyOO9eZ61ZPpX6e3MDrouFG8ygUG5XlhFWHkxAw7IEF7yTZ7B3gwZOQZJkGg3AEO0iV-D6k0qGfl7s-86WpffJnxzCTnquTNx5x8GHSb/s72-c/SKS+Custom+Dialog.png" height="72" width="72"/><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-4679183774643003828</id><published>2012-03-02T14:37:00.001+05:30</published><updated>2012-07-03T12:21:56.836+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Custom"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone Like Section ListView"/><category scheme="http://www.blogger.com/atom/ns#" term="ListView"/><category scheme="http://www.blogger.com/atom/ns#" term="ListView Section"/><category scheme="http://www.blogger.com/atom/ns#" term="ListView with Separator"/><category scheme="http://www.blogger.com/atom/ns#" term="Segments"/><category scheme="http://www.blogger.com/atom/ns#" term="Separator"/><category scheme="http://www.blogger.com/atom/ns#" term="Widget"/><title type='text'>Custom ListView With Separator and Section in Android</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;




&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Here we will have a very simple tutorial for Custom ListView in android with Section Header.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;We will able to display final view as per below images&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-H9MgoVMmCvQ/T1CLJwo-GBI/AAAAAAAAAKM/iEvz6W77jsU/s1600/device-2012-03-02-111316.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;http://2.bp.blogspot.com/-H9MgoVMmCvQ/T1CLJwo-GBI/AAAAAAAAAKM/iEvz6W77jsU/s400/device-2012-03-02-111316.png&quot; width=&quot;223&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://3.bp.blogspot.com/-Nf3MFv-DqJs/T1CLV1qQRNI/AAAAAAAAAKU/288cPtF6pNQ/s1600/device-2012-03-02-111332.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;http://3.bp.blogspot.com/-Nf3MFv-DqJs/T1CLV1qQRNI/AAAAAAAAAKU/288cPtF6pNQ/s400/device-2012-03-02-111332.png&quot; width=&quot;223&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: red; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Steps to Create Custom List View&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Open Eclipse to Create New Project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Create New Project with package name&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;i&gt;com.sks.demo.custom_list&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Add following images in &lt;b&gt;&lt;i&gt;reg-&amp;gt;drawable&lt;/i&gt;&lt;/b&gt; folder&lt;div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-l1aeQ-SDAnc/T1BpF6YCKrI/AAAAAAAAAJ0/l_YiY_XrQt4/s1600/list_header_bg.9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;52&quot; src=&quot;http://1.bp.blogspot.com/-l1aeQ-SDAnc/T1BpF6YCKrI/AAAAAAAAAJ0/l_YiY_XrQt4/s320/list_header_bg.9.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;list_header_bg.9.png&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Create a new List Section Header Layout (find the below &lt;/span&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;i&gt;item_composer_header.xml&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; file)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;


&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-family: arial; height: 300px; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;  
 &amp;lt;TextView xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;  
   android:id=&quot;@+id/list_section_header&quot;  
   android:layout_width=&quot;fill_parent&quot;  
   android:layout_height=&quot;wrap_content&quot;  
   android:background=&quot;@drawable/list_header_bg&quot;  
   android:padding=&quot;4dp&quot;  
   android:paddingLeft=&quot;10dp&quot;  
   android:shadowColor=&quot;#000&quot;  
   android:shadowDx=&quot;1&quot;  
   android:shadowDy=&quot;1&quot;  
   android:shadowRadius=&quot;1&quot;  
   android:text=&quot;Header&quot;  
   android:textColor=&quot;#FFF&quot;  
   android:textSize=&quot;16sp&quot;  
   android:textStyle=&quot;bold&quot;  
   android:typeface=&quot;serif&quot; /&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Create a new List Item Custom Layout (find the below&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;i&gt;item_composer.xml&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;file)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-family: arial; height: 300px; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;  
 &amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;  
   android:layout_width=&quot;fill_parent&quot;  
   android:layout_height=&quot;fill_parent&quot;  
   android:orientation=&quot;vertical&quot; &amp;gt;  
   &amp;lt;include  
     android:layout_width=&quot;fill_parent&quot;  
     android:layout_height=&quot;wrap_content&quot;  
     layout=&quot;@layout/item_composer_header&quot; /&amp;gt;  
   &amp;lt;LinearLayout  
     android:layout_width=&quot;fill_parent&quot;  
     android:layout_height=&quot;wrap_content&quot;  
     android:layout_marginLeft=&quot;5dp&quot;  
     android:layout_marginRight=&quot;5dp&quot;  
     android:background=&quot;@drawable/custom_list_item_bg&quot;  
     android:orientation=&quot;vertical&quot;  
     android:paddingBottom=&quot;3dp&quot;  
     android:paddingLeft=&quot;10dp&quot;  
     android:paddingRight=&quot;10dp&quot;  
     android:paddingTop=&quot;3dp&quot; &amp;gt;  
     &amp;lt;TextView  
       android:id=&quot;@+id/list_section_title1&quot;  
       android:layout_width=&quot;wrap_content&quot;  
       android:layout_height=&quot;wrap_content&quot;  
       android:text=&quot;Full Name&quot;  
       android:textColor=&quot;@color/white&quot;  
       android:textStyle=&quot;bold&quot; /&amp;gt;  
     &amp;lt;TextView  
       android:id=&quot;@+id/list_section_title2&quot;  
       android:layout_width=&quot;wrap_content&quot;  
       android:layout_height=&quot;wrap_content&quot;  
       android:text=&quot;1500-1600&quot;  
       android:textColor=&quot;@color/white&quot; /&amp;gt;  
   &amp;lt;/LinearLayout&amp;gt;  
 &amp;lt;/LinearLayout&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;span style=&quot;color: #0b5394; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: #0b5394; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Now Edit your &lt;i&gt;&lt;b&gt;main.xml&lt;/b&gt;&lt;/i&gt; to set Custom ListView&lt;br /&gt;&lt;br /&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-family: arial; height: 300px; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;  
 &amp;lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;  
   android:layout_width=&quot;fill_parent&quot;  
   android:layout_height=&quot;fill_parent&quot;  
   android:background=&quot;@drawable/background&quot; &amp;gt;  
   &amp;lt;TextView  
     android:id=&quot;@+id/title&quot;  
     android:layout_width=&quot;fill_parent&quot;  
     android:layout_height=&quot;wrap_content&quot;  
     android:text=&quot;State wise Cities in India&quot; /&amp;gt;  
   &amp;lt;com.sks.demo.custom_list.list.SKSCustomListView  
     android:id=&quot;@+id/list_services&quot;  
     android:layout_width=&quot;fill_parent&quot;  
     android:layout_height=&quot;fill_parent&quot;  
     android:layout_below=&quot;@+id/title&quot;  
     android:background=&quot;#00ffffff&quot;  
     android:cacheColorHint=&quot;#00000000&quot;  
     android:divider=&quot;@drawable/img_list_seperator&quot;  
     android:dividerHeight=&quot;1dip&quot;  
     android:drawingCacheQuality=&quot;high&quot;  
     android:keepScreenOn=&quot;false&quot; &amp;gt;  
   &amp;lt;/com.sks.demo.custom_list.list.SKSCustomListView&amp;gt;  
 &amp;lt;/RelativeLayout&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: &#39;Times New Roman&#39;; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;The Above code will be look like below image. You can set any background.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-FmYiAfczDRI/T1Bsp9jKHUI/AAAAAAAAAKE/d2lSid0nR2k/s1600/Capture.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://4.bp.blogspot.com/-FmYiAfczDRI/T1Bsp9jKHUI/AAAAAAAAAKE/d2lSid0nR2k/s320/Capture.PNG&quot; width=&quot;192&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Here we are going to create our custom list view Widget.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;We need to set Some Data &amp;amp; Composer classes for list view item&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Following is the Data &amp;amp; Composer Class in Default Package&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Code : Data.java&lt;/b&gt;&lt;br /&gt;


&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-family: arial; height: 300px; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; package com.sks.demo.custom_list;  
 import java.util.ArrayList;  
 import java.util.Arrays;  
 import java.util.List;  
 import android.os.SystemClock;  
 import android.util.Pair;  
 public class Data {  
     public static List&amp;lt;Pair&amp;lt;String, List&amp;lt;Composer&amp;gt;&amp;gt;&amp;gt; getAllData() {  
         List&amp;lt;Pair&amp;lt;String, List&amp;lt;Composer&amp;gt;&amp;gt;&amp;gt; res = new ArrayList&amp;lt;Pair&amp;lt;String, List&amp;lt;Composer&amp;gt;&amp;gt;&amp;gt;();  
         for (int i = 0; i &amp;lt; 4; i++) {  
             res.add(getOneSection(i));  
         }  
         return res;  
     }  
     public static List&amp;lt;Composer&amp;gt; getFlattenedData() {  
         List&amp;lt;Composer&amp;gt; res = new ArrayList&amp;lt;Composer&amp;gt;();  
         for (int i = 0; i &amp;lt; 4; i++) {  
             res.addAll(getOneSection(i).second);  
         }  
         return res;  
     }  
     public static Pair&amp;lt;Boolean, List&amp;lt;Composer&amp;gt;&amp;gt; getRows(int page) {  
         List&amp;lt;Composer&amp;gt; flattenedData = getFlattenedData();  
         if (page == 1) {  
             return new Pair&amp;lt;Boolean, List&amp;lt;Composer&amp;gt;&amp;gt;(true, flattenedData.subList(0, 5));  
         } else {  
             SystemClock.sleep(2000); // simulate loading  
             return new Pair&amp;lt;Boolean, List&amp;lt;Composer&amp;gt;&amp;gt;(page * 5 &amp;lt; flattenedData.size(), flattenedData.subList((page) * 5,  
                     Math.min(page * 5, flattenedData.size())));  
         }  
     }  
     public static Pair&amp;lt;String, List&amp;lt;Composer&amp;gt;&amp;gt; getOneSection(int index) {  
         String[] titles =  
         {  
                 &quot;Maharashtra&quot;,  
                 &quot;Gujarat&quot;,  
                 &quot;Jammu&quot;,  
                 &quot;Punjab&quot;  
         };  
         Composer[][] composerss =  
         {  
                 {  
                         new Composer(&quot;Amravati&quot;, &quot;2,607,160&quot;),  
                         new Composer(&quot;Aurangabad&quot;, &quot;2,897,103&quot;),  
                         new Composer(&quot;Khandala&quot;, &quot;21,043&quot;),  
                         new Composer(&quot;Mumbai&quot;, &quot;11,914,398&quot;),  
                         new Composer(&quot;Nagpur&quot;, &quot;2,420,000&quot;),  
                         new Composer(&quot;Pune&quot;, &quot;4,485,000&quot;),  
                 },  
                 {  
                         new Composer(&quot;Ahmedabad&quot;, &quot;3,913,793&quot;),  
                         new Composer(&quot;Surat&quot;, &quot;3,344,135&quot;),  
                         new Composer(&quot;Vadodara&quot;, &quot;1,513,758&quot;),  
                         new Composer(&quot;Rajkot&quot;, &quot;1,395,026&quot;),  
                         new Composer(&quot;Gandhinagar&quot;, &quot;271,331&quot;),  
                         new Composer(&quot;Bhavnagar&quot;, &quot;600,594&quot;),  
                 },  
                 {  
                         new Composer(&quot;Kathua&quot;, &quot;550,084&quot;),  
                         new Composer(&quot;Jammu&quot;, &quot;1,343,756&quot;),  
                         new Composer(&quot;Samba&quot;, &quot;245,016&quot;),  
                         new Composer(&quot;Udhampur&quot;, &quot;475,068&quot;),  
                         new Composer(&quot;Reasi&quot;, &quot;268,441&quot;),  
                         new Composer(&quot;Rajouri&quot;, &quot;483,284&quot;),  
                 },  
                 {  
                         new Composer(&quot;Amritsar&quot;, &quot;1,183,705&quot;),  
                         new Composer(&quot;Firozpur&quot;, &quot;110,091&quot;),  
                         new Composer(&quot;Ludhiana&quot;, &quot;1,613,878&quot;),  
                         new Composer(&quot;Chandigarh&quot;, &quot;27,704,236&quot;),  
                         new Composer(&quot;Jalandhar &quot;, &quot;873,725&quot;),  
                         new Composer(&quot;Patiala&quot;, &quot;445,196&quot;),  
                 },  
         };  
         return new Pair&amp;lt;String, List&amp;lt;Composer&amp;gt;&amp;gt;(titles[index], Arrays.asList(composerss[index]));  
     }  
 }  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;b&gt;Code : Composer.java&lt;/b&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-family: arial; height: 300px; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; package com.sks.demo.custom_list;  
 public class Composer {  
     public static final String TAG = Composer.class.getSimpleName();  
     public String name;  
     public String year;  
     public Composer(String name, String year) {  
         this.name = name;  
         this.year = year;  
     }  
 }  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Now Create Custom List &amp;amp; Adapter&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Create New Package&amp;nbsp;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;com.sks.demo.custom_list.list&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Create new class&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;SKSCustomListAdapter.java&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Write code for&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;SKSCustomListAdapter.java&lt;br /&gt;&lt;br /&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-family: arial; height: 300px; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; package com.sks.demo.custom_list.list;  
 import android.view.View;  
 import android.view.ViewGroup;  
 import android.widget.AbsListView;  
 import android.widget.AbsListView.OnScrollListener;  
 import android.widget.BaseAdapter;  
 import android.widget.SectionIndexer;  
 public abstract class SKSCustomListAdapter extends BaseAdapter implements SectionIndexer, OnScrollListener {  
     public static final String TAG = SKSCustomListAdapter.class.getSimpleName();  
     public interface HasMorePagesListener {  
         void noMorePages();  
         void mayHaveMorePages();  
     }  
     /**  
      * The &amp;lt;em&amp;gt;current&amp;lt;/em&amp;gt; page, not the page that is going to be loaded.  
      */  
     int page = 1;  
     int initialPage = 1;  
     boolean automaticNextPageLoading = false;  
     HasMorePagesListener hasMorePagesListener;  
     void setHasMorePagesListener(HasMorePagesListener hasMorePagesListener) {  
         this.hasMorePagesListener = hasMorePagesListener;  
     }  
   /**  
    * Pinned header state: don&#39;t show the header.  
    */  
   public static final int PINNED_HEADER_GONE = 0;  
   /**  
    * Pinned header state: show the header at the top of the list.  
    */  
   public static final int PINNED_HEADER_VISIBLE = 1;  
   /**  
    * Pinned header state: show the header. If the header extends beyond  
    * the bottom of the first shown element, push it up and clip.  
    */  
   public static final int PINNED_HEADER_PUSHED_UP = 2;  
   /**  
    * Computes the desired state of the pinned header for the given  
    * position of the first visible list item. Allowed return values are  
    * {@link #PINNED_HEADER_GONE}, {@link #PINNED_HEADER_VISIBLE} or  
    * {@link #PINNED_HEADER_PUSHED_UP}.  
    */  
   public int getPinnedHeaderState(int position) {  
       if (position &amp;lt; 0 || getCount() == 0) {  
           return PINNED_HEADER_GONE;  
       }  
       // The header should get pushed up if the top item shown  
       // is the last item in a section for a particular letter.  
       int section = getSectionForPosition(position);  
       int nextSectionPosition = getPositionForSection(section + 1);  
       if (nextSectionPosition != -1 &amp;amp;&amp;amp; position == nextSectionPosition - 1) {  
           return PINNED_HEADER_PUSHED_UP;  
       }  
       return PINNED_HEADER_VISIBLE;  
   }  
   /**  
    * Sets the initial page when {@link #resetPage()} is called.  
    * Default is 1 (for APIs with 1-based page number).  
    */  
   public void setInitialPage(int initialPage) {  
         this.initialPage = initialPage;  
     }  
   /**  
    * Resets the current page to the page specified in {@link #setInitialPage(int)}.  
    */  
   public void resetPage() {  
       this.page = this.initialPage;  
   }  
   /**  
    * Increases the current page number.  
    */  
   public void nextPage() {  
       this.page++;  
   }  
     @Override  
     public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {  
         if (view instanceof SKSCustomListView) {  
             ((SKSCustomListView) view).configureHeaderView(firstVisibleItem);  
         }  
     }  
     @Override  
     public void onScrollStateChanged(AbsListView view, int scrollState) {  
         // nop  
     }  
     @Override  
     public final View getView(int position, View convertView, ViewGroup parent) {  
         View res = getAmazingView(position, convertView, parent);  
         if (position == getCount() - 1 &amp;amp;&amp;amp; automaticNextPageLoading) {  
             onNextPageRequested(page + 1);  
         }  
         final int section = getSectionForPosition(position);  
         boolean displaySectionHeaders = (getPositionForSection(section) == position);  
         bindSectionHeader(res, position, displaySectionHeaders);  
         return res;  
     }  
     public void notifyNoMorePages() {  
         automaticNextPageLoading = false;  
         if (hasMorePagesListener != null) hasMorePagesListener.noMorePages();  
     }  
     public void notifyMayHaveMorePages() {  
         automaticNextPageLoading = true;  
         if (hasMorePagesListener != null) hasMorePagesListener.mayHaveMorePages();  
     }  
     /**  
      * The last item on the list is requested to be seen, so do the request   
      * and call {@link SKSCustomListView#tellNoMoreData()} if there is no more pages.  
      *   
      * @param page the page number to load.  
      */  
     protected abstract void onNextPageRequested(int page);  
     /**  
      * Configure the view (a listview item) to display headers or not based on displaySectionHeader   
      * (e.g. if displaySectionHeader header.setVisibility(VISIBLE) else header.setVisibility(GONE)).  
      */  
     protected abstract void bindSectionHeader(View view, int position, boolean displaySectionHeader);  
     /**  
      * read: get view too  
      */  
     public abstract View getAmazingView(int position, View convertView, ViewGroup parent);  
   /**  
    * Configures the pinned header view to match the first visible list item.  
    *  
    * @param header pinned header view.  
    * @param position position of the first visible list item.  
    * @param alpha fading of the header view, between 0 and 255.  
    */  
   public abstract void configurePinnedHeader(View header, int position, int alpha);  
     @Override  
     public abstract int getPositionForSection(int section);  
     @Override  
     public abstract int getSectionForPosition(int position);  
     @Override  
     public abstract Object[] getSections();  
 }  
&lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Create new Class&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&amp;nbsp;SKSCustomListView.java&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Write code for&amp;nbsp;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;SKSCustomListView.java&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-family: arial; height: 300px; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; package com.sks.demo.custom_list.list;  
 import android.content.Context;  
 import android.graphics.Canvas;  
 import android.util.AttributeSet;  
 import android.view.View;  
 import android.widget.ListAdapter;  
 import android.widget.ListView;  
 import com.sks.demo.custom_list.list.SKSCustomListAdapter.HasMorePagesListener;  
 /**  
  * A ListView that maintains a header pinned at the top of the list. The pinned  
  * header can be pushed up and dissolved as needed.  
  *   
  * It also supports pagination by setting a custom view as the loading  
  * indicator.  
  */  
 public class SKSCustomListView extends ListView implements HasMorePagesListener {  
     View listFooter;  
     boolean footerViewAttached = false;  
     private View mHeaderView;  
     private boolean mHeaderViewVisible;  
     private int mHeaderViewWidth;  
     private int mHeaderViewHeight;  
     private SKSCustomListAdapter adapter;  
     public void setPinnedHeaderView(View view) {  
         mHeaderView = view;  
         // Disable vertical fading when the pinned header is present  
         // TODO change ListView to allow separate measures for top and bottom  
         // fading edge;  
         // in this particular case we would like to disable the top, but not the  
         // bottom edge.  
         if (mHeaderView != null) {  
             setFadingEdgeLength(0);  
         }  
         requestLayout();  
     }  
     @Override  
     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {  
         super.onMeasure(widthMeasureSpec, heightMeasureSpec);  
         if (mHeaderView != null) {  
             measureChild(mHeaderView, widthMeasureSpec, heightMeasureSpec);  
             mHeaderViewWidth = mHeaderView.getMeasuredWidth();  
             mHeaderViewHeight = mHeaderView.getMeasuredHeight();  
         }  
     }  
     @Override  
     protected void onLayout(boolean changed, int left, int top, int right, int bottom) {  
         super.onLayout(changed, left, top, right, bottom);  
         if (mHeaderView != null) {  
             mHeaderView.layout(0, 0, mHeaderViewWidth, mHeaderViewHeight);  
             configureHeaderView(getFirstVisiblePosition());  
         }  
     }  
     public void configureHeaderView(int position) {  
         if (mHeaderView == null) {  
             return;  
         }  
         int state = adapter.getPinnedHeaderState(position);  
         switch (state) {  
         case SKSCustomListAdapter.PINNED_HEADER_GONE: {  
             mHeaderViewVisible = false;  
             break;  
         }  
         case SKSCustomListAdapter.PINNED_HEADER_VISIBLE: {  
             adapter.configurePinnedHeader(mHeaderView, position, 255);  
             if (mHeaderView.getTop() != 0) {  
                 mHeaderView.layout(0, 0, mHeaderViewWidth, mHeaderViewHeight);  
             }  
             mHeaderViewVisible = true;  
             break;  
         }  
         case SKSCustomListAdapter.PINNED_HEADER_PUSHED_UP: {  
             View firstView = getChildAt(0);  
             if (firstView != null) {  
                 int bottom = firstView.getBottom();  
                 int headerHeight = mHeaderView.getHeight();  
                 int y;  
                 int alpha;  
                 if (bottom &amp;lt; headerHeight) {  
                     y = (bottom - headerHeight);  
                     alpha = 255 * (headerHeight + y) / headerHeight;  
                 } else {  
                     y = 0;  
                     alpha = 255;  
                 }  
                 adapter.configurePinnedHeader(mHeaderView, position, alpha);  
                 if (mHeaderView.getTop() != y) {  
                     mHeaderView.layout(0, y, mHeaderViewWidth, mHeaderViewHeight + y);  
                 }  
                 mHeaderViewVisible = true;  
             }  
             break;  
         }  
         }  
     }  
     @Override  
     protected void dispatchDraw(Canvas canvas) {  
         super.dispatchDraw(canvas);  
         if (mHeaderViewVisible) {  
             drawChild(canvas, mHeaderView, getDrawingTime());  
         }  
     }  
     public SKSCustomListView(Context context) {  
         super(context);  
     }  
     public SKSCustomListView(Context context, AttributeSet attrs) {  
         super(context, attrs);  
     }  
     public SKSCustomListView(Context context, AttributeSet attrs, int defStyle) {  
         super(context, attrs, defStyle);  
     }  
     public void setLoadingView(View listFooter) {  
         this.listFooter = listFooter;  
     }  
     public View getLoadingView() {  
         return listFooter;  
     }  
     @Override  
     public void setAdapter(ListAdapter adapter) {  
         if (!(adapter instanceof SKSCustomListAdapter)) {  
             throw new IllegalArgumentException(SKSCustomListView.class.getSimpleName() + &quot; must use adapter of type &quot;  
                     + SKSCustomListAdapter.class.getSimpleName());  
         }  
         // previous adapter  
         if (this.adapter != null) {  
             this.adapter.setHasMorePagesListener(null);  
             this.setOnScrollListener(null);  
         }  
         this.adapter = (SKSCustomListAdapter) adapter;  
         ((SKSCustomListAdapter) adapter).setHasMorePagesListener(this);  
         this.setOnScrollListener((SKSCustomListAdapter) adapter);  
         View dummy = new View(getContext());  
         super.addFooterView(dummy);  
         super.setAdapter(adapter);  
         super.removeFooterView(dummy);  
     }  
     @Override  
     public SKSCustomListAdapter getAdapter() {  
         return adapter;  
     }  
     @Override  
     public void noMorePages() {  
         if (listFooter != null) {  
             this.removeFooterView(listFooter);  
         }  
         footerViewAttached = false;  
     }  
     @Override  
     public void mayHaveMorePages() {  
         if (!footerViewAttached &amp;amp;&amp;amp; listFooter != null) {  
             this.addFooterView(listFooter);  
             footerViewAttached = true;  
         }  
     }  
     public boolean isLoadingViewVisible() {  
         return footerViewAttached;  
     }  
 }  
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Finally We reach to create our&amp;nbsp;Start-up Activity named as &lt;b&gt;&lt;span style=&quot;color: #20124d;&quot;&gt;CustomListDemoActivity.java&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;In main package i.e. com.sks.demo.custom_list Create new Activity&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: #20124d;&quot;&gt;CustomListDemoActivity.java&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Write code for&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: #20124d;&quot;&gt;CustomListDemoActivity.java&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Code :&amp;nbsp;
&lt;span style=&quot;color: #20124d;&quot;&gt;CustomListDemoActivity.java&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-family: arial; height: 300px; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; package com.sks.demo.custom_list;  
 import java.util.List;  
 import android.app.Activity;  
 import android.content.Context;  
 import android.os.Bundle;  
 import android.util.Log;  
 import android.util.Pair;  
 import android.view.LayoutInflater;  
 import android.view.View;  
 import android.view.ViewGroup;  
 import android.widget.AdapterView;  
 import android.widget.AdapterView.OnItemClickListener;  
 import android.widget.TextView;  
 import com.sks.demo.custom_list.list.SKSCustomListAdapter;  
 import com.sks.demo.custom_list.list.SKSCustomListView;  
 public class CustomListDemoActivity extends Activity {  
     SKSCustomListView lsComposer;  
     SectionComposerAdapter adapter;  
     Context context;  
     /** Called when the activity is first created. */  
     @Override  
     public void onCreate(Bundle savedInstanceState) {  
         super.onCreate(savedInstanceState);  
         setContentView(R.layout.main);  
         context = getParent();  
     }  
     @Override  
     protected void onStart() {  
         super.onStart();  
         initializedView();  
         setupFunctionality();  
         setupListeners();  
     }  
     private void initializedView() {  
         lsComposer = (SKSCustomListView) findViewById(R.id.list_services);  
     }  
     private void setupFunctionality() {  
         lsComposer.setPinnedHeaderView(LayoutInflater.from(this).inflate(R.layout.item_composer_header, lsComposer, false));  
         lsComposer.setAdapter(adapter = new SectionComposerAdapter());  
         lsComposer.setOnItemClickListener(new OnItemClickListener() {  
             @Override  
             public void onItemClick(AdapterView&amp;lt;?&amp;gt; parent, View view, int position, long id) {  
                 // Intent intent = new Intent(CustomListDemoActivity.this,  
                 // ServiceDestailsScreen.class);  
                 String name, address, title;  
                 title = ((TextView) view.findViewById(R.id.list_section_header)).getText().toString();  
                 name = ((TextView) view.findViewById(R.id.list_section_title1)).getText().toString();  
                 address = ((TextView) view.findViewById(R.id.list_section_title2)).getText().toString();  
                 // intent.putExtra(&quot;serviceName&quot;, title);  
                 // intent.putExtra(&quot;name&quot;, name);  
                 // intent.putExtra(&quot;address&quot;, address);  
                 Log.v(Util.TAG, &quot;Name : &quot; + name);  
                 Log.v(Util.TAG, &quot;Address : &quot; + address);  
                 Log.v(Util.TAG, &quot;Title: &quot; + title);  
                 // getParent().startActivity(intent);  
             }  
         });  
     }  
     private void setupListeners() {  
         // titleBack.setOnClickListener(this);  
     }  
     class SectionComposerAdapter extends SKSCustomListAdapter {  
         List&amp;lt;Pair&amp;lt;String, List&amp;lt;Composer&amp;gt;&amp;gt;&amp;gt; all = Data.getAllData();  
         @Override  
         public int getCount() {  
             int res = 0;  
             for (int i = 0; i &amp;lt; all.size(); i++) {  
                 res += all.get(i).second.size();  
             }  
             return res;  
         }  
         @Override  
         public Composer getItem(int position) {  
             int c = 0;  
             for (int i = 0; i &amp;lt; all.size(); i++) {  
                 if (position &amp;gt;= c &amp;amp;&amp;amp; position &amp;lt; c + all.get(i).second.size()) {  
                     return all.get(i).second.get(position - c);  
                 }  
                 c += all.get(i).second.size();  
             }  
             return null;  
         }  
         @Override  
         public long getItemId(int position) {  
             return position;  
         }  
         @Override  
         protected void onNextPageRequested(int page) {  
         }  
         @Override  
         protected void bindSectionHeader(View view, int position, boolean displaySectionHeader) {  
             if (displaySectionHeader) {  
                 view.findViewById(R.id.list_section_header).setVisibility(View.VISIBLE);  
                 TextView lSectionTitle = (TextView) view.findViewById(R.id.list_section_header);  
                 lSectionTitle.setText(getSections()[getSectionForPosition(position)]);  
             } else {  
                 TextView lSectionTitle = (TextView) view.findViewById(R.id.list_section_header);  
                 lSectionTitle.setText(getSections()[getSectionForPosition(position)]);  
                 view.findViewById(R.id.list_section_header).setVisibility(View.GONE);  
             }  
         }  
         @Override  
         public View getAmazingView(int position, View convertView, ViewGroup parent) {  
             View res = convertView;  
             if (res == null)  
                 res = getLayoutInflater().inflate(R.layout.item_composer, null);  
             TextView lName = (TextView) res.findViewById(R.id.list_section_title1);  
             TextView lYear = (TextView) res.findViewById(R.id.list_section_title2);  
             Composer composer = getItem(position);  
             lName.setText(composer.name);  
             lYear.setText(&quot;Population : &quot; + composer.year);  
             return res;  
         }  
         @Override  
         public void configurePinnedHeader(View header, int position, int alpha) {  
             TextView lSectionHeader = (TextView) header;  
             lSectionHeader.setText(getSections()[getSectionForPosition(position)]);  
             // lSectionHeader.setBackgroundColor(alpha &amp;lt;&amp;lt; 24 | (0xbbffbb));  
             // lSectionHeader.setTextColor(alpha &amp;lt;&amp;lt; 24 | (0x000000));  
         }  
         @Override  
         public int getPositionForSection(int section) {  
             if (section &amp;lt; 0)  
                 section = 0;  
             if (section &amp;gt;= all.size())  
                 section = all.size() - 1;  
             int c = 0;  
             for (int i = 0; i &amp;lt; all.size(); i++) {  
                 if (section == i) {  
                     return c;  
                 }  
                 c += all.get(i).second.size();  
             }  
             return 0;  
         }  
         @Override  
         public int getSectionForPosition(int position) {  
             int c = 0;  
             for (int i = 0; i &amp;lt; all.size(); i++) {  
                 if (position &amp;gt;= c &amp;amp;&amp;amp; position &amp;lt; c + all.get(i).second.size()) {  
                     return i;  
                 }  
                 c += all.get(i).second.size();  
             }  
             return -1;  
         }  
         @Override  
         public String[] getSections() {  
             String[] res = new String[all.size()];  
             for (int i = 0; i &amp;lt; all.size(); i++) {  
                 res[i] = all.get(i).first;  
             }  
             return res;  
         }  
     }  
 }  
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Make sure the changes in &lt;span style=&quot;color: #20124d;&quot;&gt;&lt;b&gt;AndroidMenifest.xml&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Code : AndroidMenifest.xml&lt;/b&gt;&lt;br /&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-family: arial; height: 300px; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;  
 &amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;  
   package=&quot;com.sks.demo.custom_list&quot;  
   android:versionCode=&quot;1&quot;  
   android:versionName=&quot;1.0&quot; &amp;gt;  
   &amp;lt;uses-sdk android:minSdkVersion=&quot;8&quot; /&amp;gt;  
   &amp;lt;application  
     android:icon=&quot;@drawable/ic_launcher&quot;  
     android:label=&quot;@string/app_name&quot; &amp;gt;  
     &amp;lt;activity  
       android:name=&quot;.CustomListDemoActivity&quot;  
       android:label=&quot;@string/app_name&quot; &amp;gt;  
       &amp;lt;intent-filter&amp;gt;  
         &amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;  
         &amp;lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&amp;gt;  
       &amp;lt;/intent-filter&amp;gt;  
     &amp;lt;/activity&amp;gt;  
   &amp;lt;/application&amp;gt;  
 &amp;lt;/manifest&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Finally Code writing work has been complete. Start compiling Android project.&lt;/li&gt;
&lt;li&gt;Run the project.&lt;/li&gt;
&lt;li&gt;Result will be like below&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-H9MgoVMmCvQ/T1CLJwo-GBI/AAAAAAAAAKM/iEvz6W77jsU/s1600/device-2012-03-02-111316.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://2.bp.blogspot.com/-H9MgoVMmCvQ/T1CLJwo-GBI/AAAAAAAAAKM/iEvz6W77jsU/s320/device-2012-03-02-111316.png&quot; width=&quot;179&quot; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://3.bp.blogspot.com/-Nf3MFv-DqJs/T1CLV1qQRNI/AAAAAAAAAKU/288cPtF6pNQ/s1600/device-2012-03-02-111332.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://3.bp.blogspot.com/-Nf3MFv-DqJs/T1CLV1qQRNI/AAAAAAAAAKU/288cPtF6pNQ/s320/device-2012-03-02-111332.png&quot; width=&quot;179&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;ul&gt;
&lt;/ul&gt;
&lt;/ol&gt;
Download Source Code and &amp;nbsp;Installer Apk&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;http://code.google.com/p/smartphone-app-by-sachin-shelke/downloads/detail?name=CustomListDemo.zip&amp;amp;can=2&amp;amp;q=&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-LKv76Gbhc1k/T1CM6WE7wsI/AAAAAAAAAKc/oGzUadqirR8/s1600/download-now_smal.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
SVN Repository&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;a href=&quot;http://smartphone-app-by-sachin-shelke.googlecode.com/svn/trunk/&quot; target=&quot;_blank&quot;&gt;http://smartphone-app-by-sachin-shelke.googlecode.com/svn/trunk/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b style=&quot;color: #4c1130; font-family: Verdana, sans-serif;&quot;&gt;Enjoy the Code and do not forget to leave comments.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/4679183774643003828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/4679183774643003828?isPopup=true' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/4679183774643003828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/4679183774643003828'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2012/03/custom-listview-with-separator-and.html' title='Custom ListView With Separator and Section in Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-H9MgoVMmCvQ/T1CLJwo-GBI/AAAAAAAAAKM/iEvz6W77jsU/s72-c/device-2012-03-02-111316.png" height="72" width="72"/><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-1408835877771594251</id><published>2012-02-23T14:38:00.001+05:30</published><updated>2012-02-23T14:38:38.745+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Blend 4"/><category scheme="http://www.blogger.com/atom/ns#" term="Design Guideline"/><category scheme="http://www.blogger.com/atom/ns#" term="Expression Blend"/><category scheme="http://www.blogger.com/atom/ns#" term="Smartphone"/><category scheme="http://www.blogger.com/atom/ns#" term="win"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Mango"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone 7"/><title type='text'>Windows Phone 7 Design Guidelines – Cheat Sheet</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;Navigation, frames and pages&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Mockup the pages and navigational map of your application and walk through them several times before coding. This will minimize or eliminate the need to add pages or change the map later, when it will be much harder.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Make sure to consider the back button and user interactions with the application bar when creating your navigation map.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;Application Bar&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Use the application bar button for common application tasks.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;You are limited to four application bar buttons.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Place less frequently performed actions in the application bar menu.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;If the action is difficult to clearly convey with an icon, place it in the application bar menu instead of as a button.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;You are limited to five application bar menu items to prevent scrolling.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Standard application bar icons are installed as part of the Windows Phone Developer tools. Find them at C:\Program Files\Microsoft SDKs\Windows Phone\v7.0\Icons&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Custom application bar icons should be 48 x 48 pixels and use a white foreground on a transparent background. You do not need the circle in the icon, as this is drawn by the application bar.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;Back button&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Pressing the back button from the first screen of an application must exit the application.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Pressing the back button must return the application to the previous page.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;If the current page displays a context menu or a dialog, the pressing the Back button must close the menu or dialog and cancel the backward navigation to the previous page.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;You should only implement back button behaviors that navigate back or dismiss context menus or modal dialog boxes. All other implementations are prohibited.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;Screen orientations&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Portrait is the default application view-you must add code to support landscape view&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;If an application supports landscape it cannot specify only left or only right landscape views – both views must be supported.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;Application icon&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Application icon should be 62 x 62 pixels and PNG format.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;Tiles and tile notification&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Tile images should PNG format and measure 173 pixels by 173 pixels at 256 dpi&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Make sure to change&amp;nbsp;&lt;strong&gt;Build Action&lt;/strong&gt;&amp;nbsp;for images to&amp;nbsp;&lt;strong&gt;Content&lt;/strong&gt;&amp;nbsp;when you add them to Visual Studio.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;Themes&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Avoid using too much white in applications, such as white backgrounds, as this may have an impact on battery life for devices that have organic LED displays.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;If the foreground or background color of a control is explicitly set, verify that the content is visible in both dark and light themes. If the set color is not visible, also explicitly set the background or foreground color to maintain contrast or choose a more appropriate color.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;Application settings&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Application actions that overwrite or delete data, or are irreversible must have a “Cancel” button.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;When using additional screens with commit and cancel buttons, clicking those buttons should perform the associated action and return the user to the main settings screen.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;Touch input&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;All basic or common tasks should be completed using a single finger.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Touch controls should respond to touch immediately. A touch control that lags or that seems slow when transitioning will have a negative impact on the user experience.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;For time consuming processes, developers should provide feedback to indicate that something is happening by using content to indicate progress, or consider using a progress bar or raw notification as a last resort. For example, show more and more of the content as it is being downloaded.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;The touch and hold gesture should generally be used to display a context menu or options page for an item.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;On-screen keyboard&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;You should set the InputScope property for a text box or other edit controls to define the keyboard type and enable the appropriate typing aides. For example, if you choose the URL input scope, a keyboard layout will be shown featuring a .com key.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;Canvas/Grid for layout&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Canvas uses a pixel-based layout and can provide better layout performance than the grid control for deeply embedded or nested controls in for applications that do not change orientations.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Grid control is the best choice when the application frame needs to grow, shrink, or rotate.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;Panorama control/pivot considerations&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Both panorama and pivot controls provide horizontal navigation through phone content, enabling the user to flick and pan as necessary.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Use panorama elements as the starting point for more detailed experiences.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Use a pivot control to filter large data sets, providing a view of multiple data sets, or to provide a way to switch between different views of the same data.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Do not use the pivot control for task-based navigation, like in a wizard application.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Use for vertical scrolling through a list or grid in panorama sections is acceptable as long as it is within the confines of the section and is not in parallel with a horizontal scroll.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Never place a pivot control inside of another pivot control.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Never place a pivot control inside of a panorama control.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Applications should minimize the number of pivot pages.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;The Pivot control should only be used to display items or data of similar type.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;Text guidelines&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Use fonts other than Segoe sparingly&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Avoid using font sizes that are smaller than 15 points in size.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Maintain consistent capitalization practices to prevent a disjointed or jagged reading experience.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;The title bar application title should be all capitals.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;User all lower case letters for most other application text including page titles, list titles, etc.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;Enjoy Windows Phone 7 Development.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b style=&quot;color: #3d85c6; font-family: Arial, Helvetica, sans-serif; line-height: 18px;&quot;&gt;All the Best&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: xx-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;Source : &lt;a href=&quot;http://blogs.msdn.com/b/silverlight_sdk/archive/2011/01/07/windows-phone-7-design-guidelines-cheat-sheet.aspx&quot; target=&quot;_blank&quot;&gt;Windows MSDN&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/1408835877771594251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/1408835877771594251?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/1408835877771594251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/1408835877771594251'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2012/02/windows-phone-7-design-guidelines-cheat.html' title='Windows Phone 7 Design Guidelines – Cheat Sheet'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-2700109002315808045</id><published>2012-01-10T15:05:00.000+05:30</published><updated>2012-01-11T11:11:13.428+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="mistake"/><category scheme="http://www.blogger.com/atom/ns#" term="UserControl"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone 7"/><category scheme="http://www.blogger.com/atom/ns#" term="wp7 Custom Control"/><title type='text'>7 Mistakes Developers make when implementing Windows Phone Custom Controls</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: -webkit-auto;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Generally, Custom Controls are skinable, themable and reusable controls that once created can be used by simply loading the assembly in any project.&amp;nbsp; All controls that are used in Silverlight for Windows Phone 7 (eg., Button, TextBlock, ListBox) and UserControl are also&amp;nbsp;&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;Custom Controls&lt;/strong&gt;. Usually Custom Controls inherit from&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.controls.control%28v=vs.95%29.aspx&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;Control&lt;/a&gt;,&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol%28v=vs.95%29.aspx&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;ItemsControl&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.controls.contentcontrol%28v=VS.95%29.aspx&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;ContentControl&lt;/a&gt;, etc.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
NOTE: You can also take a look at the following article for reference:&amp;nbsp;&lt;a href=&quot;http://www.windowsphonegeek.com/articles/Creating-a-WP7-Custom-Control-in-7-Steps&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;Creating a WP7 Custom Control in 7 Steps&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: #565656; font-size: small; font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;Mistake #1: Wrong choice of whether to implement a Custom Control or a UserControl&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Generally when talking about Windows Phone controls you have two options: either to implement a&amp;nbsp;&lt;em&gt;&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;User Control&lt;/strong&gt;&lt;/em&gt;&amp;nbsp;or a&amp;nbsp;&lt;em&gt;&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;Custom Control&lt;/strong&gt;.&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; style=&quot;color: black; font-family: &#39;Times New Roman&#39;; width: 616px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;314&quot;&gt;&lt;div style=&quot;color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;User Control:&lt;/strong&gt;&amp;nbsp;a reusable control that combines existing controls and can implement its own logic.&amp;nbsp; User-Controls can be reused but&amp;nbsp; cannot be skinned or themed.&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;300&quot;&gt;&lt;div style=&quot;color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;Custom Control:&lt;/strong&gt;&amp;nbsp;skinable, themable and reusable controls that once created can be used by simply loading the assembly in any project.&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;314&quot;&gt;&lt;div style=&quot;color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Good for static layout&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;300&quot;&gt;&lt;div style=&quot;color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Good for dynamic layout&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;314&quot;&gt;&lt;div style=&quot;color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Easier to create&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;300&quot;&gt;&lt;div style=&quot;color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Harder to create&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;314&quot;&gt;&lt;div style=&quot;color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Usually used to compose a set of existing controls&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;300&quot;&gt;&lt;div style=&quot;color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Usually used to create a new control&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;314&quot;&gt;&lt;div style=&quot;color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Usually used to allow reusability on a larger scale&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;300&quot;&gt;&lt;div style=&quot;color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Usually used to allow reusability on a smaller scale&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;314&quot;&gt;&lt;div style=&quot;color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Provides less flexibility&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;300&quot;&gt;&lt;div style=&quot;color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Provides greater flexibility (ex: the control template can be replaced with a completely different one)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;314&quot;&gt;&lt;div style=&quot;color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Does not require&amp;nbsp; too much knowledge of Silverlight UI model&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;300&quot;&gt;&lt;div style=&quot;color: #606060; font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Requires better understanding of Silverlight UI model&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;em&gt;Example1: Correct choice&amp;nbsp; of using Custom Control&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;em&gt;Control Description&lt;/em&gt;: We want our control to :&lt;/div&gt;
&lt;ul style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px; text-decoration: none;&quot;&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;contain a collection of items&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;expose ItemsSource&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;be easily reusable&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;allow automatic sorting, filtering,etc. based on some condition&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;have multiple Views/States, i.e. FullScreen mode, Minimized mode, Standard mode, etc.&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;allow item selection&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;expose custom properties&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;be fully customizable&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;em&gt;Control Usage&lt;/em&gt;: We will use this control multiple times in our application and in several other applications.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;em&gt;Our Comment&lt;/em&gt;: In this case we would suggest that you implement a Custom Control that derives from ListBox or optionally directly from ItemsControl. The control will be compiled into a separate assembly (.dll) so that it can be easily reused in other applications as well.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;em&gt;Example2: Incorrect choice of using Custom Control&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;em&gt;Control Description&lt;/em&gt;: We want our control to:&lt;/div&gt;
&lt;ul style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px; text-decoration: none;&quot;&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;have ListBox which will be automatically sorting, filtering,etc based on some condition. For example Button click.&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;consists of a ListBox, two Buttons and a TextBlock&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;exposes several custom properties&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;not necessarily provide great flexibility in appearance customization&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;em&gt;Control Usage&lt;/em&gt;: We will use this control only a couple of times in a single application.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;em&gt;Our Comment&lt;/em&gt;: In this case we would suggest that you implement a UserControl instead of Custom Control because you will use it only a couple of&amp;nbsp; times in the same project and it will be easier to implement the desired functionality in code behind rather than trying to implement a Custom Control from scratch.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: #565656; font-size: small; font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;Mistake #2: Deriving from an inappropriate base class&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
When implementing a Custom Control you need to derive from an appropriate base type . Here are some suggestions:&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol%28v=vs.95%29.aspx&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;ItemsControl&lt;/a&gt;: When you want to implement a control that has multiple items usually using the ItemsControl is a good choice.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.controls.contentcontrol%28v=VS.95%29.aspx&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;ContentControl&lt;/a&gt;: When you want to implement a control that displays a single element (through the Content property), possibly using different templates.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.controls.listbox%28v=vs.95%29.aspx&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;ListBox&lt;/a&gt;: When you want to implement a selectable ItemsControl&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.controls.control%28v=vs.95%29.aspx&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;Control&lt;/a&gt;: When there is no other suitable type to derive from.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Controls such as&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.controls.button%28v=VS.95%29.aspx&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;Button&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.controls.checkbox%28v=VS.95%29.aspx&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;CheckBox&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.controls.scrollviewer%28v=VS.95%29.aspx&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;ScrollViewer&lt;/a&gt;, etc.: When you want to implement a specific type of control and need some of the properties/method of the parent control.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: #565656; font-size: small; font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;Mistake #3: Forgetting to set DefaultStyleKey in the constructor&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
It is very important not to forget to set the DefaultStyleKey in the constructor of your custom control.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;em&gt;NOTE&lt;/em&gt;: DefaultStyleKey gets or sets the key that references the default style for the control.&lt;/div&gt;
&lt;div style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; line-height: normal;&quot;&gt;
&lt;div class=&quot;syntaxhighlighter  csharp&quot; id=&quot;highlighter_633897&quot; style=&quot;background-color: white !important; font-size: 1em !important; margin-bottom: 1em !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 1em !important; overflow-x: auto !important; overflow-y: auto !important; position: relative !important; width: 632px;&quot;&gt;
&lt;div class=&quot;toolbar&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: rgb(108, 226, 108) !important; background-image: initial !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-color: initial !important; border-color: initial !important; border-image: initial !important; border-left-style: none !important; border-left-width: 0px !important; border-right-style: none !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-style: none !important; border-top-width: 0px !important; border-width: initial !important; bottom: auto !important; box-sizing: content-box !important; color: white !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 10px !important; height: 11px !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: absolute !important; right: 1px !important; text-align: left !important; top: 1px !important; vertical-align: baseline !important; width: 11px !important; z-index: 10 !important;&quot;&gt;
&lt;span style=&quot;color: #ababab; font: normal normal normal 11px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;a class=&quot;toolbar_item command_help help&quot; href=&quot;http://www.windowsphonegeek.com/articles/7-Mistakes-Developer-make-when-implementing-Windows-Phone-Custom-Controls#&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: white !important; display: block !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 1px !important; position: static !important; right: auto !important; text-align: center !important; text-decoration: none !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;?&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: 632px;&quot;&gt;&lt;tbody style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;
&lt;tr style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&lt;td class=&quot;gutter&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
1&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
2&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
3&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
4&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
5&lt;/div&gt;
&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
6&lt;/div&gt;
&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
7&lt;/div&gt;
&lt;/td&gt;&lt;td class=&quot;code&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: 596px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: relative !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;
&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;csharp keyword&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;public&lt;/code&gt; &lt;code class=&quot;csharp keyword&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;class&lt;/code&gt; &lt;code class=&quot;csharp plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;MyCustomControl : ContentControl&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;csharp plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;csharp spaces&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp keyword&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;public&lt;/code&gt; &lt;code class=&quot;csharp plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;MyCustomControl()&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;csharp spaces&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;csharp spaces&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;DefaultStyleKey = &lt;/code&gt;&lt;code class=&quot;csharp keyword&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;typeof&lt;/code&gt;&lt;code class=&quot;csharp plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;(MyCustomControl);&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;csharp spaces&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;csharp plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: #565656; font-size: small; font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;Mistake #4: Control theme(default Style) in the wrong place&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
This is one of the most common mistakes that we have seen. In short the base structure of a Custom Control is:&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
MyCustomControl.cs + Themes/generic.xaml&lt;/div&gt;
&lt;ul style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px; text-decoration: none;&quot;&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;MyCustomControl.cs&lt;/strong&gt;: place the C#/VB code here&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;Themes/generic.xaml&lt;/strong&gt;: place the UI here&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px; text-decoration: none;&quot;&gt;&lt;em&gt;NOTE&lt;/em&gt;: You must&amp;nbsp; create a Themes folder(the name is very important) and place the generic.xaml there&lt;/ul&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;em&gt;&lt;a href=&quot;http://www.windowsphonegeek.com/upload/articles/42-2_2.png&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;&lt;img align=&quot;left&quot; alt=&quot;42-2&quot; border=&quot;0&quot; height=&quot;244&quot; src=&quot;http://www.windowsphonegeek.com/upload/articles/42-2_thumb.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: inline; float: left; margin-bottom: 10px; margin-left: 0px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; title=&quot;42-2&quot; width=&quot;208&quot; /&gt;&lt;/a&gt;&lt;/em&gt;For now in Silverlight for Windows Phone Mango there is no suitable VisualStudio Template for adding a XAML file or ResourceDictionary&amp;nbsp; as a file in your project. So in order to add generic.xaml file you can create a new Class by choosing Add-&amp;gt;NewItems-&amp;gt;Class&amp;nbsp; and rename it to&amp;nbsp;&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;generic.xaml&lt;/strong&gt;.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;em&gt;NOTE&lt;/em&gt;: The name is important!&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;em&gt;NOTE&lt;/em&gt;:It is very important that you remember to set the generic.xaml file&#39;s build action to&amp;nbsp;&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;Resource&lt;/strong&gt;. This is necessary in order&amp;nbsp; to make sure that the template is packed in the same assembly as the control otherwise the template wont be available.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: #565656; font-size: small; font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;Mistake #5: generic.xaml defined or used in a wrong way&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;em&gt;Example1: Correct&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px; text-decoration: none;&quot;&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;Themes/generic.xaml&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;Build Action: Resource&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;ResourceDictionary without any x:Key or x:Name&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;include&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;code&gt;xmlns:vsm&lt;code&gt;=&lt;/code&gt;&lt;code&gt;&quot;clr-namespace:System.Windows;assembly=System.Windows&quot;&amp;nbsp;&lt;/code&gt;&lt;code&gt;if using any VisualStates&lt;/code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;em&gt;Example2: Incorrect&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px; text-decoration: none;&quot;&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;/generic.xaml&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;Build Action: Content&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;ResourceDictionary with x:Key or x:Name&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: #565656; font-size: small; font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;Mistake #6: Wrong Style&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
The default style and the ControlTemplate of the custom control determine how the control will look like.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
When creating the default style(theme) of a Custom Control it is very important to consider the following things:&lt;/div&gt;
&lt;ul style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px; text-decoration: none;&quot;&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;You must define a valid ControlTemplate&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;Add a valid TargetType&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;No x:Key&lt;/li&gt;
&lt;li style=&quot;list-style-type: disc; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; margin-top: 0px;&quot;&gt;No x:Name&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;em&gt;Example1: Correct Style&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; line-height: normal;&quot;&gt;
&lt;div class=&quot;syntaxhighlighter  xml&quot; id=&quot;highlighter_11334&quot; style=&quot;background-color: white !important; font-size: 1em !important; margin-bottom: 1em !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 1em !important; overflow-x: auto !important; overflow-y: auto !important; position: relative !important; width: 632px;&quot;&gt;
&lt;div class=&quot;toolbar&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: rgb(108, 226, 108) !important; background-image: initial !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-color: initial !important; border-color: initial !important; border-image: initial !important; border-left-style: none !important; border-left-width: 0px !important; border-right-style: none !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-style: none !important; border-top-width: 0px !important; border-width: initial !important; bottom: auto !important; box-sizing: content-box !important; color: white !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 10px !important; height: 11px !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: absolute !important; right: 1px !important; text-align: left !important; top: 1px !important; vertical-align: baseline !important; width: 11px !important; z-index: 10 !important;&quot;&gt;
&lt;span style=&quot;color: #ababab; font: normal normal normal 11px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;a class=&quot;toolbar_item command_help help&quot; href=&quot;http://www.windowsphonegeek.com/articles/7-Mistakes-Developer-make-when-implementing-Windows-Phone-Custom-Controls#&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: white !important; display: block !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 1px !important; position: static !important; right: auto !important; text-align: center !important; text-decoration: none !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;?&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: 644px;&quot;&gt;&lt;tbody style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;
&lt;tr style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&lt;td class=&quot;gutter&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
1&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
2&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
3&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
4&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
5&lt;/div&gt;
&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
6&lt;/div&gt;
&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
7&lt;/div&gt;
&lt;div class=&quot;line number8 index7 alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
8&lt;/div&gt;
&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
9&lt;/div&gt;
&lt;/td&gt;&lt;td class=&quot;code&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: 608px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: relative !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;
&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;lt;&lt;/code&gt;&lt;code class=&quot;xml keyword&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Style&lt;/code&gt; &lt;code class=&quot;xml color1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: gray !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;TargetType&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;=&lt;/code&gt;&lt;code class=&quot;xml string&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: blue !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&quot;local:MyCustomControl&quot;&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;xml spaces&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;lt;&lt;/code&gt;&lt;code class=&quot;xml keyword&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Setter&lt;/code&gt; &lt;code class=&quot;xml color1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: gray !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Property&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;=&lt;/code&gt;&lt;code class=&quot;xml string&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: blue !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&quot;Template&quot;&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;xml spaces&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;lt;&lt;/code&gt;&lt;code class=&quot;xml keyword&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Setter.Value&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;xml spaces&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;lt;&lt;/code&gt;&lt;code class=&quot;xml keyword&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;ControlTemplate&lt;/code&gt; &lt;code class=&quot;xml color1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: gray !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;TargetType&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;=&lt;/code&gt;&lt;code class=&quot;xml string&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: blue !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&quot;local:MyCustomControl&quot;&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;xml spaces&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;..&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;xml spaces&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;lt;/&lt;/code&gt;&lt;code class=&quot;xml keyword&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;ControlTemplate&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;xml spaces&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;lt;/&lt;/code&gt;&lt;code class=&quot;xml keyword&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Setter.Value&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number8 index7 alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;xml spaces&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;lt;/&lt;/code&gt;&lt;code class=&quot;xml keyword&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Setter&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;lt;/&lt;/code&gt;&lt;code class=&quot;xml keyword&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Style&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
where local is your new Custom Control namespace for example:&lt;/div&gt;
&lt;div style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; line-height: normal;&quot;&gt;
&lt;div class=&quot;syntaxhighlighter  xml&quot; id=&quot;highlighter_645812&quot; style=&quot;background-color: white !important; font-size: 1em !important; margin-bottom: 1em !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 1em !important; overflow-x: auto !important; overflow-y: auto !important; position: relative !important; width: 632px;&quot;&gt;
&lt;div class=&quot;toolbar&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: rgb(108, 226, 108) !important; background-image: initial !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-color: initial !important; border-color: initial !important; border-image: initial !important; border-left-style: none !important; border-left-width: 0px !important; border-right-style: none !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-style: none !important; border-top-width: 0px !important; border-width: initial !important; bottom: auto !important; box-sizing: content-box !important; color: white !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 10px !important; height: 11px !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: absolute !important; right: 1px !important; text-align: left !important; top: 1px !important; vertical-align: baseline !important; width: 11px !important; z-index: 10 !important;&quot;&gt;
&lt;span style=&quot;color: #ababab; font: normal normal normal 11px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;a class=&quot;toolbar_item command_help help&quot; href=&quot;http://www.windowsphonegeek.com/articles/7-Mistakes-Developer-make-when-implementing-Windows-Phone-Custom-Controls#&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: white !important; display: block !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 1px !important; position: static !important; right: auto !important; text-align: center !important; text-decoration: none !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;?&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: 632px;&quot;&gt;&lt;tbody style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;
&lt;tr style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&lt;td class=&quot;gutter&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-right-width: 3px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 0.5em !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;&lt;td class=&quot;code&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: 596px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: relative !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;
&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: white !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;xmlns:local=&quot;clr-namespace:CustomControlSample&quot;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;em&gt;Example2: Incorrect Style&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Here is an example of incorrectly defined Style.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;a href=&quot;http://www.windowsphonegeek.com/upload/articles/114-0_2.png&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;&lt;img alt=&quot;114-0&quot; border=&quot;0&quot; height=&quot;259&quot; src=&quot;http://www.windowsphonegeek.com/upload/articles/114-0_thumb.png&quot; style=&quot;background-image: none; border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-top-style: none; border-top-width: 0px; border-width: initial; display: inline; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; title=&quot;114-0&quot; width=&quot;604&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: #565656; font-size: small; font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;Mistake #7: Using Binding instead of TemplateBinding&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
TemplateBinding links the value of a property in a control template to be the value of a property on the templated custom control!&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;em&gt;Example1: Correct&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;a href=&quot;http://www.windowsphonegeek.com/upload/articles/114-1_2.png&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;&lt;img alt=&quot;114-1&quot; border=&quot;0&quot; height=&quot;202&quot; src=&quot;http://www.windowsphonegeek.com/upload/articles/114-1_thumb.png&quot; style=&quot;background-image: none; border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-top-style: none; border-top-width: 0px; border-width: initial; display: inline; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; title=&quot;114-1&quot; width=&quot;504&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong style=&quot;font: normal normal bold 14px/normal Arial, Helvetica, sans-serif;&quot;&gt;&lt;em&gt;Example2: Incorrect&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;a href=&quot;http://www.windowsphonegeek.com/upload/articles/114-2_5.png&quot; style=&quot;color: #1caedd; text-decoration: none;&quot;&gt;&lt;img alt=&quot;114-2&quot; border=&quot;0&quot; height=&quot;200&quot; src=&quot;http://www.windowsphonegeek.com/upload/articles/114-2_thumb_1.png&quot; style=&quot;background-image: none; border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-top-style: none; border-top-width: 0px; border-width: initial; display: inline; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; title=&quot;114-2&quot; width=&quot;504&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
In this article I talked about 7 common mistakes that developers make when implementing a Custom Control in Silverlight for Windows Phone.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
I hope that the post was helpful.&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 12px/normal Arial, Helvetica, sans-serif; line-height: 1.5em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a class=&quot;twitter-share-button&quot; data-related=&quot;sk_shelke&quot; data-via=&quot;sk_shelke&quot; href=&quot;https://twitter.com/share&quot;&gt;Tweet&lt;/a&gt;&amp;nbsp;&lt;script&gt;
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/2700109002315808045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/2700109002315808045?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/2700109002315808045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/2700109002315808045'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2012/01/7-mistakes-developers-make-when.html' title='7 Mistakes Developers make when implementing Windows Phone Custom Controls'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-7777125091106000483</id><published>2011-11-10T15:23:00.000+05:30</published><updated>2011-11-10T15:23:14.319+05:30</updated><title type='text'>Soap Request in android</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px;&quot;&gt;Well you need to understand what a soap request is made of:.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;smallfont&quot; style=&quot;background-color: #f5f5ff; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font: normal normal normal 11px/normal verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; margin-bottom: 2px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: -webkit-auto; text-decoration: none;&quot;&gt;
Code:&lt;/div&gt;
&lt;pre class=&quot;alt2&quot; dir=&quot;ltr&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f5f5ff; background-image: initial; background-origin: initial; border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-style: initial; border-top-style: inset; border-top-width: 1px; font-size: 13px; height: 170px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-decoration: none; width: 640px;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;
&amp;lt;soap:Envelope xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot;&amp;gt;
  &amp;lt;soap:Header&amp;gt;
  &amp;lt;/soap:Header&amp;gt;
  &amp;lt;soap:Body&amp;gt;
    &amp;lt;m:GetStockPrice xmlns:m=&quot;http://www.example.org/stock&quot;&amp;gt;
      &amp;lt;m:StockName&amp;gt;Google&amp;lt;/m:StockName&amp;gt;
    &amp;lt;/m:GetStockPrice&amp;gt;
  &amp;lt;/soap:Body&amp;gt;
&amp;lt;/soap:Envelope&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px;&quot;&gt;The message has a&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: -webkit-auto; text-decoration: none;&quot;&gt;soap:envelope&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;with a&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: -webkit-auto; text-decoration: none;&quot;&gt;soap:header&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;and a&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: -webkit-auto; text-decoration: none;&quot;&gt;soap:body&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;The content type of a soap requests is&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: -webkit-auto; text-decoration: none;&quot;&gt;application/soap-xml&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Now to send a soap request with Android you have to use a URLConnection and 2 streams.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px;&quot;&gt;An inputstream and an outputstream.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #f5f5ff; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; margin-bottom: 20px; margin-left: 20px; margin-right: 20px; margin-top: 5px; text-align: -webkit-auto; text-decoration: none;&quot;&gt;
&lt;div class=&quot;smallfont&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font: normal normal normal 11px/normal verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; margin-bottom: 2px; margin-left: auto; margin-right: auto; margin-top: 0px; text-decoration: none;&quot;&gt;
Code:&lt;/div&gt;
&lt;pre class=&quot;alt2&quot; dir=&quot;ltr&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #e1e4f2; background-image: initial; background-origin: initial; border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-style: initial; border-top-style: inset; border-top-width: 1px; height: 226px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left; text-decoration: none; width: 640px;&quot;&gt;URL u = new URL(url.toString());
URLConnection cnn = u.openConnection();
cnn.setDoOutput(true);
cnn.setDoInput(true);

((HttpURLConnection)cnn).setRequestMethod(&quot;POST&quot;);
cnn.setRequestProperty(&quot;Content-Type&quot;, &quot;application/soap-xml; charset=utf-8&quot;);
cnn.setRequestProperty(&quot;SOAPAction&quot;, method);

OutputStream outStream = cnn.getOutputStream();
outStream.write(soapXML);

InputStream in = cnn.getInputStream();&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px;&quot;&gt;You need to open the URLConnection.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px;&quot;&gt;You set the requestMethod to POST.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px;&quot;&gt;You set the content-type to application/soap-xml.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px;&quot;&gt;You set a SOAPAction header to the method you want to use. (This is not shown on the previous example which I have from wikipedia.)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px;&quot;&gt;You write the soapXml envelope to the outputstream.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px;&quot;&gt;You read the response from the inputstream.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;You can parse the response with an XmlParser if you want to.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;I have combined the send and receive code into a class called Webservice. And I made a class called SoapMessage to handle the construction of a Soap envelope.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Then I send the SoapMessage using the send method of the Webservice class and I add an OnReceiveListener to wait for the response.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;This is not the most sophisticated method and probably not the most complete method to send and receive Soap messages but it works in android 2.2 perfectly. As SAX Parser not getting proper response.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: x-small;&quot;&gt;SAX Parser example coming soon in next Post&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif;&quot;&gt;source :&amp;nbsp;&lt;/span&gt;http://androidforums.com/developer-101/233069-how-create-weservice-client-android.html&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/7777125091106000483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/7777125091106000483?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/7777125091106000483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/7777125091106000483'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/11/soap-request-in-android.html' title='Soap Request in android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-3649108031554573105</id><published>2011-10-03T17:03:00.001+05:30</published><updated>2011-10-03T17:03:20.557+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>How to Create MD5 Hashed Code in Android</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Dear Blog Viewer,&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h1 id=&quot;s2&quot; style=&quot;margin-bottom: 1em; margin-left: 0em; margin-right: 0px; margin-top: 0em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: #147ad6;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;What is the MD5 hash?&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;The MD5 hash also known as checksum for a file is a 128-bit value,
something like a fingerprint of the file. There is a very small possibility of
getting two identical hashes of two different files. This feature can be useful
both for comparing the files and their integrity control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;Let us imagine a situation that will help to understand how the MD5 hash
works.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;Alice and Bob have two similar huge files. How do we know that they are
different without sending them to each other? We simply have to calculate the
MD5 hashes of these files and compare them.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt; margin-left: 0cm; margin-right: 0cm; margin-top: 24pt;&quot;&gt;
&lt;span style=&quot;color: #0066cc;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;MD5 Hash Properties&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;The MD5 hash consists of a small amount of binary data, typically no
more than 128 bits. All hash values share the following properties:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt; text-indent: 36pt;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Hash length&lt;/span&gt;&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;The length of the hash value is determined by the type of the used
algorithm, and its length does not depend on the size of the file. The most
common hash value lengths are either 128 or 160 bits.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt; text-indent: 36pt;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Non-discoverability&lt;/span&gt;&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;Every pair of nonidentical files will translate into a completely
different hash value, even if the two files differ only by a single bit. Using
today&#39;s technology, it is not possible to discover a pair of files that
translate to the same hash value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt; text-indent: 36pt;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Repeatability&lt;/span&gt;&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;Each time a particular file is hashed using the same algorithm, the exact
same hash value will be produced.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt; text-indent: 36pt;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Irreversibility&lt;/span&gt;&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;All hashing algorithms are one-way. Given a checksum value, it is
infeasible to discover the password. In fact, none of the properties of the
original message can be determined given the checksum value alone.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt; margin-left: 0cm; margin-right: 0cm; margin-top: 12pt;&quot;&gt;
&lt;span style=&quot;color: #147ad6;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;The algorithm was
invented by:&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small; font-weight: normal;&quot;&gt;Professor Ronald L. Rivest (born 1947, Schenectady, New York) is a
cryptographer, and is the Viterbi Professor of Computer Science at MIT&#39;s
Department of Electrical Engineering and Computer Science. He is most celebrated
for his work on public-key&amp;nbsp;encryption with Len Adleman&amp;nbsp;and Adi
Shamir, specifically the RSA&amp;nbsp;algorithm, for which they won the
2002&amp;nbsp;ACM&amp;nbsp;Turing Award.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 13.5pt; font-weight: bold;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; font-size: 1em; line-height: normal; margin-bottom: 0.0001pt; margin-left: 0cm; margin-right: 0cm; margin-top: 12pt;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #147ad6; font-size: 13.5pt;&quot;&gt;Simple
Code for Android:&lt;/span&gt;&lt;span style=&quot;color: #147ad6; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #147ad6; font-size: 1em; line-height: normal; margin-bottom: 0.0001pt; margin-left: 0cm; margin-right: 0cm; margin-top: 12pt;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #147ad6; font-size: 13.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt; String
md5Digest(&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt; String text)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: small;&quot;&gt;

&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;&quot;&gt;try&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;//
Create MD5 Hash&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;MessageDigest
digest = java.security.MessageDigest.&lt;i&gt;getInstance&lt;/i&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&quot;MD5&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;digest.update(text.getBytes());&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;&quot;&gt;byte&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt; messageDigest[] = digest.digest();&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;//
Create Hex String&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;StringBuffer
hexString = &lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt; StringBuffer();&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt; messageDigestLenght = messageDigest.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt; i = 0;
i &amp;lt; messageDigestLenght; i++)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;String
hashedData = Integer.&lt;i&gt;toHexString&lt;/i&gt;(0xFF &amp;amp; messageDigest[i]);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt; (hashedData.length() &amp;lt; 2)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;hashedData
= &lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&quot;0&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt; + hashedData;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;hexString.append(hashedData);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt; hexString.toString();&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}
&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt; (NoSuchAlgorithmException e)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;e.printStackTrace();&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;; // if text is null then return nothing&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/h1&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/3649108031554573105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/3649108031554573105?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/3649108031554573105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/3649108031554573105'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/10/how-to-create-md5-hashed-code-in.html' title='How to Create MD5 Hashed Code in Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-4664831796167879127</id><published>2011-09-20T12:55:00.003+05:30</published><updated>2011-09-20T12:55:34.472+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>How to Change Tab Name from Activity in Android</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Tabs in the Android work with TabWidgets.&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Contained in the tabwidget are relative layouts for each of your tabs which each contain an imageview and a textview.&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 18px;&quot;&gt;Tab index will start from 0 and to access the Tab Contents use the following steps.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
For Example. if you want to access title of tab&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mTabHost.getTabWidget().getChildAt(0).findViewById(android.R.id.title);&lt;/span&gt;&lt;/span&gt;&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 18px;&quot;&gt;the above statement will provide the view (TextView) at this position.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 18px;&quot;&gt;change the text of Tab&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;TextView v = ((TextView)mTabHost.getTabWidget().getChildAt(0).findViewById(android.R.id.title));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;v.setText(&quot;My New Title&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 18px;&quot;&gt;Congratulations.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 18px;&quot;&gt;Your text of tab is changed.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/4664831796167879127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/4664831796167879127?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/4664831796167879127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/4664831796167879127'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/09/how-to-change-tab-name-from-activity-in.html' title='How to Change Tab Name from Activity in Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-7126853692406690191</id><published>2011-09-14T11:24:00.001+05:30</published><updated>2011-09-14T11:24:39.193+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>How to Convert InputStream to String In Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Here is the Simple method to convert InputStream Object to String Object.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Just Call this method and pass InputStream Object. it return the String&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;codecolorer-container java vibrant&quot; style=&quot;overflow: auto; white-space: nowrap; width: 100%;&quot;&gt;
&lt;div class=&quot;java codecolorer&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;String&lt;/span&gt; convertStreamToString&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;InputStream&lt;/span&gt; is&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;throws&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;Exception&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw3&quot;&gt;BufferedReader&lt;/span&gt; reader &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;BufferedReader&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;InputStreamReader&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; StringBuilder sb &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;new&lt;/span&gt; StringBuilder&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3Astring+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;String&lt;/span&gt;&lt;/a&gt; line &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;line &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; reader.&lt;span class=&quot;me1&quot;&gt;readLine&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sb.&lt;span class=&quot;me1&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;line&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; is.&lt;span class=&quot;me1&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; sb.&lt;span class=&quot;me1&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;java codecolorer&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/7126853692406690191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/7126853692406690191?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/7126853692406690191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/7126853692406690191'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/09/how-to-convert-inputstream-to-string-in.html' title='How to Convert InputStream to String In Java'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-2887925516450288645</id><published>2011-09-13T10:49:00.002+05:30</published><updated>2011-09-13T10:49:31.327+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>How to get Multiple Select List-Box in PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre&gt;&lt;span class=&quot;syntax10&quot;&gt;&lt;b style=&quot;color: #073763;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;Multiple ListBox in HTML will send the array of selected item. &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;syntax10&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;syntax10&quot;&gt;&lt;span style=&quot;color: red; font-family: Arial,Helvetica,sans-serif;&quot;&gt;Sample PHP Code to access the Multiple Selected List-Box Values.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;syntax10&quot;&gt;&lt;span style=&quot;color: red; font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;gt;&lt;/span&gt;List&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;Box&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;Form&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;Data&lt;span class=&quot;syntax10&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;gutterH&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;     &amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;h3&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;gt;&lt;/span&gt;List&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;Box&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;Form&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;Data&lt;span class=&quot;syntax10&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;h3&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;     &amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;gt;&lt;/span&gt;Form&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;data&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;passed&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;from&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;the&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;form&lt;span class=&quot;syntax10&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;syntax10&quot;&gt;    &amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax6&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;_POST&lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;
&lt;span class=&quot;gutterH&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax6&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;listbox&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;_POST&lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;listbox&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;values&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;_POST&lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;listmultiple&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax6&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;listmultiple&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax6&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;(&lt;span class=&quot;syntax8&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;values&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax6&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;a&lt;/span&gt;)&lt;span class=&quot;syntax11&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax6&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;gutterH&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax6&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;syntax125&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;syntax3&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax126&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;gutter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/2887925516450288645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/2887925516450288645?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/2887925516450288645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/2887925516450288645'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/09/how-to-get-multiple-select-list-box-in.html' title='How to get Multiple Select List-Box in PHP'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-7383687286848072486</id><published>2011-09-09T13:22:00.002+05:30</published><updated>2012-04-10T12:54:27.760+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>How to find Android Unique Device ID or UDID - Part 1</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Here is the Simple Statement to find Android Device ID which return a String.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #20124d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;String udid =&amp;nbsp;Secure.getString(getContentResolver(), Secure.ANDROID_ID)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Please Note :&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;ANDROID_ID is&amp;nbsp;a 64-bit number (as a hex string) that is RANDOMLY GENERATED on the device&#39;s first boot and should remain constant for the lifetime of the device.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;(The value may change if a factory reset is performed on the device.)&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
Source : Android Documentation&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/7383687286848072486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/7383687286848072486?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/7383687286848072486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/7383687286848072486'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/09/how-to-find-android-unique-device-id-or.html' title='How to find Android Unique Device ID or UDID - Part 1'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-6925664932330101732</id><published>2011-07-27T11:38:00.000+05:30</published><updated>2011-07-27T11:38:39.116+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>How to Install Android SDK</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: red; font-size: large;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span class=&quot;mw-headline&quot; id=&quot;General_Instructions&quot;&gt;General Instructions&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;/span&gt;&lt;h3 style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Prepare_your_computer&quot;&gt;Prepare your Computer&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;li&gt;&lt;span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Make&lt;/span&gt; sure your system meets the &lt;/span&gt;&lt;a class=&quot;external text&quot; href=&quot;http://developer.android.com/sdk/requirements.html&quot; rel=&quot;nofollow&quot;&gt;minimum requirements&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Make&lt;/span&gt; sure you have installed the &lt;/span&gt;&lt;a class=&quot;external text&quot; href=&quot;http://java.sun.com/javase/downloads/index.jsp&quot; rel=&quot;nofollow&quot;&gt;Java Development Kit&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;(Optional) Install &lt;a class=&quot;external text&quot; href=&quot;http://www.eclipse.org/downloads/&quot; rel=&quot;nofollow&quot;&gt;Eclipse IDE&lt;/a&gt; &lt;ul&gt;&lt;li&gt;&lt;i&gt;Eclipse classic is recommended.&lt;/i&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h3 style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Download_the_SDK_Starter_Package&quot;&gt;&lt;span&gt;Download the &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; Starter Package&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;i&gt;&lt;span&gt;The &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; starter package is not a full development environment—it includes only the core &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; Tools, which you can use to download the rest of the &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt;&lt;span&gt; components (such as the latest &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; platform).&lt;/span&gt;&lt;/span&gt;&lt;/i&gt; &lt;/div&gt;&lt;ul style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;li&gt;Download the latest &lt;a class=&quot;external text&quot; href=&quot;http://developer.android.com/sdk/index.html&quot; rel=&quot;nofollow&quot;&gt;&lt;span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; Starter Package&lt;/span&gt;&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;h3 style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;.28Optional.29_Install_ADT_Plug-in_for_Eclipse&quot;&gt;(Optional) Install ADT Plug-in for Eclipse&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;li&gt;If you use Eclipse, download the &lt;a class=&quot;external text&quot; href=&quot;http://developer.android.com/sdk/eclipse-adt.html#installing&quot; rel=&quot;nofollow&quot;&gt;ADT Plug-in&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;h3 style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Download_platforms_and_other_components&quot;&gt;Download platforms and other components&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;li&gt;&lt;b&gt;Eclipse&lt;/b&gt;&lt;span&gt;&lt;span&gt;: Select Window » &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; &lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; and AVD Manager &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Windows&lt;/b&gt;&lt;span&gt;: Double-click the &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt;&lt;span&gt; Manager.exe file at the root of the &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; &lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; directory &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Mac or Linux&lt;/b&gt;&lt;span&gt;&lt;span&gt;: Open a terminal and navigate to the /tools directory in the &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; &lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt;, then execute &lt;/span&gt;&lt;code&gt;&lt;span&gt;./&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;h4 style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Available_Components&quot;&gt;Available Components&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span&gt;By default, there are two repositories of components for your &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt;: &lt;/span&gt;&lt;b&gt;&lt;span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; Repository&lt;/span&gt;&lt;/b&gt; and &lt;b&gt;Third party Add-ons&lt;/b&gt;. &lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span&gt;The &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; Repository offers these components: &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border-left: 0.2em solid rgb(60, 171, 178); font-family: Arial,Helvetica,sans-serif; margin-left: 0.5em; padding-left: 0.5em;&quot;&gt; &lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; Tools&lt;/span&gt;&lt;/b&gt;&lt;span&gt;&lt;span&gt; (pre-installed in the &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; &lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt;  starter package) — Contains tools for debugging and testing your  application and other utility tools. You can access these in the &amp;lt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;sdk&lt;/span&gt;&amp;gt;/tools/ directory of your &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; and read more about them in the Tools section of the developer guide. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; Platform-tools&lt;/span&gt;&lt;/b&gt;&lt;span&gt;&lt;span&gt; — Contains tools that are required to develop and debug your application, but which are developed alongside the &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt;  platform in order to support the latest features. These tools are  typically updated only when a new platform becomes available. You can  access these in the &amp;lt;&lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;sdk&lt;/span&gt;&amp;gt;/platform-tools/ directory. Read more about them in the Tools section of the developer guide. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; platforms&lt;/span&gt;&lt;/b&gt;&lt;span&gt; — An &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt;&lt;span&gt; platform is available for every production &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; platform deployable to &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt;-powered devices. Each platform component includes a fully compliant &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt;  library and system image, sample code, emulator skins, and any version  specific tools. For detailed information about each platform, see the  overview documents available under the section &quot;Downloadable &lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; Components,&quot; at left. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;USB Driver for Windows&lt;/b&gt;&lt;span&gt; (Windows only) —  Contains driver files that you can install on your Windows computer, so  that you can run and debug your applications on an actual device. You do  not need the USB driver unless you plan to debug your application on an  actual &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt;-powered device. If you develop on Mac OS X or Linux, you do not need a special driver to debug your application on an &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt;-powered device. (See Developing on a Device for more information about developing on a real device.) &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Samples&lt;/b&gt;&lt;span&gt;&lt;span&gt; — Contains the sample code and apps available for each &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; development platform. If you are just getting started with &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; development, &lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;make&lt;/span&gt;&lt;span&gt; sure to download the samples to your &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt;. &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Documentation&lt;/b&gt;&lt;span&gt; — Contains a local copy of the latest multiversion documentation for the &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; framework API. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;h2 style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;OS_Specific_Instructions&quot;&gt;OS Specific Instructions&lt;/span&gt;&lt;/h2&gt;&lt;h3 style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Linux&quot;&gt;Linux&lt;/span&gt;&lt;/h3&gt;&lt;h4 style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;ArchLinux&quot;&gt;ArchLinux&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;border-left: 0.2em solid rgb(60, 171, 178); font-family: Arial,Helvetica,sans-serif; margin-left: 0.5em; padding-left: 0.5em;&quot;&gt; &lt;span&gt;&lt;span&gt;The package &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;-&lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;sdk&lt;/span&gt; is included in AUR. No further changes are needed. &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h4 style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Gentoo_Linux&quot;&gt;Gentoo Linux&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;border-left: 0.2em solid rgb(60, 171, 178); font-family: Arial,Helvetica,sans-serif; margin-left: 0.5em; padding-left: 0.5em;&quot;&gt; &lt;ol&gt;&lt;li&gt;&lt;span&gt;&lt;span&gt;emerge dev-util/&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;-&lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;sdk&lt;/span&gt;-update-manager &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;span&gt;run /opt/&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;-&lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;sdk&lt;/span&gt;&lt;span&gt;-update-manager/tools/&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;install platform-tools package &lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;ADB&lt;/span&gt;&lt;span&gt; will be at /opt/&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;sdk&lt;/span&gt;&lt;span&gt;-update-manager/platform-tools/&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;adb&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Edit your .bashrc file and add this line:&lt;br /&gt;
&lt;dl&gt;&lt;dd&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;export PATH=&quot;/opt/&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;-&lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;sdk&lt;/span&gt;-update-manager/platform-tools/:${PATH}&quot;&lt;/span&gt;&lt;/code&gt; &lt;/dd&gt;&lt;/dl&gt;&lt;/li&gt;&lt;br /&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;h4 style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Ubuntu_Linux&quot;&gt;Ubuntu Linux&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;border-left: 0.2em solid rgb(60, 171, 178); font-family: Arial,Helvetica,sans-serif; margin-left: 0.5em; padding-left: 0.5em; text-align: left;&quot;&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt; Follow the General Instructions above. &lt;/li&gt;
&lt;li&gt;Setup udev. &lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;h3 style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Mac_OS_X&quot;&gt;Mac OS X&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;border-left: 0.2em solid rgb(60, 171, 178); font-family: Arial,Helvetica,sans-serif; margin-left: 0.5em; padding-left: 0.5em;&quot;&gt; &lt;h4&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Installing_the_Android_SDK&quot;&gt;&lt;span&gt;&lt;span&gt;Installing the &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; &lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;ol&gt;&lt;li&gt;Download the latest version of the &lt;a class=&quot;external text&quot; href=&quot;http://developer.android.com/sdk/&quot; rel=&quot;nofollow&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; &lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Unzip it and move it where needed&lt;br /&gt;
&lt;dl&gt;&lt;dd&gt;&lt;code&gt;&lt;span&gt;unzip Downloads/&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;-sdk_r09-mac_86.zip -d~/bin&lt;/span&gt;&lt;/code&gt; &lt;/dd&gt;&lt;/dl&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Open Terminal.app (in /Applications/Utilities) &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Edit ~/.profile and append&lt;br /&gt;
&lt;dl&gt;&lt;dd&gt;&lt;code&gt;&lt;span&gt;export PATH=~/bin/&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;-sdk_r09-mac_86/platform-tools:~/bin/&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;-sdk_r09-mac_86/tools:$PATH&lt;/span&gt;&lt;/code&gt; &lt;/dd&gt;&lt;/dl&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Load new .profile&lt;br /&gt;
&lt;dl&gt;&lt;dd&gt;&lt;code&gt;source .profile&lt;/code&gt; &lt;/dd&gt;&lt;/dl&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;&lt;span&gt;&lt;span&gt;Run &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; &lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; Manager &lt;/span&gt;&lt;br /&gt;
&lt;dl&gt;&lt;dd&gt;&lt;code&gt;&lt;span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; &lt;/dd&gt;&lt;/dl&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Install Components &lt;/li&gt;&lt;br /&gt;
&lt;/ol&gt;&lt;h4&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Installing_Eclipse&quot;&gt;Installing Eclipse&lt;/span&gt;&lt;/h4&gt;&lt;ol&gt;&lt;li&gt;Download the latest version of &lt;a class=&quot;external text&quot; href=&quot;http://www.eclipse.org/downloads/&quot; rel=&quot;nofollow&quot;&gt;Eclipse&lt;/a&gt; (Classic or Java Developers are probably best) &lt;/li&gt;
&lt;li&gt;Open Terminal.app (in /Applications/Utilities) &lt;/li&gt;
&lt;li&gt;Unzip it and move it where needed.&lt;br /&gt;
&lt;dl&gt;&lt;dd&gt;&lt;code&gt;tar -zxvf Downloads/eclipse-java-helios-SR1-macosx-cocoa-x86_64.tar.gz&lt;/code&gt; &lt;/dd&gt;&lt;/dl&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Optional:&lt;/b&gt; Add to PATH. Edit ~/.profile and append &lt;code&gt;export PATH=[eclipse folder]:$PATH&lt;/code&gt; then reload &lt;code&gt;source .profile&lt;/code&gt;. &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Open Eclipse. &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;&lt;span&gt;&lt;span&gt;Open Preferences, go to &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt;. Set your &lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; location. Click OK. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Go to Help » Install New Software. &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Click Add. &lt;ul&gt;&lt;li&gt;Name: &lt;b&gt;Google ADT&lt;/b&gt; &lt;/li&gt;
&lt;li&gt;Location: &lt;b&gt;&lt;span&gt;https://dl-ssl.google.com/&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;/eclipse/&lt;/span&gt;&lt;/b&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Install pieces that you want. &lt;/li&gt;&lt;br /&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;h3 style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Windows&quot;&gt;Windows&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;border-left: 0.2em solid rgb(60, 171, 178); font-family: Arial,Helvetica,sans-serif; margin-left: 0.5em; padding-left: 0.5em;&quot;&gt; &lt;ol&gt;&lt;li&gt;Download the latest &lt;a class=&quot;external text&quot; href=&quot;http://developer.android.com/sdk/index.html&quot; rel=&quot;nofollow&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; &lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; (preferably the zip file not the exe). &lt;/li&gt;
&lt;li&gt;Unzip the package to the root of C:\.&lt;br /&gt;
&lt;dl&gt;&lt;dd&gt;&lt;b&gt;NOTE:&lt;/b&gt;&lt;span&gt;&lt;span&gt; This will output a folder called &quot;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;-&lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;sdk&lt;/span&gt;-windows&quot;. &lt;/span&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;&lt;span&gt;&lt;span&gt;Open up the &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;-&lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;sdk&lt;/span&gt;-windows folder and launch the &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; Manager. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;&lt;span&gt;When you launch the &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt;&lt;span&gt; Manager for the first time it will ask for which packages to install. The only package we are concerned with at this time is &quot;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; &lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; Platform-tools, revision 6&quot;. You can reject all the others if you are not interested in them. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;&lt;span&gt;&lt;span&gt;Once that is finished, you will need to install the USB drivers included with the &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; &lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt;. &lt;/span&gt;&lt;ol&gt;&lt;li&gt;Click on&quot;Available Packages&quot; on the left. &lt;/li&gt;
&lt;li&gt;Expand &quot;Third party Add-ons&quot;. &lt;/li&gt;
&lt;li&gt;Expand &quot;Google Inc. add-ons&quot;. &lt;/li&gt;
&lt;li&gt;Check &quot;Google USB Driver package, revision 4&quot;. &lt;/li&gt;
&lt;li&gt;Installed Selected. &lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;&lt;span&gt;Once that&#39;s finished installing, you can close the &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;SDK&lt;/span&gt; Manager. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Go to the Control Panel, and select the &lt;b&gt;System Properties&lt;/b&gt; (Windows XP) or &lt;b&gt;System&lt;/b&gt; (Windows Vista/7). &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Select the Advanced settings; &lt;ul&gt;&lt;li&gt;&lt;b&gt;Windows XP:&lt;/b&gt; Click on the Advanced tab. &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Windows Vista/7:&lt;/b&gt; Click on Advanced system settings on the left. &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Click on Environment Variables. &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Under the &quot;System variable&quot; section, you will look for &quot;Path&quot;. Double-click on it. &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;In the &quot;Variable values&quot; section, add at the very end the  location of the tools &amp;amp; package-tools folder, with a semicolon  separating these two paths from the rest, e.g.&amp;nbsp;%SystemRoot%&lt;b&gt;&lt;span&gt;&lt;span&gt;;C:\&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;-&lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;sdk&lt;/span&gt;&lt;span&gt;-windows\platform-tools;C:\&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;-&lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;sdk&lt;/span&gt;-windows\tools&lt;/span&gt;&lt;/b&gt;. &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;On the device, ensure that USB Debugging is enabled (Settings » Applications » Development). &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Plug the device into the computer via USB cable. The computer will attempt to install the drivers automatically. &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;On success, open the command prompt on the computer, and type in the following command to sure everything is setup properly:&lt;br /&gt;
&lt;dl&gt;&lt;dd&gt;&lt;code&gt;&lt;span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;adb&lt;/span&gt; devices&lt;/span&gt;&lt;/code&gt; &lt;/dd&gt;&lt;/dl&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;If it lists any devices, everything is fine and you  are finished. If not, the drivers may not be installed correctly, please  continue. &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Open the Device Manager. &lt;ol&gt;&lt;li&gt;Right-click on My Computer (Windows XP) or Computer (Windows Vista/7). &lt;/li&gt;
&lt;li&gt;Click on Manage. &lt;/li&gt;
&lt;li&gt;Click on Device Manager on the left. &lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;&lt;span&gt;You will probably see Unknown Device with &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;ADB&lt;/span&gt; listed under it with a yellow exclamation mark. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;&lt;span&gt;Right-click on &lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;ADB&lt;/span&gt;. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Click on &quot;Update Driver Software&quot;. &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Click on &quot;Browse my computer for driver software&quot;. &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Click on &quot;Let me pick from a list of device drivers on my computer&quot;. &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Click on &quot;Have Disk&quot;. &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Click on &quot;Browse&quot;. &lt;/li&gt;&lt;br /&gt;
&lt;li&gt;&lt;span&gt;&lt;span&gt;Navigate to &quot;C:\&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;android&lt;/span&gt;-&lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;sdk&lt;/span&gt;-windows\extras\google\usb_driver&quot; and select &quot;android_winusb.inf&quot;. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;&lt;span&gt;&lt;span&gt;Click on &quot;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;Android&lt;/span&gt; &lt;/span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;ADB&lt;/span&gt; Interface&quot;. &lt;/span&gt;&lt;br /&gt;
&lt;dl&gt;&lt;dd&gt;&lt;b&gt;NOTE:&lt;/b&gt; You will get an Update Driver Warning, click on &quot;Yes&quot;. &lt;/dd&gt;&lt;/dl&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Once finished installing the driver, open the command  prompt on the computer, and type in the following command to sure  everything is setup properly:&lt;br /&gt;
&lt;dl&gt;&lt;dd&gt;&lt;code&gt;&lt;span&gt;&lt;span class=&quot;terminologydef&quot; style=&quot;cursor: help;&quot;&gt;adb&lt;/span&gt; devices&lt;/span&gt;&lt;/code&gt; &lt;/dd&gt;&lt;/dl&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;If it lists any devices, everything is fine and you  are finished. If not, you may have further issues and will have to do  further research on your own. &lt;/li&gt;&lt;br /&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;source : http://wiki.cyanogenmod.com/wiki/Howto:_Install_the_Android_SDK&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/6925664932330101732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/6925664932330101732?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/6925664932330101732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/6925664932330101732'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/07/how-to-install-android-sdk.html' title='How to Install Android SDK'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-3156879425557710739</id><published>2011-07-27T11:21:00.002+05:30</published><updated>2011-07-27T11:30:12.838+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>The connection to adb is down, and a severe error has occured</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;post-text&quot;&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;b&gt;Try below steps:&lt;/b&gt;&lt;/div&gt;&lt;ol style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;li&gt;Close the Eclipse if running  &lt;/li&gt;
&lt;li&gt;Go to the Android SDK tools directory in Command Prompt&lt;/li&gt;
&lt;li&gt;type &lt;i&gt;&lt;b&gt;&lt;code&gt;adb kill-server&lt;/code&gt;&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;then type &lt;i&gt;&lt;b&gt;&lt;code&gt;adb start-server&lt;/code&gt;&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;No error message is thrown while starting ADB server, then adb is started successfully.&lt;/li&gt;
&lt;li&gt;Now you can start Eclipse again.&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;It worked for me this way, Eclipse should be closed before issuing these commands.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;color: red; font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;b&gt;OR&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;blockquote&gt;Open up the Windows task manager, and kill the process named &lt;i style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;b&gt;adb.exe&lt;/b&gt;&lt;/i&gt;, re-launch the Eclipse.&lt;/blockquote&gt;&lt;br /&gt;
&lt;div style=&quot;color: red;&quot;&gt;&lt;b&gt;OR&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;blockquote&gt;Go to the Folder &lt;i style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;b&gt;\android-sdk\platform-tools&lt;/b&gt;&lt;/i&gt; ;  copy the files and paste into folder &lt;i style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;b&gt;\android-sdk\tools&lt;/b&gt;&lt;/i&gt;  &lt;br /&gt;
Restart the Eclipse&lt;/blockquote&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;source : http://stackoverflow.com/questions/4072706/the-connection-to-adb-is-down-and-a-severe-error-has-occured&lt;/span&gt; &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/3156879425557710739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/3156879425557710739?isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/3156879425557710739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/3156879425557710739'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/07/connection-to-adb-is-down-and-severe.html' title='The connection to adb is down, and a severe error has occured'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-7433635022819252084</id><published>2011-07-19T18:49:00.002+05:30</published><updated>2011-07-19T18:50:12.225+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Credit Card Number Validation</title><content type='html'>&lt;h2 style=&quot;color: red; font-family: Verdana,sans-serif;&quot;&gt;&lt;span class=&quot;mw-headline&quot; id=&quot;Informal_explanation&quot; style=&quot;font-size: small;&quot;&gt;Informal explanation&lt;/span&gt;&lt;/h2&gt;The formula verifies a number against its included check digit, which  is usually appended to a partial account number to generate the full  account number. This account number must pass the following test:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Counting from the check digit, which is the rightmost, and moving left, double the value of every second digit.&lt;/li&gt;
&lt;li&gt;Sum the digits of the products (eg, 10 = 1 + 0 = 1, 14 = 1 + 4 = 5) together with the undoubled digits from the original number.&lt;/li&gt;
&lt;li&gt;If the total &lt;a href=&quot;http://en.wikipedia.org/wiki/Modulo&quot; title=&quot;Modulo&quot;&gt;modulo&lt;/a&gt; 10 is equal to 0 (if the total ends in zero) then the number is valid according to the Luhn formula; else it is not valid.&lt;/li&gt;
&lt;/ol&gt;Assume an example of an account number &quot;4992739871&quot; that will have a check digit added, making it of the form 4992739871x:&lt;br /&gt;
&lt;table class=&quot;wikitable&quot; style=&quot;text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;th&gt;Account number&lt;/th&gt; &lt;td style=&quot;width: 1.5em;&quot;&gt;4&lt;/td&gt; &lt;td style=&quot;width: 1.5em;&quot;&gt;9&lt;/td&gt; &lt;td style=&quot;width: 1.5em;&quot;&gt;9&lt;/td&gt; &lt;td style=&quot;width: 1.5em;&quot;&gt;2&lt;/td&gt; &lt;td style=&quot;width: 1.5em;&quot;&gt;7&lt;/td&gt; &lt;td style=&quot;width: 1.5em;&quot;&gt;3&lt;/td&gt; &lt;td style=&quot;width: 1.5em;&quot;&gt;9&lt;/td&gt; &lt;td style=&quot;width: 1.5em;&quot;&gt;8&lt;/td&gt; &lt;td style=&quot;width: 1.5em;&quot;&gt;7&lt;/td&gt; &lt;td style=&quot;width: 1.5em;&quot;&gt;1&lt;/td&gt; &lt;td style=&quot;width: 1.5em;&quot;&gt;x&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;th&gt;Double every other&lt;/th&gt; &lt;td&gt;4&lt;/td&gt; &lt;td style=&quot;background: #FFA;&quot;&gt;18&lt;/td&gt; &lt;td&gt;9&lt;/td&gt; &lt;td style=&quot;background: #FFA;&quot;&gt;4&lt;/td&gt; &lt;td&gt;7&lt;/td&gt; &lt;td style=&quot;background: #FFA;&quot;&gt;6&lt;/td&gt; &lt;td&gt;9&lt;/td&gt; &lt;td style=&quot;background: #FFA;&quot;&gt;16&lt;/td&gt; &lt;td&gt;7&lt;/td&gt; &lt;td style=&quot;background: #FFA;&quot;&gt;2&lt;/td&gt; &lt;td&gt;x&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;th&gt;Sum together all numbers&lt;/th&gt; &lt;td&gt;64&lt;/td&gt; &lt;td&gt;+ x&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
To make the sum divisible by 10, we set the check digit (x) to 6, making the full account number 49927398716.&lt;br /&gt;
The account number 49927398716 can be validated as follows:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Double every second digit, from the rightmost: (1×2) = 2, (8×2) = 16, (3×2) = 6, (2×2) = 4, (9×2) = 18&lt;/li&gt;
&lt;li&gt;Sum all the &lt;i&gt;individual&lt;/i&gt; digits (digits in parentheses are the products from Step 1): 6 + (2) + 7 + (1+6) + 9 + (6) + 7 + (4) + 9 + (1+8) + 4 = 70&lt;/li&gt;
&lt;li&gt;Take the sum modulo 10: 70 mod 10 = 0; the account number is probably valid.&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red; font-family: Verdana,sans-serif;&quot;&gt;&amp;nbsp;Sample Code to Check Card No.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;public &lt;b&gt;&lt;span style=&quot;color: #4c1130;&quot;&gt;boolean&lt;/span&gt;&lt;/b&gt; luhnCardValidationMethod(String cardNumber) {&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; char[] charArray = cardNumber.toCharArray();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; int[] number = new int[charArray.length];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; int total = 0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 0; i &amp;lt; charArray.length; i++)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; number[i] = Character.getNumericValue(charArray[i]);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = number.length - 2; i &amp;gt; -1; i -= 2)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; number[i] *= 2;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (number[i] &amp;gt; 9)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; number[i] -= 9;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 0; i &amp;lt; number.length; i++)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; total += number[i];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (total % 10 != 0)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #741b47;&quot;&gt;//TODO if total%10 is not Equals to Zero the Card is Invalid&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: #4c1130;&quot;&gt;return&lt;/span&gt;&lt;/b&gt; false;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //TODO Else Card is Valid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #4c1130;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; true;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;Source : http://en.wikipedia.org/wiki/Luhn_algorithm&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #20124d;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Some More Tips to Check Card Number.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;h2 style=&quot;color: red; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;1. Prefix, Length, and Check Digit Criteria &lt;/span&gt;&lt;/h2&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Here is a table outlining the major credit cards that you might want to validate. &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;2&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;td valign=&quot;BOTTOM&quot; width=&quot;148&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;CARD TYPE&lt;/span&gt;&lt;/b&gt; &lt;/td&gt;&lt;td valign=&quot;BOTTOM&quot; width=&quot;86&quot;&gt;&lt;b&gt;Prefix&lt;/b&gt; &lt;/td&gt;&lt;td valign=&quot;BOTTOM&quot; width=&quot;78&quot;&gt;&lt;b&gt;Length&lt;/b&gt; &lt;/td&gt;&lt;td valign=&quot;BOTTOM&quot; width=&quot;120&quot;&gt;&lt;b&gt;Check digit algorithm&lt;/b&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;td width=&quot;148&quot;&gt;MASTERCARD&lt;/td&gt;&lt;td width=&quot;86&quot;&gt;51-55&lt;/td&gt;&lt;td width=&quot;78&quot;&gt;16 &lt;/td&gt;&lt;td width=&quot;120&quot;&gt;mod 10&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;td width=&quot;148&quot;&gt;VISA&lt;/td&gt;&lt;td width=&quot;86&quot;&gt;4&lt;/td&gt;&lt;td width=&quot;78&quot;&gt;13, 16 &lt;/td&gt;&lt;td width=&quot;120&quot;&gt;mod 10&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;td width=&quot;148&quot;&gt;AMEX&lt;/td&gt;&lt;td width=&quot;86&quot;&gt;34  &lt;br /&gt;
37&lt;/td&gt;&lt;td width=&quot;78&quot;&gt;15 &lt;/td&gt;&lt;td width=&quot;120&quot;&gt;mod 10&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;td width=&quot;148&quot;&gt;Diners Club/&lt;br /&gt;
Carte Blanche&lt;/td&gt;&lt;td width=&quot;86&quot;&gt;300-305&lt;br /&gt;
36&lt;br /&gt;
38 &lt;/td&gt;&lt;td width=&quot;78&quot;&gt;14&lt;/td&gt;&lt;td width=&quot;120&quot;&gt;mod 10&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;148&quot;&gt;Discover&lt;/td&gt;&lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;86&quot;&gt;6011&lt;/td&gt;&lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;78&quot;&gt;16 &lt;/td&gt;&lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;120&quot;&gt;mod 10&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;148&quot;&gt;enRoute&lt;/td&gt;&lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;86&quot;&gt;2014&lt;br /&gt;
2149&lt;/td&gt; &lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;78&quot;&gt;15&lt;/td&gt;&lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;120&quot;&gt;any&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;148&quot;&gt;JCB&lt;/td&gt;&lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;86&quot;&gt;3&lt;/td&gt;&lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;78&quot;&gt;16&lt;/td&gt; &lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;120&quot;&gt;mod 10&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;148&quot;&gt;JCB&lt;/td&gt;&lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;86&quot;&gt;2131&lt;br /&gt;
1800&lt;/td&gt;&lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;78&quot;&gt;15 &lt;/td&gt;&lt;td style=&quot;font-family: Verdana,sans-serif;&quot; width=&quot;120&quot;&gt;mod 10&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;h2 style=&quot;color: red; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;2. LUHN Formula (Mod 10) for Validation of Primary Account Number &lt;/span&gt;&lt;/h2&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;The following steps are required to validate the primary account number:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Step 1:&lt;/b&gt; &lt;br /&gt;
Double the value of alternate digits of the primary account number beginning with the second digit from the right (the first right--hand digit is the check digit.)&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Step 2:&lt;/b&gt; &lt;br /&gt;
Add the individual digits comprising the products obtained in Step 1 to each of the unaffected digits in the original number.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Step 3:&lt;/b&gt; &lt;br /&gt;
The total obtained in Step 2 must be a number ending in zero (30, 40, 50, etc.) for the account number to be validated. &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;For example&lt;/b&gt; :&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;To validate the primary account number &lt;i&gt;49927398716:&lt;/i&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Step 1:&lt;/b&gt; &lt;/div&gt;&lt;pre&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;        4     9&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;9&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;7&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;9&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;7&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;6
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&amp;nbsp;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;x2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;x2       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;x2       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;x2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;x2 
-----------------------------------------------------------
             18            4            6           16            2&lt;/span&gt;&lt;/span&gt;
&lt;/b&gt;


&lt;/span&gt;
&lt;/pre&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Step 2:&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;4 +(1+8)+ 9 + (4) + 7 + (6) + 9 +(1+6) + 7 + (2) + 6  &lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Step 3:&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Sum = 70 : Card number is validated &lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; Card is valid because the 70/10 yields no remainder. &lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;Source : http://www.beachnet.com/~hstiles/cardtype.html&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: red; font-family: Verdana,sans-serif;&quot;&gt;Comments Always Welcome.....&lt;/span&gt;&lt;/b&gt; :)&lt;br /&gt;
&lt;ol&gt;&lt;/ol&gt;</content><link rel='enclosure' type='' href='http://en.wikipedia.org/wiki/Luhn_algorithm' length='0'/><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/7433635022819252084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/7433635022819252084?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/7433635022819252084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/7433635022819252084'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/07/credit-card-number-validation.html' title='Credit Card Number Validation'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Gokhalenagar, Pune, Maharashtra, India</georss:featurename><georss:point>18.529068956831491 73.829900920237719</georss:point><georss:box>18.51901395683149 73.823913920237715 18.539123956831492 73.835887920237724</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-7890189186938861636</id><published>2011-07-19T18:24:00.001+05:30</published><updated>2011-07-19T18:24:59.421+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Disable Back Key (Button on Device) in Android</title><content type='html'>&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;&lt;span style=&quot;color: red; font-family: Arial,Helvetica,sans-serif; font-size: small;&quot;&gt;Here is the code to disable device back key in android&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Override the&lt;/span&gt; &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;i style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;b&gt;onKeyDown&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; activity method&lt;/span&gt;&lt;/span&gt;. &lt;span style=&quot;font-size: small;&quot;&gt;And check for Back Key Event using&lt;/span&gt; &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;i style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;b&gt;KeyEvent.KEYCODE_BACK&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;span style=&quot;font-size: small;&quot;&gt;with&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;K&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;ey Hit Count using event.getRepeatCount()==&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: small;&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot; style=&quot;color: black; font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;event.getRepeatCount&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; use to get number of time key pressed&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot; style=&quot;color: black; font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;if the both the condition true call any customized method where your business logic will be there&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot; style=&quot;color: black; font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Here I use &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;onBackPressed(); &lt;/span&gt;and return nothing&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot; style=&quot;color: black;&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot; style=&quot;color: black;&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;&lt;span style=&quot;color: #20124d; font-family: Arial,Helvetica,sans-serif; font-size: small;&quot;&gt;&lt;i&gt;&lt;b&gt;Note :&lt;/b&gt; if you use statement &lt;b&gt;return&lt;/b&gt; in &lt;b&gt;onKeyDown&lt;/b&gt; Method you will get &lt;b&gt;ERROR&lt;/b&gt;.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot; style=&quot;color: black;&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;&lt;span style=&quot;color: #20124d; font-family: Arial,Helvetica,sans-serif; font-size: small;&quot;&gt;&lt;i&gt;So better idea is to use any method and &lt;b&gt;write just return&lt;/b&gt;. &lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;@Override&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;boolean&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; onKeyDown&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; keyCode&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;KeyEvent&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;keyCode &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;KeyEvent&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;KEYCODE_BACK &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;getRepeatCount&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; onBackPressed&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;onKeyDown&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;keyCode&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@Override&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; onBackPressed&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;&lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;Welcome for All Comments........&lt;/span&gt;&lt;/b&gt;&lt;/i&gt; :) &lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/7890189186938861636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/7890189186938861636?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/7890189186938861636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/7890189186938861636'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/07/disable-back-key-button-on-device-in.html' title='Disable Back Key (Button on Device) in Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-2345663823724617117</id><published>2011-06-30T12:53:00.000+05:30</published><updated>2011-06-30T12:53:49.647+05:30</updated><title type='text'>SmartPhones by Sachin Shelke ™: How to Create ProgressBar in Android using XML</title><content type='html'>&lt;a href=&quot;http://smartphonebysachin.blogspot.com/2011/06/how-to-create-progressbar-in-android.html?spref=bl&quot;&gt;SmartPhones by Sachin Shelke ™: How to Create ProgressBar in Android using XML&lt;/a&gt;: &quot;How to use progress bar using Layout.xml file follow the steps.... Step : 1 - Create XML with as given below &amp;lt;Line...&quot;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/2345663823724617117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/2345663823724617117?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/2345663823724617117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/2345663823724617117'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/06/smartphones-by-sachin-shelke-how-to.html' title='SmartPhones by Sachin Shelke ™: How to Create ProgressBar in Android using XML'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-6782060293895188703</id><published>2011-06-30T12:52:00.001+05:30</published><updated>2012-03-04T14:39:33.917+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>JSON Data Parsing in Android - Part - 1</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;We are discussing the following points to Parse JSON data in android&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;color: #351c75;&quot;&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;Why JSON Format?&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;Syntax &amp;amp; Structure of JSON Format&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;Relation Between Android&amp;nbsp; &amp;amp; JSON &lt;/b&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;Steps to Parse JSON data in Android&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;Sample Application&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&lt;i&gt;&lt;b&gt;Why JSON&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt; [JavaScript Object Notation] &lt;/span&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Format?&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;ul style=&quot;margin-left: 40px;&quot;&gt;
&lt;li&gt;Lightweight data-interchangeable format &lt;/li&gt;
&lt;li&gt;Text format that is completely language independent and easy to read&lt;/li&gt;
&lt;li&gt;JSON is&lt;br /&gt;- A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, Key-Value Pair , or associative array.&lt;br /&gt;- An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #990000;&quot;&gt;
&lt;i&gt;&lt;b&gt;&amp;nbsp;Syntax &amp;amp; Structure of JSON Format&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;&lt;span style=&quot;color: purple;&quot;&gt;With Normal Object Collection&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;Object_Name : {Key1 : Value1 , Key2 : Value2 , Key3 : Value3}&lt;br /&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&lt;br /&gt;Example = &lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;FileMenu&quot;: {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;subMenu&quot;:&quot;New&quot;,&quot;details&quot;:&quot;Create New File&quot;, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;subMenu&quot;:&quot;Open&quot;,&quot;details&quot;:&quot;Open Existing File&quot;, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;subMenu&quot;:&quot;Save&quot;,&quot;details&quot;:&quot;Save File&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;i style=&quot;color: purple;&quot;&gt;With Array Based Object Collection&lt;/i&gt;&lt;br /&gt;Object_Name : [&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {Key1_1 : Value1_1 , Key1_2 : Value1_2 , Key1_3 : Value1_3},&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {Key2_1 : Value2_1 , Key2_2 : Value2_2 , Key2_3 : Value2_3}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;Example = &lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;Menu&quot;: {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;menu&quot;:&quot;File&quot;, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;value&quot;:&quot;File&quot;, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;popup&quot;:{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;MenuItem&quot;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&quot;subMenu&quot;:&quot;New&quot;,&quot;details&quot;:&quot;Create New File&quot;}, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&quot;subMenu&quot;:&quot;Open&quot;,&quot;details&quot;:&quot;Open Existing File&quot;}, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&quot;subMenu&quot;:&quot;Save&quot;,&quot;details&quot;:&quot;Save File&quot;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/li&gt;
&lt;/ul&gt;
&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;&lt;b&gt;Relation Between Android &amp;amp; JSON&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Android already have inbuild JSON libraries. The Following class are used to parse the JSON Object.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #330000;&quot;&gt;&lt;b&gt;JSONArray&lt;/b&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #003300;&quot;&gt;A JSONArray is an ordered sequence of values. &lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #330000;&quot;&gt;&lt;b&gt;JSONObject&lt;/b&gt;&lt;/span&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #003300;&quot;&gt;A JSONObject is an unordered collection of name/value pairs. &lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #330000;&quot;&gt;&lt;b&gt;JSONStringer&lt;/b&gt;&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #003300;&quot;&gt;JSONStringer provides a quick and convenient way of producing JSON text. &lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #330000;&quot;&gt;&lt;b&gt;JSONTokener&lt;/b&gt;&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #003300;&quot;&gt;A JSONTokener takes a source string and extracts characters and tokens from it. &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Steps to Parse JSON Data in Android&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Create a JSON Object and Convert JSONString to JSON Object&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #330000;&quot;&gt;&lt;i&gt;JSONObject jsonObject = new JSONObject(jsonDataString);&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
2. Create a Key based JSONObject.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: purple;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #330000;&quot;&gt;&lt;i&gt;JSONObject menuObject = jsonObject.getJSONObject(&quot;Menu&quot;);&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
3. Get the Value&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #330000;&quot;&gt;&lt;i&gt;L&lt;/i&gt;&lt;i&gt;og.d(&quot;JSON&quot;, &quot;Menu = &quot; + menuObject.getString(&quot;menu&quot;));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.d(&quot;JSON&quot;, &lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;color: #330000;&quot;&gt;&lt;i&gt;&quot;Value = &quot; + &lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;color: #330000;&quot;&gt;&lt;i&gt;menuObject.getString(&quot;value&quot;));&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #330000;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Android JSON&amp;nbsp; Example&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #330000;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #330000;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;color: purple;&quot;&gt;public class MainActivity extends Activity {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /** Called when the activity is first created. */&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void onCreate(Bundle savedInstanceState) {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; super.onCreate(savedInstanceState);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; setContentView(R.layout.main);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String myJsonContent = &quot;{\&quot;Menu\&quot;: {\&quot;menu\&quot;:\&quot;File\&quot;,\&quot;value\&quot;:\&quot;File\&quot;,\&quot;popup\&quot;:{\&quot;MenuItem\&quot;:[{\&quot;subMenu\&quot;:\&quot;New\&quot;,\&quot;details\&quot;:\&quot;Create New File\&quot;},{\&quot;subMenu\&quot;:\&quot;Open\&quot;,\&quot;details\&quot;:\&quot;Open Existing File\&quot;},{\&quot;subMenu\&quot;:\&quot;Save\&quot;,\&quot;details\&quot;:\&quot;Save File\&quot;}]}}}&quot;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sampleJsonParser(myJsonContent);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void sampleJsonParser(String jsonString) {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; JSONObject jObject = new JSONObject(jsonString);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; JSONObject menuObject = jObject.getJSONObject(&quot;Menu&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Log.d(&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;color: purple;&quot;&gt;&quot;JSON&quot;, &lt;/i&gt;&lt;i style=&quot;color: purple;&quot;&gt;&quot;Menu = &quot; +&lt;/i&gt;&lt;i style=&quot;color: purple;&quot;&gt;menuObject.getString(&quot;menu&quot;));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Log.d(&lt;/i&gt;&lt;i style=&quot;color: purple;&quot;&gt;&quot;JSON&quot;, &lt;/i&gt;&lt;i style=&quot;color: purple;&quot;&gt;&quot;Value = &quot; + &lt;/i&gt;&lt;i style=&quot;color: purple;&quot;&gt;menuObject.getString(&quot;value&quot;));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; JSONObject popupObject = menuObject.getJSONObject(&quot;popup&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; JSONArray menuitemArray = popupObject.getJSONArray(&quot;MenuItem&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 0; i &amp;lt; 3; i++) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Log.d(&quot;JSON&quot;, &lt;/i&gt;&lt;i style=&quot;color: purple;&quot;&gt;&quot;Name = &quot; + &lt;/i&gt;&lt;i style=&quot;color: purple;&quot;&gt;menuitemArray.getJSONObject(i).getString(&quot;subMenu&quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .toString());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Log.d(&quot;JSON&quot;, &lt;/i&gt;&lt;i style=&quot;color: purple;&quot;&gt;&quot;Value = &quot; +&lt;/i&gt;&lt;i style=&quot;color: purple;&quot;&gt;menuitemArray.getJSONObject(i).getString(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;details&quot;).toString());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (JSONException e) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: #4c1130; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;strong&gt;Download Source Code &amp;amp; SVN Repository&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://smartphone-app-by-sachin-shelke.googlecode.com/svn/trunk/&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-LKv76Gbhc1k/T1CM6WE7wsI/AAAAAAAAAKc/oGzUadqirR8/s1600/download-now_smal.png&quot; uda=&quot;true&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;div style=&quot;color: orange;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: orange;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: black;&quot;&gt;Check Your Log with&amp;nbsp; Tag JSON&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;color: orange;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;i&gt;Enjoy The Code................&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;color: #330000;&quot;&gt;&lt;i&gt;&lt;b style=&quot;color: #cc0000;&quot;&gt;Don&#39;t Forget to Leave Comments....&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/6782060293895188703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/6782060293895188703?isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/6782060293895188703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/6782060293895188703'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/06/json-data-parsing-in-android-part-1.html' title='JSON Data Parsing in Android - Part - 1'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-LKv76Gbhc1k/T1CM6WE7wsI/AAAAAAAAAKc/oGzUadqirR8/s72-c/download-now_smal.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-6270095239358474645</id><published>2011-06-29T17:38:00.000+05:30</published><updated>2011-06-29T17:38:00.169+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>How to Create ProgressBar in Android using XML</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;How to use progress bar using Layout.xml file&lt;br /&gt;
follow the steps....&lt;br /&gt;
Step : 1 -&lt;br /&gt;
Create XML with &amp;lt;ProgressBar .....&amp;gt; as given below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; android:orientation=&quot;vertical&quot; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height=&quot;fill_parent&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextView android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height=&quot;wrap_content&quot; android:text=&quot;My Progress Bar Demo&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ProgressBar android:id=&quot;@+id/progressbar&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width=&quot;wrap_content&quot; android:layout_height=&quot;wrap_content&quot;&amp;nbsp; android:layout_gravity=&quot;center&quot; style=&quot;?android:attr/progressBarStyleLarge&quot;/&amp;gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;
&amp;lt;/LinearLayout&amp;gt; &lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: purple;&quot;&gt;Note: You can change the ProgressBar Style to&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;color: purple;&quot;&gt;&lt;/div&gt;&lt;ul style=&quot;color: purple;&quot;&gt;&lt;li&gt;android:progressBarStyle&lt;/li&gt;
&lt;li&gt;android:progressBarStyleHorizontal&lt;/li&gt;
&lt;li&gt;android:progressBarStyleLarge&lt;/li&gt;
&lt;li&gt;android:progressBarStyleSmall&lt;/li&gt;
&lt;/ul&gt;See the screen Show Below &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step : 2 -&lt;br /&gt;
&lt;br /&gt;
Create an Activity to show progress bar on Screen&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;geshifilter-java&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;class&lt;/span&gt; MyProgressBar &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;extends&lt;/span&gt; Activity 
&lt;span style=&quot;color: #66cc66;&quot;&gt;{&lt;/span&gt;    
    &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;int&lt;/span&gt; progress = &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;private&lt;/span&gt; ProgressBar progressBar&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;int&lt;/span&gt; progressStatus = &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;private&lt;/span&gt; Handler handler = &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;new&lt;/span&gt; Handler&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    @Override
    &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;void&lt;/span&gt; onCreate&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;Bundle savedInstanceState&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt; 
    &lt;span style=&quot;color: #66cc66;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;super&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;onCreate&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;savedInstanceState&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
        setContentView&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;R.&lt;span style=&quot;color: #006600;&quot;&gt;layout&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;basicviews&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        progressBar = &lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;ProgressBar&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt; findViewById&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;R.&lt;span style=&quot;color: #006600;&quot;&gt;id&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;progressbar&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;//---do some work in background thread---&lt;/span&gt;
        &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AThread+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span style=&quot;color: #aaaadd; font-weight: bold;&quot;&gt;Thread&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ARunnable+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span style=&quot;color: #aaaadd; font-weight: bold;&quot;&gt;Runnable&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt; 
        &lt;span style=&quot;color: #66cc66;&quot;&gt;{&lt;/span&gt;
            &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;void&lt;/span&gt; run&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt; 
            &lt;span style=&quot;color: #66cc66;&quot;&gt;{&lt;/span&gt;
                &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;//---do some work here---&lt;/span&gt;
                &lt;span style=&quot;color: #b1b100;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;progressStatus &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt; 
                &lt;span style=&quot;color: #66cc66;&quot;&gt;{&lt;/span&gt;
                    progressStatus = taskToDo&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: #66cc66;&quot;&gt;}&lt;/span&gt;
&amp;nbsp;
                &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;//---hides the progress bar---&lt;/span&gt;
                handler.&lt;span style=&quot;color: #006600;&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ARunnable+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span style=&quot;color: #aaaadd; font-weight: bold;&quot;&gt;Runnable&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt; 
                &lt;span style=&quot;color: #66cc66;&quot;&gt;{&lt;/span&gt;
                    &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;void&lt;/span&gt; run&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt; 
                    &lt;span style=&quot;color: #66cc66;&quot;&gt;{&lt;/span&gt;
                        progressBar.&lt;span style=&quot;color: #006600;&quot;&gt;setVisibility&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;View.GONE&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
                    &lt;span style=&quot;color: #66cc66;&quot;&gt;}&lt;/span&gt;
                &lt;span style=&quot;color: #66cc66;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: #66cc66;&quot;&gt;}&lt;/span&gt;    
&amp;nbsp;
            &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;//---do some long lasting work here---&lt;/span&gt;
            &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;int&lt;/span&gt; taskToDo&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt; 
            &lt;span style=&quot;color: #66cc66;&quot;&gt;{&lt;/span&gt;
                &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;try&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;{&lt;/span&gt;
                    &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AThread+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span style=&quot;color: #aaaadd; font-weight: bold;&quot;&gt;Thread&lt;/span&gt;&lt;/a&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;sleep&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;500&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: #66cc66;&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;catch&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AInterruptedException+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky&quot;&gt;&lt;span style=&quot;color: #aaaadd; font-weight: bold;&quot;&gt;InterruptedException&lt;/span&gt;&lt;/a&gt; e&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt; 
                &lt;span style=&quot;color: #66cc66;&quot;&gt;{&lt;/span&gt;
                    e.&lt;span style=&quot;color: #006600;&quot;&gt;printStackTrace&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: #66cc66;&quot;&gt;}&lt;/span&gt;
                &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;return&lt;/span&gt; ++progress&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: #66cc66;&quot;&gt;}&lt;/span&gt;
&amp;nbsp;
        &lt;span style=&quot;color: #66cc66;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;start&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;  
&amp;nbsp;   &lt;span style=&quot;color: #66cc66;&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/6270095239358474645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/6270095239358474645?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/6270095239358474645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/6270095239358474645'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/06/how-to-create-progressbar-in-android.html' title='How to Create ProgressBar in Android using XML'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-6409269718279758814</id><published>2011-06-09T12:43:00.002+05:30</published><updated>2011-09-05T11:21:51.455+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>How To Remove Extra Spaces From String</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
public static String LRTrim(String str) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; str = str.replaceAll(&quot;&amp;nbsp; &quot;, &quot; &quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // replace all double spaces with single Space&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return str.trim(); &amp;nbsp; // remove all LEFT side &amp;amp; Right Side Extra white spaces from the string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/6409269718279758814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/6409269718279758814?isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/6409269718279758814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/6409269718279758814'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/06/how-to-remove-extra-spaces-from-string.html' title='How To Remove Extra Spaces From String'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-7692631659059251047</id><published>2011-06-08T10:27:00.001+05:30</published><updated>2011-06-08T10:28:19.011+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Sending ThirdParty Email in Android</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Hi All,&lt;br /&gt;
This is first step to send third party email from Android Application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are total 5 steps to create to send email application in android.&lt;br /&gt;
Please Compile program after complete all steps.&lt;br /&gt;
Yout have to add some external Library into Application. Find the Step 5 For the Same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;Step : 1 Write the Main Activity where you want to send email.&lt;/b&gt;&lt;span style=&quot;color: red;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;final Button send = (Button) this.findViewById(R.id.sentBtn);&lt;br /&gt;
send.setOnClickListener(new View.OnClickListener() &lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void onClick(View view)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //this is use to send email from which account&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GMailSender sender = new GMailSender(&quot;&amp;lt;Gmail UserName&amp;gt;&quot;, &quot;&amp;lt;Ur PASSWORD&amp;gt;&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Add your Data like subject , message, senderEmail and email to&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sender.sendMail(&quot;Demo Transaction Receipt&quot;, &quot;This is Demo Transaction email&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;&amp;lt;Sender Email Address&amp;gt;&quot;, &quot;&amp;lt;email TO&amp;gt;&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (Exception e)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.e(&quot;SendMail&quot;, e.getMessage(), e);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
});&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;Step : 2 --&amp;gt; Write the &lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;GMailSender&lt;/span&gt;&lt;b style=&quot;color: red;&quot;&gt; where you have set you email sender setting. &lt;/b&gt;&lt;span style=&quot;color: red;&quot;&gt;we are using Google setting&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;as we are sending email using Gmail account&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;//import necessary packages &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;public class GMailSender extends javax.mail.Authenticator&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;{&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private String mailhost = &quot;smtp.gmail.com&quot;;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private String user;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private String password;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private Session session;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; //you have to create JSSEProvider() please find the Class Below&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Security.addProvider(new JSSEProvider());&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public GMailSender(String user, String password)&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;this.user = user;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;this.password = password;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;Properties props = new Properties();&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;props.setProperty(&quot;mail.transport.protocol&quot;, &quot;smtp&quot;);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;props.setProperty(&quot;mail.host&quot;, mailhost);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;props.put(&quot;mail.smtp.auth&quot;, &quot;true&quot;);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;props.put(&quot;mail.smtp.port&quot;, &quot;465&quot;);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;props.put(&quot;mail.smtp.socketFactory.port&quot;, &quot;465&quot;);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;props.put(&quot;mail.smtp.socketFactory.class&quot;, &quot;javax.net.ssl.SSLSocketFactory&quot;);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;props.put(&quot;mail.smtp.socketFactory.fallback&quot;, &quot;false&quot;);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;props.setProperty(&quot;mail.smtp.quitwait&quot;, &quot;false&quot;);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;session = Session.getDefaultInstance(props, this);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected PasswordAuthentication getPasswordAuthentication()&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;return new PasswordAuthentication(user, password);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public synchronized void sendMail(String subject, String body, String sender, String recipients) throws Exception&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;try&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;MimeMessage message = new MimeMessage(session);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;DataHandler handler = new DataHandler(new ByteArrayDataSource(body.getBytes(), &quot;text/html&quot;));&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;message.setSender(new InternetAddress(sender));&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;message.setSubject(&quot;Demo Transaction Receipt&quot;);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;message.setDataHandler(handler);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (recipients.indexOf(&#39;,&#39;) &amp;gt; 0)&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(recipients));&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;message.setRecipient(Message.RecipientType.TO, new InternetAddress(recipients));&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Transport.send(message);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;} catch (MessagingException e)&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO Auto-generated catch block&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;e.printStackTrace();&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;} catch (Exception e)&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO Auto-generated catch block&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;e.printStackTrace();&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class ByteArrayDataSource implements DataSource&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;private byte[] data;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;private String type;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;public ByteArrayDataSource(byte[] data, String type)&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;super();&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;this.data = data;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;this.type = type;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;public ByteArrayDataSource(byte[] data)&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;super();&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;this.data = data;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;public void setType(String type)&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;this.type = type;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;public String getContentType()&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (type == null)&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return &quot;application/octet-stream&quot;;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return type;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;public InputStream getInputStream() throws IOException&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return new ByteArrayInputStream(data);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;public String getName()&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return &quot;ByteArrayDataSource&quot;;&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;public OutputStream getOutputStream() throws IOException&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;throw new IOException(&quot;Not Supported&quot;);&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;Step : 3 Write the JSSEProvider for Security Setting&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;public final class JSSEProvider extends Provider&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;{&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public JSSEProvider()&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;super(&quot;HarmonyJSSE&quot;, 1.0, &quot;Harmony JSSE Provider&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;AccessController.doPrivileged(new java.security.PrivilegedAction&amp;lt;Void&amp;gt;()&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public Void run()&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;put(&quot;SSLContext.TLS&quot;, &quot;org.apache.harmony.xnet.provider.jsse.SSLContextImpl&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;put(&quot;Alg.Alias.SSLContext.TLSv1&quot;, &quot;TLS&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;put(&quot;KeyManagerFactory.X509&quot;, &quot;org.apache.harmony.xnet.provider.jsse.KeyManagerFactoryImpl&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;put(&quot;TrustManagerFactory.X509&quot;, &quot;org.apache.harmony.xnet.provider.jsse.TrustManagerFactoryImpl&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return null;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;});&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;Step : 4 Setting Internet Permission in AndroidManifest.xml&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;As We know, to send email we required Internet Connection and Permission to the application.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;Add the following permission in AndroidMenifest.xml above &amp;lt;application Tag......&amp;gt;&amp;lt;/application&amp;gt;&lt;/span&gt;&lt;b style=&quot;color: red;&quot;&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;i style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;&amp;gt;&amp;lt;/uses-permission&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;b style=&quot;color: red;&quot;&gt;&lt;i style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;Step : 4 Adding External Library&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To Send email we need to Add some External Library into an Application&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Download the Following Libraries and follow the Steps&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.sachin.arihant.ac.in/RowFiles/AndroidLibraries/activation.jar&quot;&gt;Activation.jar&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.sachin.arihant.ac.in/RowFiles/AndroidLibraries/additionnal.jar&quot;&gt;Additionnal.jar&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.sachin.arihant.ac.in/RowFiles/AndroidLibraries/mail.jar&quot;&gt;Mail.jar&lt;/a&gt;&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;How To add External Libraries in Eclipse Project&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Open Package Explorer&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Write Click on the Project&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Mouse Over on &quot;Build Path&quot; --&amp;gt; and select &quot;Add External Archives&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Select all the Libraries which you want to add. Here we are adding above libraries.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Congratulation.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Now You Can Compile your project and send email.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;i style=&quot;color: red; font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;b&gt;Don&#39;t Forget to Leave Comments&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;color: red;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/7692631659059251047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/7692631659059251047?isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/7692631659059251047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/7692631659059251047'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/06/sending-thirdparty-email-in-android.html' title='Sending ThirdParty Email in Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-4383756511215179377</id><published>2011-05-17T16:28:00.000+05:30</published><updated>2011-06-08T09:39:36.158+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Hint Not Displaying When changing Alignment in EditText</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;post-text&quot;&gt;This issue is due to the choice of adding gravity to center the text.  There is a &lt;a href=&quot;http://code.google.com/p/android/issues/detail?id=13895&quot; rel=&quot;nofollow&quot;&gt;known bug&lt;/a&gt; in the SDK that, as of 2.3, it looks like is still not fixed.  This bug hides the hint text when &lt;code&gt;&lt;b&gt;a&lt;/b&gt;&lt;b&gt;ndroid:singleLine&lt;/b&gt;&lt;/code&gt; and any custom value of &lt;b&gt;&lt;code&gt;android:gravity&lt;/code&gt;&lt;/b&gt; are set together.  Your choice at this juncture really is to remove one or the other.  Some workaround options:  &lt;ol&gt;&lt;li&gt;Remove the &lt;code&gt;android:gravity&lt;/code&gt; declaration and have the text left-aligned.&lt;/li&gt;
&lt;li&gt;Keep the declaration and remove &lt;b&gt;android:singleLine&lt;/b&gt;.  In this case,  you will probably have to override the Editor Action in order to get the  default Next or Done button on the soft keypad.&lt;/li&gt;
&lt;li&gt;replace parameter &lt;b&gt;android:singleLine&lt;/b&gt; to &lt;b&gt;android:maxLine&lt;/b&gt; &lt;/li&gt;
&lt;li&gt;Remove &lt;b&gt;&lt;code&gt;android:gravity&lt;/code&gt;,&lt;/b&gt; and set &lt;b&gt;&lt;code&gt;layout_width=&quot;wrap_content&quot;&lt;/code&gt;.&lt;/b&gt;  Then appropriately center the entire widget in the parent layout.  This may look a little goofy with the standard &lt;i&gt;&lt;code&gt;EditText&lt;/code&gt; &lt;/i&gt;background as it will grow and shrink.  You may have to set this to null and make the background part of a parent container.&lt;/li&gt;
&lt;/ol&gt;Also, don&#39;t forget to star the bug :)&lt;br /&gt;
&lt;div style=&quot;color: red;&quot;&gt;&lt;b&gt;and leave the comments&lt;/b&gt; &lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;Source : stackoverflow.com&lt;/span&gt;&lt;/i&gt; &lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/4383756511215179377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/4383756511215179377?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/4383756511215179377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/4383756511215179377'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/05/hint-not-displaying-when-changing.html' title='Hint Not Displaying When changing Alignment in EditText'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6360515232972921654.post-6585842255455807054</id><published>2011-05-10T16:04:00.000+05:30</published><updated>2011-06-08T09:39:31.678+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Hide Tabbar on Soft Keyboard Automatically open in Android</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Add the following attribute in menifest file while declaring the activity&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;activity android:name=&quot;.ActivityName&quot;&amp;nbsp;android:windowSoftInputMode=&quot;adjustPan&quot;&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is better idea to use attribute in menifest file rather using setOnFocusChangeListener() for every Edit Text&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Don&#39;t Forget to leave Comments&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smartphonebysachin.blogspot.com/feeds/6585842255455807054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6360515232972921654/6585842255455807054?isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/6585842255455807054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6360515232972921654/posts/default/6585842255455807054'/><link rel='alternate' type='text/html' href='http://smartphonebysachin.blogspot.com/2011/05/hide-tabbar-on-soft-keyboard.html' title='Hide Tabbar on Soft Keyboard Automatically open in Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15020184629307940699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>