<?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-3121772154556583723</id><updated>2026-10-08T17:06:34.473+05:30</updated><category term="Android ActionBar"/><category term="Android Activity"/><category term="Android Adapterview"/><category term="Android AlertDialog"/><category term="Android AnalogClock"/><category term="Android Animated GIF Image Example"/><category term="Android EditText TextWatcher Example"/><category term="Android List Of Preference"/><category term="Android RSS Feed Reader Example"/><category term="Android Run Multiple AsyncTask Same Time"/><category term="Android StatusBar Notification with Badge icon"/><category term="Android TimerTask"/><category term="Android Toast notification show Different Gravity."/><category term="Android Unzip the in SD-Card"/><category term="Android Widget"/><category term="Android mute and unmute sound"/><category term="Calculate distance between two geo location"/><category term="Layout"/><category term="Pull to Refresh ListView in Android."/><title type='text'>Android Beginning Bunch</title><subtitle type='html'>Android  Tutorial for Beginners</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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>214</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3121772154556583723.post-8288833760885269938</id><published>2024-11-20T17:29:00.003+05:30</published><updated>2024-11-20T17:29:45.485+05:30</updated><title type='text'>CoroutineScope : Android</title><content type='html'>&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;CoroutineScope : Android&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Lifescycle scope&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Global Scope&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;ViewmodelScope (Custom Scope )&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Lifescycle scope&lt;/h3&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;Use lifecycle-aware scopes like &lt;code&gt;lifecycleScope&lt;/code&gt; or &lt;code&gt;viewLifecycleOwner.lifecycleScope&lt;/code&gt; provided by Jetpack&#39;s Lifecycle library to automatically manage coroutine lifecycles.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Global Scope&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;Global scope alive till application running&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Viewmodel Scope&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Viewmodel scope will alive till activity or fragment&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;can able to use multiple fragment or activity.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/8288833760885269938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2024/11/coroutinescope-android.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/8288833760885269938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/8288833760885269938'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2024/11/coroutinescope-android.html' title='CoroutineScope : Android'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-5683621021431382782</id><published>2024-11-12T10:51:00.000+05:30</published><updated>2024-11-12T10:51:42.626+05:30</updated><title type='text'>What are Scope functions in kotlin?</title><content type='html'>&lt;p&gt;&amp;nbsp;Below example for list scope function in kotlin&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;let&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;run&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;with&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;apply&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;also&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;let&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #242424; font-family: source-serif-pro, Georgia, Cambria, &amp;quot;Times New Roman&amp;quot;, Times, serif; font-size: 20px; letter-spacing: -0.06px;&quot;&gt;The basic functionality of all the scope functions is the same i.e. to execute a block of code on an object.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #242424; font-family: source-serif-pro, Georgia, Cambria, &amp;quot;Times New Roman&amp;quot;, Times, serif; font-size: 20px; letter-spacing: -0.06px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #242424; font-family: source-serif-pro, Georgia, Cambria, &amp;quot;Times New Roman&amp;quot;, Times, serif; font-size: 20px; letter-spacing: -0.06px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #242424; font-family: source-serif-pro, Georgia, Cambria, &amp;quot;Times New Roman&amp;quot;, Times, serif; font-size: 20px; letter-spacing: -0.06px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #242424; font-family: source-serif-pro, Georgia, Cambria, &amp;quot;Times New Roman&amp;quot;, Times, serif; font-size: 20px; letter-spacing: -0.06px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/5683621021431382782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2024/11/what-are-scope-functions-in-kotlin.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/5683621021431382782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/5683621021431382782'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2024/11/what-are-scope-functions-in-kotlin.html' title='What are Scope functions in kotlin?'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-8679943214095670696</id><published>2023-04-29T13:20:00.002+05:30</published><updated>2023-04-29T13:20:32.156+05:30</updated><title type='text'>Android - The Crashlytics build ID is missing. </title><content type='html'>&lt;p&gt;&amp;nbsp;Android - The Crashlytics build ID is missing.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When i&amp;nbsp;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; color: #202124; font-family: &amp;quot;Google Sans&amp;quot;, arial, sans-serif-medium, sans-serif; white-space: nowrap;&quot;&gt;integrate&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Firebase Crashlytics&amp;nbsp;&amp;nbsp;getting following error .&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;The Crashlytics build ID is missing&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;kindly add following lines in&amp;nbsp; string.xml&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;string &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;com.crashlytics.android.build_id&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;/span&gt;1&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/8679943214095670696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2023/04/android-crashlytics-build-id-is-missing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/8679943214095670696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/8679943214095670696'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2023/04/android-crashlytics-build-id-is-missing.html' title='Android - The Crashlytics build ID is missing. '/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-696763398105872844</id><published>2023-03-21T14:05:00.001+05:30</published><updated>2023-03-21T14:05:23.247+05:30</updated><title type='text'>Android  :  Could not find com.twitter.sdk.android:twitter-core:3.1.1</title><content type='html'>&lt;p&gt;While integrate Twitter signup integration in android . I&#39;m getting following error&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Execution failed for task &#39;:app:mergeDebugNativeLibs&#39;.&lt;/p&gt;&lt;p&gt;&amp;gt; Could not resolve all files for configuration &#39;:app:debugRuntimeClasspath&#39;.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;gt; Could not find com.twitter.sdk.android:twitter-core:3.1.1.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Searched in the following locations:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- https://dl.google.com/dl/android/maven2/com/twitter/sdk/android/twitter-core/3.1.1/twitter-core-3.1.1.pom&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- https://repo.maven.apache.org/maven2/com/twitter/sdk/android/twitter-core/3.1.1/twitter-core-3.1.1.pom&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Required by:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;project : app&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-size: medium;&quot;&gt;Error&lt;/span&gt;&lt;/b&gt;&lt;/p&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/AVvXsEjju5Yp5pWwOkEp1FG9fKZfJE9wfPkgGezgNUHAeYKEXjV1E7go4Qypd-PbUU0jPUq9uoiP8PM48Z4fl4L4bY5xjk3DcOh90s_AYS56t3u8OKjclEiUrjwHSmJQJW-xv6hhWMJC84NYsL0NZt1z4PYY95ES7_1J1mK403s0xjkgZxCcDvfUcBmYoS7a/s1896/Image20230321140020.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;642&quot; data-original-width=&quot;1896&quot; height=&quot;108&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjju5Yp5pWwOkEp1FG9fKZfJE9wfPkgGezgNUHAeYKEXjV1E7go4Qypd-PbUU0jPUq9uoiP8PM48Z4fl4L4bY5xjk3DcOh90s_AYS56t3u8OKjclEiUrjwHSmJQJW-xv6hhWMJC84NYsL0NZt1z4PYY95ES7_1J1mK403s0xjkgZxCcDvfUcBmYoS7a/s320/Image20230321140020.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #6aa84f; font-size: medium;&quot;&gt;Solution&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Add following line in setting.gradle file&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;pluginManagement &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;repositories &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;        &lt;/span&gt;maven &lt;span style=&quot;font-weight: bold;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;            &lt;/span&gt;url (&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;https://github.com/jitsi/jitsi-maven-repository/raw/master/releases&quot;&lt;/span&gt;)&lt;br /&gt;        &lt;span style=&quot;font-weight: bold;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;        &lt;/span&gt;maven&lt;span style=&quot;font-weight: bold;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;            &lt;/span&gt;url(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;https://jcenter.bintray.com&quot;&lt;/span&gt;)&lt;br /&gt;        &lt;span style=&quot;font-weight: bold;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;        &lt;/span&gt;maven &lt;span style=&quot;font-weight: bold;&quot;&gt;{ &lt;/span&gt;url &lt;span style=&quot;color: #6a8759;&quot;&gt;&#39;https://jitpack.io&#39; &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;        &lt;/span&gt;gradlePluginPortal()&lt;br /&gt;        google()&lt;br /&gt;        mavenCentral()&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;font-weight: bold;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;dependencyResolutionManagement &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;repositoriesMode&lt;/span&gt;.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)&lt;br /&gt;    &lt;span style=&quot;color: #9876aa;&quot;&gt;repositories &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;        &lt;/span&gt;maven &lt;span style=&quot;font-weight: bold;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;            &lt;/span&gt;url (&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;https://github.com/jitsi/jitsi-maven-repository/raw/master/releases&quot;&lt;/span&gt;)&lt;br /&gt;        &lt;span style=&quot;font-weight: bold;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;        &lt;/span&gt;google()&lt;br /&gt;        mavenCentral()&lt;br /&gt;&lt;br /&gt;        maven&lt;span style=&quot;font-weight: bold;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;            &lt;/span&gt;url(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;https://jcenter.bintray.com&quot;&lt;/span&gt;)&lt;br /&gt;        &lt;span style=&quot;font-weight: bold;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;        &lt;/span&gt;maven &lt;span style=&quot;font-weight: bold;&quot;&gt;{ &lt;/span&gt;url &lt;span style=&quot;color: #6a8759;&quot;&gt;&#39;https://jitpack.io&#39; &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;    }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;color: #6aa84f; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&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/AVvXsEixeWszCQ6-dD66NqAzPqPeXEvKmpcTFA3VPv7sB82llPeAw7l9NPSweymH7NQloc7xPnJo8-bh29sK-M3ctinZjIjq3Oy2cLMemogszqKGpQk3E-mM_eIPpAQn8ETUhEj3rN_QjOIxqFKUY0fW4pCgFjmkN3pUshcVnr0TDcXzF7t55IMg-m73WHnb/s294/Image20230321140011.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;245&quot; data-original-width=&quot;294&quot; height=&quot;245&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixeWszCQ6-dD66NqAzPqPeXEvKmpcTFA3VPv7sB82llPeAw7l9NPSweymH7NQloc7xPnJo8-bh29sK-M3ctinZjIjq3Oy2cLMemogszqKGpQk3E-mM_eIPpAQn8ETUhEj3rN_QjOIxqFKUY0fW4pCgFjmkN3pUshcVnr0TDcXzF7t55IMg-m73WHnb/s1600/Image20230321140011.png&quot; width=&quot;294&quot; /&gt;&lt;/a&gt;&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;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuykSn8WGXvNN3NoBCt8VOJfuIfVnV8e-5Zc8XSbUBh_U0AlZB0y3GbG1jdbn0LCwcU4mmpK1xDuewQJPi1canWt5zZEVf69yyrt-m64CX_xGdPQo-YXJXwvYqxa8I7ugcX1JNLsgcBA8JgdczuBXXowVBgUjW1GbBmkXbRDqQvb0UAys3dsZ4miOL/s875/Image20230321140014.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;843&quot; data-original-width=&quot;875&quot; height=&quot;308&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuykSn8WGXvNN3NoBCt8VOJfuIfVnV8e-5Zc8XSbUBh_U0AlZB0y3GbG1jdbn0LCwcU4mmpK1xDuewQJPi1canWt5zZEVf69yyrt-m64CX_xGdPQo-YXJXwvYqxa8I7ugcX1JNLsgcBA8JgdczuBXXowVBgUjW1GbBmkXbRDqQvb0UAys3dsZ4miOL/s320/Image20230321140014.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/696763398105872844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2023/03/android-could-not-find.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/696763398105872844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/696763398105872844'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2023/03/android-could-not-find.html' title='Android  :  Could not find com.twitter.sdk.android:twitter-core:3.1.1'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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/AVvXsEjju5Yp5pWwOkEp1FG9fKZfJE9wfPkgGezgNUHAeYKEXjV1E7go4Qypd-PbUU0jPUq9uoiP8PM48Z4fl4L4bY5xjk3DcOh90s_AYS56t3u8OKjclEiUrjwHSmJQJW-xv6hhWMJC84NYsL0NZt1z4PYY95ES7_1J1mK403s0xjkgZxCcDvfUcBmYoS7a/s72-c/Image20230321140020.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3121772154556583723.post-7532300487846288574</id><published>2022-12-03T12:19:00.005+05:30</published><updated>2022-12-03T12:19:41.529+05:30</updated><title type='text'>Android  : Jitsi starts dialing up call out a phone number with room id some android devices</title><content type='html'>&lt;p&gt;&amp;nbsp;Android&amp;nbsp; : Jitsi starts dialing up call out a phone number with room id some android devices&lt;/p&gt;&lt;p&gt;&lt;b&gt;Solution&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Make&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;call-integration.enabled&amp;nbsp; false&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp;options&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = new JitsiMeetConferenceOptions.Builder()&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setRoom(roomID)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setServerURL(domainURl)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setConfigOverride(&quot;requireDisplayName&quot;, true)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #cc0000; font-size: medium;&quot;&gt; .setFeatureFlag(&quot;call-integration.enabled&quot;, false)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/7532300487846288574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/12/android-jitsi-starts-dialing-up-call.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/7532300487846288574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/7532300487846288574'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/12/android-jitsi-starts-dialing-up-call.html' title='Android  : Jitsi starts dialing up call out a phone number with room id some android devices'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-7438416629652667963</id><published>2022-11-29T14:45:00.000+05:30</published><updated>2022-11-29T14:45:04.500+05:30</updated><title type='text'>  Data Binding is not working after we change the package name...? Android Studio</title><content type='html'>&lt;p&gt;&amp;nbsp; Data Binding is not working after we change the package name...?Android Studio&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Solution:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;1. Build &amp;gt; Clean Project&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;2.Go to your Build.gradle (Module) and disable databinding:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;android {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; buildFeatures {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; viewBinding false&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;3.File &amp;gt; Sync Project with Gradle Files&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;4.Build &amp;gt; Rebuild Project ,Now enable databinding again:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;android {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;buildFeatures {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; viewBinding true&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;5.File &amp;gt; Sync Project with Gradle Files&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/7438416629652667963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/11/data-binding-is-not-working-after-we.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/7438416629652667963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/7438416629652667963'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/11/data-binding-is-not-working-after-we.html' title='  Data Binding is not working after we change the package name...? Android Studio'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-2647792272270843837</id><published>2022-11-23T11:53:00.003+05:30</published><updated>2022-11-23T11:53:37.467+05:30</updated><title type='text'>When enable setPersistenceEnabled(true). Firebase Realtime Database retrieving old  data ?</title><content type='html'>&lt;p&gt;&amp;nbsp;When enable setPersistenceEnabled(true). Firebase Realtime Database retrieving old&amp;nbsp; data ?&lt;/p&gt;&lt;p&gt;its showing old data. for that u have to add one more line.&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;FirebaseDatabase.&lt;span style=&quot;font-style: italic;&quot;&gt;getInstance&lt;/span&gt;().setPersistenceEnabled(&lt;span style=&quot;color: #cc7832;&quot;&gt;true&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;FirebaseDatabase.&lt;span style=&quot;font-style: italic;&quot;&gt;getInstance&lt;/span&gt;().getReference().keepSynced(&lt;span style=&quot;color: #cc7832;&quot;&gt;true&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/2647792272270843837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/11/when-enable-setpersistenceenabledtrue.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/2647792272270843837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/2647792272270843837'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/11/when-enable-setpersistenceenabledtrue.html' title='When enable setPersistenceEnabled(true). Firebase Realtime Database retrieving old  data ?'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-737216258976337547</id><published>2022-08-02T14:37:00.002+05:30</published><updated>2022-08-02T14:37:54.910+05:30</updated><title type='text'>How to Update UserOnline Status  Android Smack ?</title><content type='html'>&lt;p&gt;&amp;nbsp;How to Update UserOnline Status&amp;nbsp; Android Smack ?&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;Presence p = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;Presence(Presence.Type.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;available&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;&quot; &lt;/span&gt;+mode&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6897bb;&quot;&gt;42&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;Presence.Mode.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;away&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;ConnectionManager.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;mConnection&lt;/span&gt;.sendStanza(p)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/737216258976337547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/08/how-to-update-useronline-status-android.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/737216258976337547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/737216258976337547'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/08/how-to-update-useronline-status-android.html' title='How to Update UserOnline Status  Android Smack ?'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-6672091249964604851</id><published>2022-07-19T09:15:00.006+05:30</published><updated>2022-07-19T09:16:54.559+05:30</updated><title type='text'>Duplicate class org.xmlpull.mxp1.MXParser found in modules xpp3-1.1.4c (xpp3:xpp3:1.1.4c) and xpp3_min-1.1.4c (xpp3:xpp3_min:1.1.4c)</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Duplicate class org.xmlpull.mxp1.MXParser found in modules xpp3-1.1.4c (xpp3:xpp3:1.1.4c) and xpp3_min-1.1.4c (xpp3:xpp3_min:1.1.4c)&lt;/p&gt;&lt;p&gt;Duplicate class org.xmlpull.v1.XmlPullParser found in modules xpp3-1.1.4c (xpp3:xpp3:1.1.4c) and xpp3_min-1.1.4c (xpp3:xpp3_min:1.1.4c)&lt;/p&gt;&lt;p&gt;Duplicate class org.xmlpull.v1.XmlPullParserException found in modules xpp3-1.1.4c (xpp3:xpp3:1.1.4c) and xpp3_min-1.1.4c (xpp3:xpp3_min:1.1.4c)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Solution&lt;/p&gt;&lt;p&gt;Add gradle&amp;nbsp;&lt;/p&gt;&lt;p&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; (here Your Project)&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;implementation (&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;org.igniterealtime.smack:smack-tcp:4.4.0&quot;&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: grey;&quot;&gt;/*  {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;      exclude group: &quot;xmlpull&quot;, module: &quot;xmlpull&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;      exclude module: &#39;xpp3&#39;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/6672091249964604851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/07/duplicate-class-orgxmlpullmxp1mxparser.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/6672091249964604851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/6672091249964604851'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/07/duplicate-class-orgxmlpullmxp1mxparser.html' title='Duplicate class org.xmlpull.mxp1.MXParser found in modules xpp3-1.1.4c (xpp3:xpp3:1.1.4c) and xpp3_min-1.1.4c (xpp3:xpp3_min:1.1.4c)'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-8101618948796335927</id><published>2022-07-12T09:07:00.002+05:30</published><updated>2022-07-12T09:07:42.263+05:30</updated><title type='text'>Android Smack Unfriend Request </title><content type='html'>&lt;p&gt;&amp;nbsp;Android Smack Unfriend Request&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public static void  &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;sendFriendshipRequest&lt;/span&gt;(EntityBareJid toJid &lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;String name&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;String stanzaID) &lt;span style=&quot;color: #cc7832;&quot;&gt;throws &lt;/span&gt;SmackException.NotConnectedException&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;InterruptedException {&lt;br /&gt;    Presence presence = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;Presence(Presence.Type.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;unsubscribe&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;presence.setTo(toJid)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;presence.setFrom(&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;fromJid&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;presence.setStanzaId(stanzaID)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;mConnection&lt;/span&gt;.sendStanza(presence)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;mConnection&lt;/span&gt;.addStanzaSendingListener(&lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;StanzaListener() {&lt;br /&gt;        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;processStanza&lt;/span&gt;(Stanza packet) {&lt;br /&gt;            Presence presence = (Presence) packet&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;Presence.Mode mode = presence.getMode()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;           &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;// Toast.makeText(act, &quot;Un friend succefully  &quot; +name, Toast.LENGTH_SHORT).show();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            if &lt;/span&gt;(mode == &lt;span style=&quot;color: #cc7832;&quot;&gt;null&lt;/span&gt;) &lt;span style=&quot;color: #cc7832;&quot;&gt;return;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            switch &lt;/span&gt;(mode) {&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;case &lt;/span&gt;&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;available&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;case &lt;/span&gt;&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;chat&lt;/span&gt;:&lt;br /&gt;                    &lt;span style=&quot;color: grey;&quot;&gt;// We assume that only a switch to available and chat indicates user activity&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    // since other mode changes could be also a result of some sort of automatism&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;break;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                default&lt;/span&gt;:&lt;br /&gt;                    &lt;span style=&quot;color: #cc7832;&quot;&gt;break;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;}&lt;br /&gt;        }&lt;br /&gt;    }&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;StanzaTypeFilter.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;PRESENCE&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/8101618948796335927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/07/android-smack-unfriend-request.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/8101618948796335927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/8101618948796335927'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/07/android-smack-unfriend-request.html' title='Android Smack Unfriend Request '/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-4351738803518638054</id><published>2022-07-09T13:00:00.003+05:30</published><updated>2022-07-12T12:58:12.971+05:30</updated><title type='text'>Android SMACK get USER  Online Status  (Presence)</title><content type='html'>&lt;p&gt;&amp;nbsp;Android SMACK get USER&amp;nbsp; Online Status&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;getUserStatus&lt;/span&gt;(){&lt;br /&gt;    {&lt;br /&gt;        Presence presence&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;presence = &lt;span style=&quot;color: #9876aa;&quot;&gt;roster&lt;/span&gt;.getPresence(jid)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            if &lt;/span&gt;(presence.getMode().name().equalsIgnoreCase(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;available&quot;&lt;/span&gt;)) {&lt;br /&gt;&lt;br /&gt;            } &lt;span style=&quot;color: #cc7832;&quot;&gt;else if &lt;/span&gt;(presence.getMode().name().equalsIgnoreCase(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;away&quot;&lt;/span&gt;)) {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            } &lt;span style=&quot;color: #cc7832;&quot;&gt;else if&lt;/span&gt;(presence.getMode().name().equalsIgnoreCase(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;xa&quot;&lt;/span&gt;)){&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;else if&lt;/span&gt;(presence.getMode().name().equalsIgnoreCase(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;chat&quot;&lt;/span&gt;)){&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;else &lt;/span&gt;{&lt;br /&gt;              &lt;span style=&quot;color: grey;&quot;&gt;//dnd&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            &lt;/span&gt;}&lt;br /&gt;        }&lt;br /&gt;    &lt;/pre&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/4351738803518638054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/07/android-smack-get-user-online-status.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/4351738803518638054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/4351738803518638054'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/07/android-smack-get-user-online-status.html' title='Android SMACK get USER  Online Status  (Presence)'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-4173722283378000236</id><published>2022-07-01T00:47:00.010+05:30</published><updated>2022-07-12T09:08:42.816+05:30</updated><title type='text'> XMPP SMACK Connection android Test</title><content type='html'>&lt;p&gt;&amp;nbsp;XMPP Connection android&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;package &lt;/span&gt;com.ttg.androidxmppsample&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;androidx.annotation.&lt;span style=&quot;color: #bbb529;&quot;&gt;NonNull&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;androidx.appcompat.app.AppCompatActivity&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.graphics.Color&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.net.InetAddresses&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.os.Bundle&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.os.Handler&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.os.StrictMode&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.util.Log&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.view.View&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.Button&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.TextView&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.AbstractXMPPConnection&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.ConnectionConfiguration&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.ConnectionListener&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.SmackException&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.XMPPConnection&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.XMPPException&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.tcp.XMPPTCPConnection&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jxmpp.jid.DomainBareJid&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jxmpp.jid.impl.JidCreate&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jxmpp.stringprep.XmppStringprepException&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;java.io.IOException&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;java.net.InetAddress&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;java.net.ServerSocket&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;java.net.UnknownHostException&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public class &lt;/span&gt;MainActivity2 &lt;span style=&quot;color: #cc7832;&quot;&gt;extends &lt;/span&gt;AppCompatActivity {&lt;br /&gt;       String &lt;span style=&quot;color: #9876aa;&quot;&gt;TAG &lt;/span&gt;= &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;ConnectXmpp&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;       &lt;/span&gt;String &lt;span style=&quot;color: #9876aa;&quot;&gt;DOMAIN &lt;/span&gt;= &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;localhost&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;       &lt;/span&gt;String &lt;span style=&quot;color: #9876aa;&quot;&gt;HOST &lt;/span&gt;= &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;10.11.227.130&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;       int &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;PORT &lt;/span&gt;= &lt;span style=&quot;color: #6897bb;&quot;&gt;5222&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    private &lt;/span&gt;String &lt;span style=&quot;color: #9876aa;&quot;&gt;userName &lt;/span&gt;=&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    private &lt;/span&gt;String &lt;span style=&quot;color: #9876aa;&quot;&gt;passWord &lt;/span&gt;= &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    public static boolean &lt;/span&gt;&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;connected &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;false;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    public static boolean &lt;/span&gt;&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;isToasted &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    public static boolean &lt;/span&gt;&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;chat_created &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;// Chat newChat;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    &lt;/span&gt;XMPPConnectionListener &lt;span style=&quot;color: #9876aa;&quot;&gt;connectionListener &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;XMPPConnectionListener()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    public  &lt;/span&gt;AbstractXMPPConnection &lt;span style=&quot;color: #9876aa;&quot;&gt;mConnection&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    public &lt;/span&gt;XMPPTCPConnectionConfiguration &lt;span style=&quot;color: #9876aa;&quot;&gt;mConnectionConfiguration&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    private boolean &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;startConnected &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;false;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;TextView &lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onCreate&lt;/span&gt;(Bundle savedInstanceState) {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;setContentView(R.layout.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;activity_main2&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;StrictMode.ThreadPolicy policy = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;StrictMode.ThreadPolicy.Builder().permitNetwork().build()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;StrictMode.&lt;span style=&quot;font-style: italic;&quot;&gt;setThreadPolicy&lt;/span&gt;(policy)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;Button btn  = findViewById(R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;button&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus &lt;/span&gt;= findViewById(R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;textView&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;btn.setOnClickListener(&lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;View.OnClickListener() {&lt;br /&gt;            &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onClick&lt;/span&gt;(View view) {&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;try &lt;/span&gt;{&lt;br /&gt;                    init(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(XmppStringprepException e) {&lt;br /&gt;                    Log.&lt;span style=&quot;font-style: italic;&quot;&gt;i&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;dbXMPP&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;XmppStringprepException!&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;e.printStackTrace()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;               &lt;span style=&quot;color: grey;&quot;&gt;// startLogin(&quot;lx2rvktowng3&quot;,&quot;9739876646vV&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;               // startLogin(&quot;&quot;,&quot;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            &lt;/span&gt;}&lt;br /&gt;        })&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;init&lt;/span&gt;(&lt;span style=&quot;color: #cc7832;&quot;&gt;final &lt;/span&gt;String userName&lt;span style=&quot;color: #cc7832;&quot;&gt;, final &lt;/span&gt;String passWord) &lt;span style=&quot;color: #cc7832;&quot;&gt;throws &lt;/span&gt;XmppStringprepException {&lt;br /&gt;&lt;br /&gt;        Log.&lt;span style=&quot;font-style: italic;&quot;&gt;i&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;dbXMPP&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Initializing!&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;//this.userName = userId;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        //this.passWord = pwd;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        &lt;/span&gt;XMPPTCPConnectionConfiguration.Builder configBuilder = XMPPTCPConnectionConfiguration.&lt;span style=&quot;font-style: italic;&quot;&gt;builder&lt;/span&gt;()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;configBuilder.setUsernameAndPassword(userName&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;passWord)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;configBuilder.setSecurityMode(ConnectionConfiguration.SecurityMode.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;disabled&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;configBuilder.setResource(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;SomeResource&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;// DomainBareJid serviceName = JidCreate.domainBareFrom(DOMAIN);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;       // configBuilder.setServiceName(serviceName);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;       // configBuilder.setXmppDomain(serviceName);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        &lt;/span&gt;configBuilder .setXmppDomain(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;10.11.227.130&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;// configBuilder.setHost(HOST);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        &lt;/span&gt;configBuilder.setPort(&lt;span style=&quot;color: #9876aa;&quot;&gt;PORT&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;configBuilder.allowEmptyOrNullUsernames()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;// connection = new XMPPTCPConnection(configBuilder.build());&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        // connection.addConnectionListener(connectionListener);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        &lt;/span&gt;Log.&lt;span style=&quot;font-style: italic;&quot;&gt;i&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;dbXMPP&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Initializing! 1&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;AbstractXMPPConnection connection = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;XMPPTCPConnection(configBuilder.build())&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;connection.addConnectionListener(&lt;span style=&quot;color: #9876aa;&quot;&gt;connectionListener&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        try &lt;/span&gt;{&lt;br /&gt;            &lt;span style=&quot;color: grey;&quot;&gt;// mConnection.setReplyTimeout(10000);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            &lt;/span&gt;connection.connect()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;startConnected &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(Exception e) {&lt;br /&gt;            e.printStackTrace()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #9876aa;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot; ***** + Connected&quot; &lt;/span&gt;+e.getLocalizedMessage())&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        Log.&lt;span style=&quot;font-style: italic;&quot;&gt;i&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;dbXMPP&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Initializing!  2&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;    &lt;span style=&quot;color: grey;&quot;&gt;//  Connection Listener to check connection state&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public class &lt;/span&gt;XMPPConnectionListener &lt;span style=&quot;color: #cc7832;&quot;&gt;implements &lt;/span&gt;ConnectionListener {&lt;br /&gt;        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;connected&lt;/span&gt;(&lt;span style=&quot;color: #bbb529;&quot;&gt;@NonNull &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;final &lt;/span&gt;XMPPConnection connection) {&lt;br /&gt;&lt;br /&gt;            Log.&lt;span style=&quot;font-style: italic;&quot;&gt;i&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;dbXMPP&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Connected!&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;connected &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus&lt;/span&gt;.setText(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Connected&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus&lt;/span&gt;.setTextColor(Color.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;GREEN&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            if &lt;/span&gt;(!connection.isAuthenticated()) {&lt;br /&gt;              &lt;span style=&quot;color: grey;&quot;&gt;//  login();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;authenticated&lt;/span&gt;(XMPPConnection xmppConnection&lt;span style=&quot;color: #cc7832;&quot;&gt;, boolean &lt;/span&gt;b) {&lt;br /&gt;            Log.&lt;span style=&quot;font-style: italic;&quot;&gt;i&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;dbXMPP&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;authenticated!&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus&lt;/span&gt;.setText(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Connected , authenticated&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus&lt;/span&gt;.setTextColor(Color.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;GREEN&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;connectionClosed&lt;/span&gt;() {&lt;br /&gt;            Log.&lt;span style=&quot;font-style: italic;&quot;&gt;d&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;dbXMPP&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;ERROR connectionClosed!&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;//  connStatus.setText(&quot;connectionClosed&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;          //  connStatus.setTextColor(Color.RED);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;connectionClosedOnError&lt;/span&gt;(Exception e) {&lt;br /&gt;          &lt;span style=&quot;color: grey;&quot;&gt;//  connStatus.setText(&quot;connectionClosedOnError&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;           // connStatus.setTextColor(Color.RED);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            &lt;/span&gt;Log.&lt;span style=&quot;font-style: italic;&quot;&gt;d&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;dbXMPP&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;ERROR connectionClosedOnError!&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;private boolean &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;loggedin &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;login&lt;/span&gt;() {&lt;br /&gt;&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;try &lt;/span&gt;{&lt;br /&gt;&lt;br /&gt;                XMPPLogic.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;connection&lt;/span&gt;.login(&lt;span style=&quot;color: #9876aa;&quot;&gt;userName&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;passWord&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;//connection.login(userName, passWord);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(XMPPException | SmackException | IOException e) {&lt;br /&gt;                e.printStackTrace()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(Exception e) {&lt;br /&gt;                &lt;span style=&quot;color: #9876aa;&quot;&gt;loggedin &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;false;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;chat_created &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;false;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;if &lt;/span&gt;(!&lt;span style=&quot;color: #9876aa;&quot;&gt;loggedin&lt;/span&gt;) {&lt;br /&gt;                Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #9876aa;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Unable to login&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;//  disconnect();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;loggedin &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;else &lt;/span&gt;{&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #9876aa;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Logged in&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&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;span style=&quot;color: grey;&quot;&gt;/*&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;     * startLogin creates the connection for the log in process.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;     * First, a connection to the server must be established. After the connection&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;     *   is established, then only can you process the login details.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;     * */&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;private void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;startLogin&lt;/span&gt;(&lt;span style=&quot;color: #cc7832;&quot;&gt;final &lt;/span&gt;String username&lt;span style=&quot;color: #cc7832;&quot;&gt;, final &lt;/span&gt;String password) {&lt;br /&gt;&lt;span style=&quot;color: grey;&quot;&gt;/*&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        new Handler().postDelayed(new Runnable() {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            public void run() {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                // do something...&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    DomainBareJid serviceName = null;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    InetAddress address = null;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    try {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        serviceName = JidCreate.domainBareFrom(DOMAIN);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    } catch (XmppStringprepException e) {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        e.printStackTrace();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    try {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        address=InetAddress.getByName(HOST);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    } catch (UnknownHostException e) {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        e.printStackTrace();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    mConnectionConfiguration = XMPPTCPConnectionConfiguration.builder()&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                            .setUsernameAndPassword(username, password) // The username and password supplied by the user&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                            .setHostAddress(address)// Service name&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                            .setXmppDomain(serviceName)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                            .setHost(HOST) // Server host name&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                            .setPort(5222) // Incoming port (might depend on your XMPP server software)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                            .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled) // Security mode is disabled for example purposes&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                            .build();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    mConnection = new XMPPTCPConnection(mConnectionConfiguration);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    try {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        mConnection.setReplyTimeout(10000);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        mConnection.connect();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        startConnected = true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    } catch (Exception e) {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        e.printStackTrace();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    // If the connection is successful, we begin the login process&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    if(startConnected) {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        // connectionLogin();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        Log.e(TAG, &quot; ***** + Connected&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    } else {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        Log.e(TAG, &quot;Unable to connect&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        }, 10000);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        */&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;Thread(&lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;Runnable() {&lt;br /&gt;            &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;run&lt;/span&gt;() {&lt;br /&gt;                DomainBareJid serviceName = &lt;span style=&quot;color: #cc7832;&quot;&gt;null;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;InetAddress address = &lt;span style=&quot;color: #cc7832;&quot;&gt;null;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                try &lt;/span&gt;{&lt;br /&gt;                    serviceName = JidCreate.&lt;span style=&quot;font-style: italic;&quot;&gt;domainBareFrom&lt;/span&gt;(&lt;span style=&quot;color: #9876aa;&quot;&gt;DOMAIN&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(XmppStringprepException e) {&lt;br /&gt;                    e.printStackTrace()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;}&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;try &lt;/span&gt;{&lt;br /&gt;                     address=InetAddress.&lt;span style=&quot;font-style: italic;&quot;&gt;getByName&lt;/span&gt;(&lt;span style=&quot;color: #9876aa;&quot;&gt;HOST&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(UnknownHostException e) {&lt;br /&gt;                    e.printStackTrace()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;try &lt;/span&gt;{&lt;br /&gt;                    &lt;span style=&quot;color: #9876aa;&quot;&gt;mConnectionConfiguration &lt;/span&gt;= XMPPTCPConnectionConfiguration.&lt;span style=&quot;font-style: italic;&quot;&gt;builder&lt;/span&gt;()&lt;br /&gt;                            .setUsernameAndPassword(&lt;span style=&quot;color: #b389c5;&quot;&gt;username&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #b389c5;&quot;&gt;password&lt;/span&gt;) &lt;span style=&quot;color: grey;&quot;&gt;// The username and password supplied by the user&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                          &lt;/span&gt;.setResource(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;SomeResource&quot;&lt;/span&gt;)&lt;br /&gt;                           &lt;span style=&quot;color: grey;&quot;&gt;// .setHostAddress(address)// Service name&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                          //  .setXmppDomain(&quot;jabber.org&quot;)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                            &lt;/span&gt;.setXmppDomain(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;jabber.org&quot;&lt;/span&gt;)&lt;br /&gt;                           &lt;span style=&quot;color: grey;&quot;&gt;// .setHost(HOST) // Server host name&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                           &lt;/span&gt;.setPort(&lt;span style=&quot;color: #6897bb;&quot;&gt;5222&lt;/span&gt;) &lt;span style=&quot;color: grey;&quot;&gt;// Incoming port (might depend on your XMPP server software)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                         //   .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled) // Security mode is disabled for example purposes&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                           &lt;/span&gt;.allowEmptyOrNullUsernames()&lt;br /&gt;                            .build()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(XmppStringprepException e) {&lt;br /&gt;                    e.printStackTrace()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;                &lt;span style=&quot;color: #9876aa;&quot;&gt;mConnection &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;XMPPTCPConnection(&lt;span style=&quot;color: #9876aa;&quot;&gt;mConnectionConfiguration&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                try &lt;/span&gt;{&lt;br /&gt;                   &lt;span style=&quot;color: grey;&quot;&gt;// mConnection.setReplyTimeout(10000);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;mConnection&lt;/span&gt;.connect()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;startConnected &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(Exception e) {&lt;br /&gt;                    e.printStackTrace()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #9876aa;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot; ***** + Connected&quot; &lt;/span&gt;+e.getLocalizedMessage())&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// If the connection is successful, we begin the login process&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #9876aa;&quot;&gt;startConnected&lt;/span&gt;) {&lt;br /&gt;                   &lt;span style=&quot;color: grey;&quot;&gt;// connectionLogin();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                    &lt;/span&gt;Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #9876aa;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot; ***** + Connected&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;runOnUiThread(&lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;Runnable() {&lt;br /&gt;                        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;                        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;run&lt;/span&gt;() {&lt;br /&gt;                            &lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus&lt;/span&gt;.setText(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Connected&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus&lt;/span&gt;.setTextColor(Color.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;GREEN&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                        &lt;/span&gt;}&lt;br /&gt;                    })&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;else &lt;/span&gt;{&lt;br /&gt;                    runOnUiThread(&lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;Runnable() {&lt;br /&gt;                        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;                        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;run&lt;/span&gt;() {&lt;br /&gt;                            &lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus&lt;/span&gt;.setText(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Not Connected&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus&lt;/span&gt;.setTextColor(Color.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;RED&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                        &lt;/span&gt;}&lt;br /&gt;                    })&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #9876aa;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Unable to connect&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;}&lt;br /&gt;            }&lt;br /&gt;        }).start()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;implementation &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;org.igniterealtime.smack:smack-tcp:4.3.0&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;// Optional for XMPPTCPConnection&lt;br /&gt;&lt;/span&gt;implementation &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;org.igniterealtime.smack:smack-android-extensions:4.3.0&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&lt;br /&gt;&lt;/span&gt;implementation &lt;span style=&quot;color: #6a8759;&quot;&gt;&#39;org.igniterealtime.smack:smack-android:4.3.0&#39;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xml version&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;1.0&quot; &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;utf-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;LinearLayout &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;http://schemas.android.com/apk/res-auto&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;http://schemas.android.com/tools&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:orientation&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;vertical&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_gravity&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;center&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:gravity&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;center&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:context&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;.MainActivity2&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;Button&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;@+id/button&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;wrap_content&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_marginTop&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;10dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;wrap_content&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:text&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;Connect&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_editor_absoluteX&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;178dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_editor_absoluteY&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;217dp&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;TextView&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;@+id/textView&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;wrap_content&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_marginTop&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;50dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;wrap_content&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:textSize&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;20dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:maxLines&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;10&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:text&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;Connection Status&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_editor_absoluteX&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;166dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_editor_absoluteY&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;381dp&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;package &lt;/span&gt;com.ttg.myapplicationxmpptest&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;androidx.appcompat.app.AppCompatActivity&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.graphics.Color&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.os.AsyncTask&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.os.Bundle&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.util.Log&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.view.View&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.Button&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.EditText&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.TextView&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.apache.http.conn.ssl.SSLSocketFactory&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.AbstractXMPPConnection&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.ConnectionConfiguration&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.XMPPConnection&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.packet.Presence&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.tcp.XMPPTCPConnection&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public class &lt;/span&gt;MainActivity2 &lt;span style=&quot;color: #cc7832;&quot;&gt;extends &lt;/span&gt;AppCompatActivity {&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;protected static final &lt;/span&gt;String &lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;TAG &lt;/span&gt;= &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;ConnectionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;/*&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;     * SERVICE_NAME and HOST_NAME are your server details.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;     * Make sure you edit this with your own&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;     * */&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected static final &lt;/span&gt;String &lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;SERVICE_NAME &lt;/span&gt;= &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;mongoose.netaxis.co&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    protected static final &lt;/span&gt;String &lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;HOST_NAME &lt;/span&gt;= &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;mongoose.netaxis.co&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    public static &lt;/span&gt;AbstractXMPPConnection &lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;mConnection&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    private &lt;/span&gt;XMPPTCPConnectionConfiguration &lt;span style=&quot;color: #9876aa;&quot;&gt;mConnectionConfiguration&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    private boolean &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;startConnected &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;false;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;EditText &lt;span style=&quot;color: #9876aa;&quot;&gt;userNameET&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;passwordET&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;TextView &lt;span style=&quot;color: #9876aa;&quot;&gt;status&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onCreate&lt;/span&gt;(Bundle savedInstanceState) {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;setContentView(R.layout.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;activity_main2&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;Button connnect = findViewById(R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;button&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;userNameET &lt;/span&gt;= findViewById(R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;userName&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;passwordET &lt;/span&gt;= findViewById(R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;password&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;status &lt;/span&gt;= findViewById(R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;status&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;connnect.setOnClickListener(&lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;View.OnClickListener() {&lt;br /&gt;            &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onClick&lt;/span&gt;(View view) {&lt;br /&gt;                startLogin(&lt;span style=&quot;color: #9876aa;&quot;&gt;userNameET&lt;/span&gt;.getText().toString()&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;passwordET&lt;/span&gt;.getText().toString())&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;//  userNameET.setText(&quot;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;               // passwordET.setText(&quot;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            &lt;/span&gt;}&lt;br /&gt;        })&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: grey;&quot;&gt;/*&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;     * startLogin creates the connection for the log in process.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;     * First, a connection to the server must be established. After the connection&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;     *   is established, then only can you process the login details.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;     * */&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;private void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;startLogin&lt;/span&gt;(&lt;span style=&quot;color: #cc7832;&quot;&gt;final &lt;/span&gt;String username&lt;span style=&quot;color: #cc7832;&quot;&gt;, final &lt;/span&gt;String password) {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;Thread(&lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;Runnable() {&lt;br /&gt;            &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;run&lt;/span&gt;() {&lt;br /&gt;                &lt;span style=&quot;color: #9876aa;&quot;&gt;mConnectionConfiguration &lt;/span&gt;= XMPPTCPConnectionConfiguration.&lt;span style=&quot;font-style: italic;&quot;&gt;builder&lt;/span&gt;()&lt;br /&gt;                        .setUsernameAndPassword(&lt;span style=&quot;color: #b389c5;&quot;&gt;username&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #b389c5;&quot;&gt;password&lt;/span&gt;) &lt;span style=&quot;color: grey;&quot;&gt;// The username and password supplied by the user&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        &lt;/span&gt;.setServiceName(&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;SERVICE_NAME&lt;/span&gt;) &lt;span style=&quot;color: grey;&quot;&gt;// Service name&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        &lt;/span&gt;.setHost(&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;HOST_NAME&lt;/span&gt;) &lt;span style=&quot;color: grey;&quot;&gt;// Server host name&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        &lt;/span&gt;.setPort(&lt;span style=&quot;color: #6897bb;&quot;&gt;5222&lt;/span&gt;) &lt;span style=&quot;color: grey;&quot;&gt;// Incoming port (might depend on your XMPP server software)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                        &lt;/span&gt;.setSecurityMode(ConnectionConfiguration.SecurityMode.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;ifpossible&lt;/span&gt;) &lt;span style=&quot;color: grey;&quot;&gt;// Security mode is disabled for example purposes&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                         &lt;/span&gt;.setCompressionEnabled(&lt;span style=&quot;color: #cc7832;&quot;&gt;true&lt;/span&gt;)&lt;br /&gt;                        .setResource(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;sender&quot;&lt;/span&gt;)&lt;br /&gt;                        .setDebuggerEnabled(&lt;span style=&quot;color: #cc7832;&quot;&gt;true&lt;/span&gt;)&lt;br /&gt;                        .build()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;mConnection &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;XMPPTCPConnection(&lt;span style=&quot;color: #9876aa;&quot;&gt;mConnectionConfiguration&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                try &lt;/span&gt;{&lt;br /&gt;                    &lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;mConnection&lt;/span&gt;.connect()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;startConnected &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(Exception e) {&lt;br /&gt;                    e.printStackTrace()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// If the connection is successful, we begin the login process&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #9876aa;&quot;&gt;startConnected&lt;/span&gt;) {&lt;br /&gt;                    Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Connected&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;connectionLogin()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;else &lt;/span&gt;{&lt;br /&gt;                    Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Unable to connect&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;}&lt;br /&gt;            }&lt;br /&gt;        }).start()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;private boolean &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;loggedIn &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    private void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;connectionLogin&lt;/span&gt;() {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;try &lt;/span&gt;{&lt;br /&gt;            &lt;span style=&quot;color: grey;&quot;&gt;//XMPPConnection connection = new XMPPConnection(mConnectionConfiguration);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;           // xmppClient.setConnection(mConnection);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;mConnection&lt;/span&gt;.login()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;Presence presence = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;Presence(Presence.Type.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;available&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;mConnection&lt;/span&gt;.sendPacket(presence)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(Exception e) {&lt;br /&gt;            &lt;span style=&quot;color: #9876aa;&quot;&gt;loggedIn &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;false;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: grey;&quot;&gt;// If the login fails, we disconnect from the server&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;if&lt;/span&gt;(!&lt;span style=&quot;color: #9876aa;&quot;&gt;loggedIn&lt;/span&gt;) {&lt;br /&gt;            Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Unable to login&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;disconnect()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;loggedIn &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;else &lt;/span&gt;{&lt;br /&gt;            &lt;span style=&quot;color: grey;&quot;&gt;// If the login succeeds, we implement the chat listener.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            // It&#39;s important to implement the listener here so we can receive messages sent to us&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            //      when we&#39;re offline.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;          //  createChatListener();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            // Callback to LoginScreen to change the UI to the ChatScreen listview&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;           // EventBus.getDefault().post(new LoggedInEvent(true));&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            &lt;/span&gt;Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Logged in&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;runOnUiThread(&lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;Runnable() {&lt;br /&gt;                &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;run&lt;/span&gt;() {&lt;br /&gt;                    &lt;span style=&quot;color: #9876aa;&quot;&gt;status&lt;/span&gt;.setText(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Logged In  : &quot; &lt;/span&gt;+ &lt;span style=&quot;color: #9876aa;&quot;&gt;userNameET&lt;/span&gt;.getText().toString())&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;status&lt;/span&gt;.setTextColor(Color.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;GREEN&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;}&lt;br /&gt;            })&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;private void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;disconnect&lt;/span&gt;() {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;mConnection &lt;/span&gt;!= &lt;span style=&quot;color: #cc7832;&quot;&gt;null &lt;/span&gt;&amp;amp;&amp;amp; &lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;mConnection&lt;/span&gt;.isConnected()) {&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;AsyncTask&amp;lt;Void&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;Void&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;Void&amp;gt;() {&lt;br /&gt;                &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected &lt;/span&gt;Void &lt;span style=&quot;color: #ffc66d;&quot;&gt;doInBackground&lt;/span&gt;(Void... params) {&lt;br /&gt;                    &lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;mConnection&lt;/span&gt;.disconnect()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Connection disconnected&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    return null;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;}&lt;br /&gt;            }.execute()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xml version&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;1.0&quot; &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;utf-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;LinearLayout &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;http://schemas.android.com/apk/res-auto&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;http://schemas.android.com/tools&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:orientation&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;vertical&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_gravity&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;center&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:gravity&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;center&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:context&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;.MainActivity2&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;EditText&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;@+id/userName&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;50dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:textColor&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;#000000&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:hint&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;user name&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_margin&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;10dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:textColorHint&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;@color/black&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:text&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;EditText&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;@+id/password&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;50dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:textColor&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;#000000&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_margin&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;10dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:hint&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;password&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:textColorHint&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;@color/black&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:text&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;Button&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;@+id/button&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;wrap_content&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_marginTop&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;10dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;wrap_content&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:text&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;Connect&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_editor_absoluteX&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;178dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_editor_absoluteY&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;217dp&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;TextView&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;@+id/status&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;wrap_content&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_marginTop&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;50dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;wrap_content&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:textSize&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;20dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:maxLines&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;10&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:text&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;Connection Status&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_editor_absoluteX&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;166dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_editor_absoluteY&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;=&quot;381dp&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;implementation &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;org.igniterealtime.smack:smack-android-extensions:4.1.3&quot;&lt;br /&gt;&lt;/span&gt;implementation &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;org.igniterealtime.smack:smack-tcp:4.1.3&quot;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;package &lt;/span&gt;com.ttg.androidxmppsample&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;androidx.annotation.&lt;span style=&quot;color: #bbb529;&quot;&gt;NonNull&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;androidx.appcompat.app.AppCompatActivity&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.graphics.Color&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.os.Bundle&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.os.StrictMode&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.util.Log&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.view.View&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.Button&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.TextView&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.AbstractXMPPConnection&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.ConnectionConfiguration&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.ConnectionListener&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.SmackException&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.XMPPConnection&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.XMPPException&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.tcp.XMPPTCPConnection&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;org.jxmpp.stringprep.XmppStringprepException&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;java.io.IOException&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public class &lt;/span&gt;MainActivityInitXMPP &lt;span style=&quot;color: #cc7832;&quot;&gt;extends &lt;/span&gt;AppCompatActivity {&lt;br /&gt;    String &lt;span style=&quot;color: #9876aa;&quot;&gt;TAG &lt;/span&gt;= &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;ConnectXmpp&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;String &lt;span style=&quot;color: #9876aa;&quot;&gt;DOMAIN &lt;/span&gt;= &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;jabber.org&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;String &lt;span style=&quot;color: #9876aa;&quot;&gt;HOST &lt;/span&gt;= &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;10.11.227.130&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    int &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;PORT &lt;/span&gt;= &lt;span style=&quot;color: #6897bb;&quot;&gt;5222&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    private &lt;/span&gt;String &lt;span style=&quot;color: #9876aa;&quot;&gt;userName &lt;/span&gt;=&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    private &lt;/span&gt;String &lt;span style=&quot;color: #9876aa;&quot;&gt;passWord &lt;/span&gt;= &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    public static boolean &lt;/span&gt;&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;connected &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;false;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;XMPPConnectionListener &lt;span style=&quot;color: #9876aa;&quot;&gt;connectionListener &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;MainActivityInitXMPP.XMPPConnectionListener()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;TextView &lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    private boolean &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;startConnected &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;false;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;AbstractXMPPConnection &lt;span style=&quot;color: #9876aa;&quot;&gt;connection &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;null;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onCreate&lt;/span&gt;(Bundle savedInstanceState) {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;setContentView(R.layout.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;activity_main2&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;StrictMode.ThreadPolicy policy = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;StrictMode.ThreadPolicy.Builder().permitNetwork().build()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;StrictMode.&lt;span style=&quot;font-style: italic;&quot;&gt;setThreadPolicy&lt;/span&gt;(policy)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;Button btn  = findViewById(R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;button&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus &lt;/span&gt;= findViewById(R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;textView&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;btn.setOnClickListener(&lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;View.OnClickListener() {&lt;br /&gt;            &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onClick&lt;/span&gt;(View view) {&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;try &lt;/span&gt;{&lt;br /&gt;                    init(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(XmppStringprepException e) {&lt;br /&gt;                    Log.&lt;span style=&quot;font-style: italic;&quot;&gt;i&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;dbXMPP&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;XmppStringprepException!&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;e.printStackTrace()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// startLogin(&quot;lx2rvktowng3&quot;,&quot;9739876646vV&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                // startLogin(&quot;&quot;,&quot;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            &lt;/span&gt;}&lt;br /&gt;        })&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;init &lt;/span&gt;(String username&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;String password) &lt;span style=&quot;color: #cc7832;&quot;&gt;throws &lt;/span&gt;XmppStringprepException {&lt;br /&gt;&lt;br /&gt;        Log.&lt;span style=&quot;font-style: italic;&quot;&gt;i&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;dbXMPP&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Initializing!&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;XMPPTCPConnectionConfiguration.Builder configuration =  XMPPTCPConnectionConfiguration.&lt;span style=&quot;font-style: italic;&quot;&gt;builder&lt;/span&gt;()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;configuration.setUsernameAndPassword(username&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;/span&gt;password)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;configuration.setSecurityMode(ConnectionConfiguration.SecurityMode.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;ifpossible&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;configuration.setResource(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;SomeResource&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;configuration.setXmppDomain(&lt;span style=&quot;color: #9876aa;&quot;&gt;DOMAIN&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;configuration.setPort(&lt;span style=&quot;color: #9876aa;&quot;&gt;PORT&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;configuration.allowEmptyOrNullUsernames()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connection &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;XMPPTCPConnection(configuration.build())&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connection&lt;/span&gt;.addConnectionListener(&lt;span style=&quot;color: #9876aa;&quot;&gt;connectionListener&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        try &lt;/span&gt;{&lt;br /&gt;            &lt;span style=&quot;color: grey;&quot;&gt;// mConnection.setReplyTimeout(10000);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connection&lt;/span&gt;.connect()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;startConnected &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(Exception e) {&lt;br /&gt;            e.printStackTrace()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #9876aa;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot; ***** + Connected&quot; &lt;/span&gt;+e.getLocalizedMessage())&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: grey;&quot;&gt;//  Connection Listener to check connection state&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public class &lt;/span&gt;XMPPConnectionListener &lt;span style=&quot;color: #cc7832;&quot;&gt;implements &lt;/span&gt;ConnectionListener {&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;connected&lt;/span&gt;(&lt;span style=&quot;color: #bbb529;&quot;&gt;@NonNull &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;final &lt;/span&gt;XMPPConnection connection) {&lt;br /&gt;&lt;br /&gt;            Log.&lt;span style=&quot;font-style: italic;&quot;&gt;i&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;dbXMPP&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Connected!&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;connected &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus&lt;/span&gt;.setText(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Connected&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus&lt;/span&gt;.setTextColor(Color.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;GREEN&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            if &lt;/span&gt;(!connection.isAuthenticated()) {&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;//  login();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;authenticated&lt;/span&gt;(XMPPConnection xmppConnection&lt;span style=&quot;color: #cc7832;&quot;&gt;, boolean &lt;/span&gt;b) {&lt;br /&gt;            Log.&lt;span style=&quot;font-style: italic;&quot;&gt;i&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;dbXMPP&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;authenticated!&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus&lt;/span&gt;.setText(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Connected , authenticated&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;connStatus&lt;/span&gt;.setTextColor(Color.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;GREEN&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;connectionClosed&lt;/span&gt;() {&lt;br /&gt;            Log.&lt;span style=&quot;font-style: italic;&quot;&gt;d&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;dbXMPP&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;ERROR connectionClosed!&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;//  connStatus.setText(&quot;connectionClosed&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            //  connStatus.setTextColor(Color.RED);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;connectionClosedOnError&lt;/span&gt;(Exception e) {&lt;br /&gt;            &lt;span style=&quot;color: grey;&quot;&gt;//  connStatus.setText(&quot;connectionClosedOnError&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            // connStatus.setTextColor(Color.RED);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            &lt;/span&gt;Log.&lt;span style=&quot;font-style: italic;&quot;&gt;d&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;dbXMPP&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;ERROR connectionClosedOnError!&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;private boolean &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;loggedin &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;login&lt;/span&gt;() {&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;try &lt;/span&gt;{&lt;br /&gt;&lt;br /&gt;            &lt;span style=&quot;color: #9876aa;&quot;&gt;connection&lt;/span&gt;.login(&lt;span style=&quot;color: #9876aa;&quot;&gt;userName&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;passWord&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;//connection.login(userName, passWord);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(XMPPException | SmackException | IOException e) {&lt;br /&gt;            e.printStackTrace()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(Exception e) {&lt;br /&gt;            &lt;span style=&quot;color: #9876aa;&quot;&gt;loggedin &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;false;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;//  chat_created = false;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;if &lt;/span&gt;(!&lt;span style=&quot;color: #9876aa;&quot;&gt;loggedin&lt;/span&gt;) {&lt;br /&gt;            Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #9876aa;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Unable to login&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;//  disconnect();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;loggedin &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;else &lt;/span&gt;{&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #9876aa;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Logged in&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;    }&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/4173722283378000236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/07/xmpp-connection-android-test.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/4173722283378000236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/4173722283378000236'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/07/xmpp-connection-android-test.html' title=' XMPP SMACK Connection android Test'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-3937152028411531607</id><published>2022-03-19T16:01:00.001+05:30</published><updated>2022-03-20T16:41:42.553+05:30</updated><title type='text'>Android Kotlin  Advantages </title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Android Kotlin&amp;nbsp; Advantages&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;1.Readability&lt;/p&gt;&lt;p&gt;2. Null Safety&lt;/p&gt;&lt;p&gt;3.Interoperable&lt;/p&gt;&lt;p&gt;4. SmartCast&lt;/p&gt;&lt;p&gt;5.Perfomance&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Android Kotlin&amp;nbsp; DisAdvantages&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;1. NameSpace Declaration&amp;nbsp;&lt;/p&gt;&lt;p&gt;2. No Static Declaration&amp;nbsp;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/3937152028411531607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/03/android-kotlin-advantages.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/3937152028411531607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/3937152028411531607'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2022/03/android-kotlin-advantages.html' title='Android Kotlin  Advantages '/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-1441284097403543716</id><published>2017-07-24T11:02:00.000+05:30</published><updated>2017-07-24T11:02:49.720+05:30</updated><title type='text'>Configure Kotlin Plugin to Android Studio </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Kotlin is a new programming language Developed by JetBrains.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This article about&lt;br /&gt;
1.How to configure Kotlin plugin to Android Studio.&lt;br /&gt;
2. Create Hollo world App.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Install Kotlin Plugin to Android Studio&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;File -&amp;gt; Settings -&amp;gt; Plugins - &amp;gt; Browse Repositories -&amp;gt; Search &amp;nbsp;-&amp;gt; Kotlin -&amp;gt; Install&lt;/b&gt;&lt;br /&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/AVvXsEh0dcsM3u-nGakffsN5plWus3FEHuoU8dvfpzt9g39vl9p_sQ2xRE1hyphenhyphen8vfpP5-HnKhE00Mpwjub9j9cEtIEt81XzPEe2u8R_5vhptABeAXWW3kugWSUlDxZsergx2RqzDGcTan_X62UF4/s1600/p1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;695&quot; data-original-width=&quot;865&quot; height=&quot;257&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0dcsM3u-nGakffsN5plWus3FEHuoU8dvfpzt9g39vl9p_sQ2xRE1hyphenhyphen8vfpP5-HnKhE00Mpwjub9j9cEtIEt81XzPEe2u8R_5vhptABeAXWW3kugWSUlDxZsergx2RqzDGcTan_X62UF4/s320/p1.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;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Create new Android Project and Apply Kotlin Plugin to your project.&lt;br /&gt;
&lt;br /&gt;
Apply Kotlin to your project&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;background-color: #242a3a; border-radius: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #444444; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; font-size: 14px; font-weight: bold; line-height: 1.3875; margin-bottom: 1em; overflow: auto; padding: 1em; word-break: break-all; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;background: transparent; border-radius: 0px; box-sizing: border-box; color: #cccccc; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; font-size: inherit; overflow: auto; padding: 0px; word-break: break-all; word-wrap: normal;&quot;&gt;&lt;span class=&quot;k&quot; style=&quot;box-sizing: border-box; color: #cc99cc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;buildscript&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;box-sizing: border-box; color: #66cccc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;n&quot; style=&quot;box-sizing: border-box; transition: all 0.2s ease; word-break: break-all;&quot;&gt;ext&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;box-sizing: border-box; color: #66cccc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot; style=&quot;box-sizing: border-box; color: #6699cc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;kotlin_version&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;box-sizing: border-box; color: #66cccc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot; style=&quot;box-sizing: border-box; color: #99cc99; transition: all 0.2s ease; word-break: break-all;&quot;&gt;&quot;1.0.6&quot;&lt;/span&gt; &lt;span class=&quot;c1&quot; style=&quot;box-sizing: border-box; color: #999999; transition: all 0.2s ease; word-break: break-all;&quot;&gt;// replace with the latest (stable) version: https://github.com/JetBrains/kotlin/releases/latest&lt;/span&gt;

    &lt;span class=&quot;k&quot; style=&quot;box-sizing: border-box; color: #cc99cc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;repositories&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;box-sizing: border-box; color: #66cccc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot; style=&quot;box-sizing: border-box; transition: all 0.2s ease; word-break: break-all;&quot;&gt;jcenter&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;box-sizing: border-box; color: #66cccc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;box-sizing: border-box; color: #66cccc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;box-sizing: border-box; color: #cc99cc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;dependencies&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;box-sizing: border-box; color: #66cccc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot; style=&quot;box-sizing: border-box; transition: all 0.2s ease; word-break: break-all;&quot;&gt;classpath&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;box-sizing: border-box; color: #99cc99; transition: all 0.2s ease; word-break: break-all;&quot;&gt;&#39;com.android.tools.build:gradle:2.2.3&#39;&lt;/span&gt;
        &lt;span class=&quot;n&quot; style=&quot;box-sizing: border-box; transition: all 0.2s ease; word-break: break-all;&quot;&gt;classpath&lt;/span&gt; &lt;span class=&quot;s2&quot; style=&quot;box-sizing: border-box; color: #99cc99; transition: all 0.2s ease; word-break: break-all;&quot;&gt;&quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&quot;&lt;/span&gt;
    &lt;span class=&quot;o&quot; style=&quot;box-sizing: border-box; color: #66cccc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot; style=&quot;box-sizing: border-box; color: #66cccc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;background-color: #242a3a; border-radius: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #444444; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; font-size: 14px; font-weight: bold; line-height: 1.3875; margin-bottom: 1em; overflow: auto; padding: 1em; word-break: break-all; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;background: transparent; border-radius: 0px; box-sizing: border-box; color: #cccccc; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; font-size: inherit; overflow: auto; padding: 0px; word-break: break-all; word-wrap: normal;&quot;&gt;&lt;span class=&quot;o&quot; style=&quot;box-sizing: border-box; color: #66cccc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;apply&lt;span style=&quot;color: #cccccc;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nl&quot; style=&quot;box-sizing: border-box; color: #cccccc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;plugin:&lt;/span&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;box-sizing: border-box; color: #99cc99; transition: all 0.2s ease; word-break: break-all;&quot;&gt;&#39;com.android.application&#39;&lt;/span&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;box-sizing: border-box; color: #cccccc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;apply&lt;/span&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nl&quot; style=&quot;box-sizing: border-box; color: #cccccc; transition: all 0.2s ease; word-break: break-all;&quot;&gt;plugin:&lt;/span&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;box-sizing: border-box; color: #99cc99; transition: all 0.2s ease; word-break: break-all;&quot;&gt;&#39;kotlin-android&#39;&lt;/span&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;c1&quot; style=&quot;box-sizing: border-box; color: #999999; transition: all 0.2s ease; word-break: break-all;&quot;&gt;// apply kotlin android plugin&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;b&gt;&lt;span style=&quot;color: #6aa84f; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: #6aa84f; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: #6aa84f; font-size: large;&quot;&gt;Convert Activity java code to Kotlin&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This is java code&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;package &lt;/span&gt;world.hello.kotlin.kotlinfirstproject;

&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.support.v7.app.AppCompatActivity;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.os.Bundle;

&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public class &lt;/span&gt;MainActivity &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;extends &lt;/span&gt;AppCompatActivity {

    &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;protected void &lt;/span&gt;onCreate(Bundle savedInstanceState) {
        &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState);
        setContentView(R.layout.&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;activity_main&lt;/span&gt;);
    }
}&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;&quot;&gt;
&lt;/pre&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/AVvXsEgD-WI2ds4xUCtzm7OtjYKPVkT2xW9GFO9IlgPOaC7aPqPCSHHbHcVJs8P8CIF-2ETmrdRbTD7iUAgHIACN78Wk8mQQI15OnXiOmmlXRLzIO6BRQKZRu2vCGGFW308qhEhmqCk4UZuxv2s/s1600/23.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;744&quot; data-original-width=&quot;857&quot; height=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD-WI2ds4xUCtzm7OtjYKPVkT2xW9GFO9IlgPOaC7aPqPCSHHbHcVJs8P8CIF-2ETmrdRbTD7iUAgHIACN78Wk8mQQI15OnXiOmmlXRLzIO6BRQKZRu2vCGGFW308qhEhmqCk4UZuxv2s/s320/23.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #cc0000; font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;After Conversion&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;&quot;&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;package &lt;/span&gt;world.hello.kotlin.kotlinfirstproject

&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.support.v7.app.AppCompatActivity
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.os.Bundle

&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;class &lt;/span&gt;MainActivity : AppCompatActivity() {

    &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;override fun &lt;/span&gt;onCreate(savedInstanceState: Bundle?) {
        &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState)
        setContentView(R.layout.&lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;activity_main&lt;/span&gt;)
    }
}&lt;/pre&gt;
&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;&quot;&gt;
&lt;/pre&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;&quot;&gt;
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/1441284097403543716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2017/07/configure-kotlin-plugin-to-android.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/1441284097403543716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/1441284097403543716'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2017/07/configure-kotlin-plugin-to-android.html' title='Configure Kotlin Plugin to Android Studio '/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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/AVvXsEh0dcsM3u-nGakffsN5plWus3FEHuoU8dvfpzt9g39vl9p_sQ2xRE1hyphenhyphen8vfpP5-HnKhE00Mpwjub9j9cEtIEt81XzPEe2u8R_5vhptABeAXWW3kugWSUlDxZsergx2RqzDGcTan_X62UF4/s72-c/p1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3121772154556583723.post-8742543002104616034</id><published>2016-12-16T15:39:00.004+05:30</published><updated>2016-12-16T15:39:51.181+05:30</updated><title type='text'>Android NANOHttpd share images example</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Android NANOHttpd&lt;br /&gt;
&lt;br /&gt;
Share files between the device using local network.&lt;br /&gt;
&lt;br /&gt;
* Pic images from phone gallery and share with local network.&lt;br /&gt;
*It will work only same wifi network&lt;br /&gt;
*share files have used GET method. &lt;br /&gt;
&lt;br /&gt;
add gradle&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9.0pt;&quot;&gt;dependencies {
  &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;    &lt;/span&gt;compile &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&#39;org.nanohttpd:nanohttpd:2.2.0&#39;&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;
&lt;/span&gt;}&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9.0pt;&quot;&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9.0pt;&quot;&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9.0pt;&quot;&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Activity source code&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9.0pt;&quot;&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;pre style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9.0pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;package &lt;/span&gt;nanohttpd.test.com.postimage;

&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.content.ComponentName;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.content.Context;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.content.Intent;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.content.ServiceConnection;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.os.IBinder;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.support.v7.app.AppCompatActivity;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.os.Bundle;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.util.Log;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.view.View;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.widget.Button;

&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;com.esafirm.imagepicker.features.ImagePicker;

&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public class &lt;/span&gt;MainActivity &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;extends &lt;/span&gt;AppCompatActivity {

    &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public  static int &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;REQUEST_CODE_PICKER &lt;/span&gt;=&lt;span style=&quot;color: blue;&quot;&gt;103&lt;/span&gt;;
    NanoTest &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;mService&lt;/span&gt;;
    Button &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;btn&lt;/span&gt;;
    String &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;imagePath &lt;/span&gt;=&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;&quot;&lt;/span&gt;;
    &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;protected void &lt;/span&gt;onCreate(Bundle savedInstanceState) {
        &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState);
        setContentView(R.layout.&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;activity_main&lt;/span&gt;);
         &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;btn &lt;/span&gt;= (Button)findViewById(R.id.&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;button&lt;/span&gt;);
        &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;btn&lt;/span&gt;.setOnClickListener(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;View.OnClickListener() {
            &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;onClick(View view) {

                ImagePicker.&lt;span style=&quot;font-style: italic;&quot;&gt;create&lt;/span&gt;(MainActivity.&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;this&lt;/span&gt;) &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;// Activity or Fragment&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;                        &lt;/span&gt;.start(&lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;REQUEST_CODE_PICKER&lt;/span&gt;);
            }
        });
    }

    &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;protected void &lt;/span&gt;onActivityResult(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;int &lt;/span&gt;requestCode, &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;int &lt;/span&gt;resultCode, Intent data) {
        &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if &lt;/span&gt;(requestCode == &lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;REQUEST_CODE_PICKER &lt;/span&gt;&amp;amp;&amp;amp; resultCode == &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;RESULT_OK &lt;/span&gt;&amp;amp;&amp;amp; data != &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;) {

          &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;//  printImages(images);&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;imagePath &lt;/span&gt;= &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;&quot;&lt;/span&gt;+ImagePicker.&lt;span style=&quot;font-style: italic;&quot;&gt;getImages&lt;/span&gt;(data).get(&lt;span style=&quot;color: blue;&quot;&gt;0&lt;/span&gt;).getPath();
            &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;mService &lt;/span&gt;!= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;) {
                &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;mService&lt;/span&gt;.setImagePath(&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;imagePath&lt;/span&gt;);
            }
            Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;MainActivity&quot;&lt;/span&gt;,&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;imagePath :: &quot; &lt;/span&gt;+ImagePicker.&lt;span style=&quot;font-style: italic;&quot;&gt;getImages&lt;/span&gt;(data).get(&lt;span style=&quot;color: blue;&quot;&gt;0&lt;/span&gt;).getPath());
            Intent mIntent = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;Intent(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;this&lt;/span&gt;, NanoTest.&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;class&lt;/span&gt;);
            bindService(mIntent, &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;mConnection&lt;/span&gt;, Context.&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;BIND_AUTO_CREATE&lt;/span&gt;);
            &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;return&lt;/span&gt;;
        }
    }

    &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private &lt;/span&gt;ServiceConnection &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;mConnection &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;ServiceConnection () {
        &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;onServiceConnected(ComponentName className, IBinder service) {
            NanoTest.NanoTestBinder binder = (NanoTest.NanoTestBinder) service;
            &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;mService &lt;/span&gt;= binder.getService();
            &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;mService &lt;/span&gt;!= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;) {
                &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;mService&lt;/span&gt;.setImagePath(&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;imagePath&lt;/span&gt;);
            }
            &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;mService&lt;/span&gt;.initializeServices(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;true&lt;/span&gt;,&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;imagePath&lt;/span&gt;);
        }
        &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;onServiceDisconnected(ComponentName arg0) {
            &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;mService &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;;
        }
    };



}&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9.0pt;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9.0pt;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9.0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;NanoHttpUtils Class&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9.0pt;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9.0pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;package &lt;/span&gt;nanohttpd.test.com.postimage;

&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.app.Service;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.content.Intent;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.net.wifi.WifiManager;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.os.Binder;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.os.Environment;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.os.IBinder;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;android.util.Log;


&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;org.json.JSONArray;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;org.json.JSONException;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;org.json.JSONObject;

&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.io.FileInputStream;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.io.FileNotFoundException;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.io.IOException;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.net.DatagramPacket;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.net.DatagramSocket;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.net.InetAddress;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.net.NetworkInterface;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.net.SocketException;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.net.SocketTimeoutException;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.text.DateFormat;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.text.ParseException;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.text.SimpleDateFormat;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.util.ArrayList;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.util.Date;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.util.Enumeration;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.util.HashMap;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.util.List;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.util.Locale;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;java.util.Map;

&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;fi.iki.elonen.NanoHTTPD;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;fi.iki.elonen.NanoHTTPD.Method;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;retrofit2.Call;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;retrofit2.Callback;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;retrofit2.Response;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;retrofit2.Retrofit;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;retrofit2.converter.gson.GsonConverterFactory;

&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public class &lt;/span&gt;NanoTest &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;extends &lt;/span&gt;Service  &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;implements &lt;/span&gt;Callback&amp;lt;String&amp;gt; {
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private static final &lt;/span&gt;String &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;AUTH_TYPE            &lt;/span&gt;= &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Basic &quot;&lt;/span&gt;;
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private static final &lt;/span&gt;String &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;TAG                &lt;/span&gt;= &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;[NANO]&quot;&lt;/span&gt;;
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private static final int &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;BUFFER_SIZE               &lt;/span&gt;= &lt;span style=&quot;color: blue;&quot;&gt;128&lt;/span&gt;;       &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;// 128 bytes&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private static final int &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;RECEIVE_TIMEOUT         &lt;/span&gt;= &lt;span style=&quot;color: blue;&quot;&gt;1000&lt;/span&gt;*&lt;span style=&quot;color: blue;&quot;&gt;30&lt;/span&gt;;        &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;// 30 sec&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private static final &lt;/span&gt;String &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;BROADCAST_MESSAGE_HELLO &lt;/span&gt;= &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Hello&quot;&lt;/span&gt;;
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private static final &lt;/span&gt;String &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;BROADCAST_MESSAGE_REPLY &lt;/span&gt;= &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;HRU&quot;&lt;/span&gt;;
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public static final int &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;PORT &lt;/span&gt;= &lt;span style=&quot;color: blue;&quot;&gt;1507&lt;/span&gt;;
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private final &lt;/span&gt;IBinder &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;mBinder                 &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;NanoTestBinder();
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private static &lt;/span&gt;String[] &lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;ipAddresses             &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;;
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private &lt;/span&gt;TestNanoHttpD &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;server                  &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;;
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private &lt;/span&gt;HashMap&amp;lt;String, ServerSyncService&amp;gt;
                              &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;allSyncServices &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;;
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private volatile &lt;/span&gt;DatagramSocket &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;socket              &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;;
   &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;// Client specific&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private static &lt;/span&gt;InetAddress &lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;lastKnownServerAddress  &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;;          &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;/*&amp;lt; Auto-detected server address */&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private boolean &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;bRunDetection                 &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;true&lt;/span&gt;;
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private static final int &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;SLEEP_TIME             &lt;/span&gt;= &lt;span style=&quot;color: blue;&quot;&gt;30&lt;/span&gt;*&lt;span style=&quot;color: blue;&quot;&gt;60&lt;/span&gt;*&lt;span style=&quot;color: blue;&quot;&gt;1000&lt;/span&gt;;  &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;// 30 minutes&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private static final int &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;NONE_FOUND_SLEEP_TIME    &lt;/span&gt;= &lt;span style=&quot;color: blue;&quot;&gt;1000&lt;/span&gt;*&lt;span style=&quot;color: blue;&quot;&gt;30&lt;/span&gt;;    &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;// 30 sec&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private static final &lt;/span&gt;String &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;MIME_JSON &lt;/span&gt;= &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;application/json&quot;&lt;/span&gt;;
   String &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;imagePath &lt;/span&gt;=&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;&quot;&lt;/span&gt;;

   &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;onResponse(Call&amp;lt;String&amp;gt; call, Response&amp;lt;String&amp;gt; response) {

      Log.&lt;span style=&quot;font-style: italic;&quot;&gt;d&lt;/span&gt;(&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;response&quot;&lt;/span&gt;,&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;response ::: &quot; &lt;/span&gt;+response);
   }

   &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;onFailure(Call&amp;lt;String&amp;gt; call, Throwable t) {

   }

   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public class &lt;/span&gt;NanoTestBinder &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;extends &lt;/span&gt;Binder {
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public &lt;/span&gt;NanoTest getService() {
            &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;return &lt;/span&gt;NanoTest.&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;this&lt;/span&gt;;
        }
   }
   
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public static abstract class &lt;/span&gt;ServerSyncService {
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;protected static final &lt;/span&gt;String &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;OLDEST_TIMESTAMP &lt;/span&gt;= &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;2016-05-10T00:00:00.000Z&quot;&lt;/span&gt;;
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public abstract &lt;/span&gt;String processData(Method method, String json, String offset);
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public abstract &lt;/span&gt;String getListenUri();
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public static &lt;/span&gt;String getJsonStatus(String status) {
         &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if&lt;/span&gt;(status == &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;)
            status = &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;success&quot;&lt;/span&gt;;
         &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;{&lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;\&quot;&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;\&quot;&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;\&quot;&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;&lt;/span&gt;+status+&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;\&quot;&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;}&quot;&lt;/span&gt;;
      }

   };
   
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public static final &lt;/span&gt;String[] getCurrentIpAddresses() {
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;ipAddresses&lt;/span&gt;;
   }
   
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public static final &lt;/span&gt;InetAddress getLastKnownServerAddress() {
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;lastKnownServerAddress&lt;/span&gt;;
   }
    
   &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;onCreate() {
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;super&lt;/span&gt;.onCreate();
   }

   &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public &lt;/span&gt;IBinder onBind(Intent intent) {
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;mBinder&lt;/span&gt;;
   }
   
   &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public boolean &lt;/span&gt;onUnbind(Intent intent) {
      stopServer();
      stopServerDetection();
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;return false&lt;/span&gt;;
   }
   
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;initializeServices(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;boolean &lt;/span&gt;bServer,String imagePaths) {
      &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;imagePath &lt;/span&gt;= imagePaths;
      getAllIpAddresses();
         restartServer();
   }
   
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private void &lt;/span&gt;stopServerDetection() {
      &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;bRunDetection &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;false&lt;/span&gt;;
   }
   
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private void &lt;/span&gt;startServerDetection() {
      &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;bRunDetection &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;true&lt;/span&gt;;
      Thread thread = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;Thread(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;Runnable() {
         &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;run() {
            &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;try &lt;/span&gt;{
               &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;while&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;bRunDetection&lt;/span&gt;) {
                  &lt;span style=&quot;font-style: italic;&quot;&gt;findServer&lt;/span&gt;();
                  Thread.&lt;span style=&quot;font-style: italic;&quot;&gt;sleep&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;lastKnownServerAddress &lt;/span&gt;== &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null &lt;/span&gt;? &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;NONE_FOUND_SLEEP_TIME &lt;/span&gt;: &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;SLEEP_TIME&lt;/span&gt;);
               }
            } &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;catch&lt;/span&gt;(Exception e) {
               e.printStackTrace();
            }
            
         }
      });
      thread.start();
   }
   
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;stopServer() {
      &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;// Close Broadcast Server&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;socket &lt;/span&gt;!= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;)
         &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;socket&lt;/span&gt;.close();
      &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;socket &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;;

      &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;// Close API Server&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;server &lt;/span&gt;!= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null &lt;/span&gt;&amp;amp;&amp;amp; &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;server&lt;/span&gt;.isAlive())
         &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;server&lt;/span&gt;.stop();
      &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;server &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;;
      
   }

   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;setImagePath(String imagePath) {
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;imagePath &lt;/span&gt;= imagePath;
   }

   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private void &lt;/span&gt;startBroadcastServer() {
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;try &lt;/span&gt;{
         &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;// Start Broadcast server&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;socket &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;DatagramSocket(&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;PORT&lt;/span&gt;, InetAddress.&lt;span style=&quot;font-style: italic;&quot;&gt;getByName&lt;/span&gt;(&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;0.0.0.0&quot;&lt;/span&gt;));
         &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;socket&lt;/span&gt;.setBroadcast(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;true&lt;/span&gt;);
         Thread thread = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;Thread(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;Runnable() {
            &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;run() {
               &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;byte&lt;/span&gt;[] recvBuf = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new byte&lt;/span&gt;[&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;BUFFER_SIZE&lt;/span&gt;];
               &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;while&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;socket &lt;/span&gt;!= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;) {
                  &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;try &lt;/span&gt;{
                     DatagramPacket packet = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;DatagramPacket(recvBuf, recvBuf.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;length&lt;/span&gt;);
                     &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;socket&lt;/span&gt;.receive(packet);
                     String message = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;String(packet.getData()).trim();
                     Log.&lt;span style=&quot;font-style: italic;&quot;&gt;d&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;TAG&lt;/span&gt;, &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Server Received:&quot;&lt;/span&gt;+message+&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;:&quot;&lt;/span&gt;+packet.getAddress().getHostAddress()+&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;:&quot;&lt;/span&gt;+packet.getPort());
                     &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if&lt;/span&gt;(message.equalsIgnoreCase(&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;BROADCAST_MESSAGE_HELLO&lt;/span&gt;)) {
                        &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;byte&lt;/span&gt;[] sendData = &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;BROADCAST_MESSAGE_REPLY&lt;/span&gt;.getBytes();
                        DatagramPacket sendPacket = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;DatagramPacket(sendData,
                                                            sendData.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;length&lt;/span&gt;,
                                                            packet.getAddress(),
                                                            packet.getPort());
                        &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;socket&lt;/span&gt;.send(sendPacket);
                     }
                  } &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;catch&lt;/span&gt;(SocketException e) {
                     e.printStackTrace();
                     &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;socket &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;;
                  } &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;catch&lt;/span&gt;(Exception e) {
                     e.printStackTrace();
                  }
               }
            }
         });
         thread.start();
      } &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;catch&lt;/span&gt;(Exception e) {
         e.printStackTrace();
      }
   }

   &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;/**&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;    * Tries finding a server.&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;    *&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;    * Requires to be run on a different thread.&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;    * &lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;    * &lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic; font-weight: bold;&quot;&gt;@return &lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;Returns lastKnownServerAddress (can be null)&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;    */&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public static &lt;/span&gt;InetAddress findServer() {
      DatagramSocket client = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;;
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;try &lt;/span&gt;{
         client = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;DatagramSocket();
         &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;byte&lt;/span&gt;[] helloMessage = &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;BROADCAST_MESSAGE_HELLO&lt;/span&gt;.getBytes();
         client.setBroadcast(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;true&lt;/span&gt;);

         &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;// Try Broadcast IP&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;         &lt;/span&gt;DatagramPacket sendPacket = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;DatagramPacket(helloMessage,
                                             helloMessage.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;length&lt;/span&gt;,
                                             InetAddress.&lt;span style=&quot;font-style: italic;&quot;&gt;getByName&lt;/span&gt;(&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;255.255.255.255&quot;&lt;/span&gt;),
                                             &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;PORT&lt;/span&gt;);
         client.send(sendPacket);

         &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;// Try Receiving response&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;byte&lt;/span&gt;[] recvBuf = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new byte&lt;/span&gt;[&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;BUFFER_SIZE&lt;/span&gt;];
         Log.&lt;span style=&quot;font-style: italic;&quot;&gt;d&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;TAG&lt;/span&gt;, &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Starting receive...&quot;&lt;/span&gt;);
         DatagramPacket packet = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;DatagramPacket(recvBuf, recvBuf.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;length&lt;/span&gt;);
         client.setSoTimeout(&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;RECEIVE_TIMEOUT&lt;/span&gt;);
         client.receive(packet);
         String message = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;String(packet.getData()).trim();
         Log.&lt;span style=&quot;font-style: italic;&quot;&gt;d&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;TAG&lt;/span&gt;, &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Client Received:&quot;&lt;/span&gt;+message);
         &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if&lt;/span&gt;(message.equalsIgnoreCase(&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;BROADCAST_MESSAGE_REPLY&lt;/span&gt;)) {
            &lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;lastKnownServerAddress &lt;/span&gt;= packet.getAddress();
            Log.&lt;span style=&quot;font-style: italic;&quot;&gt;d&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;TAG&lt;/span&gt;, &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Found Server:&quot;&lt;/span&gt;+&lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;lastKnownServerAddress&lt;/span&gt;.getHostAddress()+&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;:&quot;&lt;/span&gt;+&lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;lastKnownServerAddress&lt;/span&gt;.getHostName());
         }
      } &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;catch&lt;/span&gt;(SocketTimeoutException e) {
         Log.&lt;span style=&quot;font-style: italic;&quot;&gt;d&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;TAG&lt;/span&gt;, &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Timedout...&quot;&lt;/span&gt;);
      } &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;catch&lt;/span&gt;(Exception e) {
         e.printStackTrace();
      } &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;finally &lt;/span&gt;{
         &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if&lt;/span&gt;(client != &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;)
            client.close();
      }
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;lastKnownServerAddress&lt;/span&gt;;
   }

   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private void &lt;/span&gt;startServer() &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;throws &lt;/span&gt;IOException {
      &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;// Start API Server&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;server &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;TestNanoHttpD();
      &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;server&lt;/span&gt;.start();
      
      startBroadcastServer();
   }

   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private void &lt;/span&gt;restartServer() {
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;try &lt;/span&gt;{
         stopServer();

         startServer();
      } &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;catch&lt;/span&gt;(IOException e) {
         e.printStackTrace();
      }
   }
   
   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private void &lt;/span&gt;getAllIpAddresses() {
      ArrayList&amp;lt;String&amp;gt; addresses = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;ArrayList&amp;lt;String&amp;gt;();
       &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;try &lt;/span&gt;{
           &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;for&lt;/span&gt;(Enumeration&amp;lt;NetworkInterface&amp;gt; en = NetworkInterface.&lt;span style=&quot;font-style: italic;&quot;&gt;getNetworkInterfaces&lt;/span&gt;(); en.hasMoreElements(); ) {
               NetworkInterface intf = en.nextElement();
               &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;for&lt;/span&gt;(Enumeration&amp;lt;InetAddress&amp;gt; enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements(); ) {
                   InetAddress inetAddress = enumIpAddr.nextElement();
                   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if&lt;/span&gt;(!inetAddress.isLoopbackAddress()) {
                      Log.&lt;span style=&quot;font-style: italic;&quot;&gt;e&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;TAG&lt;/span&gt;, &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Adding IP Address:&quot;&lt;/span&gt;+inetAddress.getHostAddress().toString());
                       addresses.add(inetAddress.getHostAddress().toString());
                   }
                }
            }
        } &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;catch &lt;/span&gt;(SocketException ex) {
            ex.printStackTrace();
        }
        &lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;ipAddresses &lt;/span&gt;= addresses.toArray(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;String[&lt;span style=&quot;color: blue;&quot;&gt;0&lt;/span&gt;]);
   }

   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private class &lt;/span&gt;TestNanoHttpD &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;extends &lt;/span&gt;NanoHTTPD {
      
      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public &lt;/span&gt;TestNanoHttpD() &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;throws &lt;/span&gt;IOException {
         &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;super&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;PORT&lt;/span&gt;);
      }

      &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private &lt;/span&gt;String mapToString(Map&amp;lt;String, String&amp;gt; params) {
         &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;final &lt;/span&gt;StringBuilder buf = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;StringBuilder();
         &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;for&lt;/span&gt;(Map.Entry&amp;lt;String, String&amp;gt; entry : params.entrySet()) {
            buf.append(entry.getKey() + &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;:&quot; &lt;/span&gt;+ entry.getValue() + &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;&lt;/span&gt;);
         }
         &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;return &lt;/span&gt;buf.toString();
      }

      &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public &lt;/span&gt;Response serve(String uri, Method method, Map&amp;lt;String, String&amp;gt; headers, Map&amp;lt;String, String&amp;gt; params, Map&amp;lt;String, String&amp;gt; files) {
         FileInputStream fis = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;;
         &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;try &lt;/span&gt;{
            fis = &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;FileInputStream(&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;imagePath&lt;/span&gt;);
         } &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;catch &lt;/span&gt;(FileNotFoundException e) {
            &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;// &lt;/span&gt;&lt;span style=&quot;color: #0073bf; font-style: italic; font-weight: bold;&quot;&gt;TODO Auto-generated catch block&lt;/span&gt;&lt;span style=&quot;color: #0073bf; font-style: italic; font-weight: bold;&quot;&gt;            &lt;/span&gt;e.printStackTrace();
         }

         &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;newFixedLengthResponse&lt;/span&gt;(Response.Status.&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;OK&lt;/span&gt;, &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;image/jpeg&quot;&lt;/span&gt;, fis,&lt;span style=&quot;color: blue;&quot;&gt;50000000&lt;/span&gt;);
      }


   }


}&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/8742543002104616034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2016/12/android-nanohttpd-share-images-example.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/8742543002104616034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/8742543002104616034'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2016/12/android-nanohttpd-share-images-example.html' title='Android NANOHttpd share images example'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-9067120554103098193</id><published>2016-08-31T22:06:00.002+05:30</published><updated>2016-08-31T22:08:34.930+05:30</updated><title type='text'>Android Load images from Flikr </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Fetch the images from Flikr and cache the images without third party library&lt;br /&gt;
&lt;br /&gt;
1. List of images&lt;br /&gt;
&lt;br /&gt;
2. On click flip the image and get image information&lt;br /&gt;
&lt;br /&gt;
Activity Code&lt;br /&gt;
&lt;br /&gt;
&lt;table class=&quot;highlight tab-size js-file-line-container&quot; data-tab-size=&quot;8&quot; style=&quot;background-color: white; border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; color: #333333; font-size: 14px; line-height: 21px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC176&quot; style=&quot;box-sizing: border-box; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;div style=&quot;font-family: consolas, &amp;quot;liberation mono&amp;quot;, menlo, courier, monospace; font-size: 12px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: small;&quot;&gt;&lt;a href=&quot;https://github.com/iamvijayakumar/FlickrFeed&quot; target=&quot;_blank&quot;&gt;Source Code &lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table class=&quot;highlight tab-size js-file-line-container&quot; data-tab-size=&quot;8&quot; style=&quot;background-color: white; border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 14px; line-height: 21px; tab-size: 8;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC1&quot; style=&quot;box-sizing: border-box; font-family: Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;176&quot; id=&quot;L176&quot; style=&quot;-webkit-user-select: none; border-color: rgb(238, 238, 238); border-style: solid; border-width: 0px 1px 0px 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC176&quot; style=&quot;box-sizing: border-box; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;177&quot; id=&quot;L177&quot; style=&quot;-webkit-user-select: none; border-color: rgb(238, 238, 238); border-style: solid; border-width: 0px 1px 0px 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC177&quot; style=&quot;box-sizing: border-box; font-family: Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&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/AVvXsEiTXbsa-OChBByBY38RoKevm9E7ghQnAjDipiCl_4PqS1F78obMnivdhmGIwCMl47VpVkdInYGA7nvHOIu5lIZXxmsgcxe7f-__diBWZxMq7iK_UtfqB4BMHbeEQ8NhF4Vc5FUA-Cjvo1s/s1600/device-2016-08-31-201927.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;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTXbsa-OChBByBY38RoKevm9E7ghQnAjDipiCl_4PqS1F78obMnivdhmGIwCMl47VpVkdInYGA7nvHOIu5lIZXxmsgcxe7f-__diBWZxMq7iK_UtfqB4BMHbeEQ8NhF4Vc5FUA-Cjvo1s/s320/device-2016-08-31-201927.png&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&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;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg57XhsFlYvYMZlOjHtOG9vGAWU8n0iOua6Wo9aLr2BVOzGaXVo47d78MOJGehuySqFGey4EPlgPDMlF5bYi2WxR00CmqOc0reecn2WhJbBLT7_pOpq_-ND_GP3Wa_VMdZZQEh9rx7eQEM/s1600/device-2016-08-31-202446.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;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg57XhsFlYvYMZlOjHtOG9vGAWU8n0iOua6Wo9aLr2BVOzGaXVo47d78MOJGehuySqFGey4EPlgPDMlF5bYi2WxR00CmqOc0reecn2WhJbBLT7_pOpq_-ND_GP3Wa_VMdZZQEh9rx7eQEM/s320/device-2016-08-31-202446.png&quot; width=&quot;180&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;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span id=&quot;goog_289927273&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_289927274&quot;&gt;&lt;/span&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/9067120554103098193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2016/08/android-load-images-from-flikr-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/9067120554103098193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/9067120554103098193'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2016/08/android-load-images-from-flikr-with.html' title='Android Load images from Flikr '/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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/AVvXsEiTXbsa-OChBByBY38RoKevm9E7ghQnAjDipiCl_4PqS1F78obMnivdhmGIwCMl47VpVkdInYGA7nvHOIu5lIZXxmsgcxe7f-__diBWZxMq7iK_UtfqB4BMHbeEQ8NhF4Vc5FUA-Cjvo1s/s72-c/device-2016-08-31-201927.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3121772154556583723.post-6636948898298961631</id><published>2016-08-11T23:01:00.000+05:30</published><updated>2016-08-11T23:01:04.482+05:30</updated><title type='text'>Android HD Video Player </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
HD Video Player application for android . it will support all major Video formats&lt;br /&gt;
&lt;br /&gt;
&lt;br /&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/AVvXsEit5KoIGceNCNPnO2SBIN3zRoOB8fgTDsbm_-S2P5cQoFkel52-kJmod19a4r9oSk0JbtlpG14kWCsVNVC6Uh27sM5XWnROyCo_bYU6yKZ0NQfRgunpp_VZQGOvJap8oBNFYb0Ns8g-o8Q/s1600/1024videoplayerhd1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;156&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit5KoIGceNCNPnO2SBIN3zRoOB8fgTDsbm_-S2P5cQoFkel52-kJmod19a4r9oSk0JbtlpG14kWCsVNVC6Uh27sM5XWnROyCo_bYU6yKZ0NQfRgunpp_VZQGOvJap8oBNFYb0Ns8g-o8Q/s320/1024videoplayerhd1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&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;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijTzjn-oURNbQ0E3Wo1pR5NiGotbPl2a0VATNz10xdQ-P7qS7lDZ39ssi1_MniQ6D-ypEW7-6WkH2Pfx7CDt-6RzbTfCHBzeykmed4Bvsd-AVpQu40hFTRZ08sLLsRs1fqErdKepzdgM4/s1600/eqvideoplayer.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;174&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijTzjn-oURNbQ0E3Wo1pR5NiGotbPl2a0VATNz10xdQ-P7qS7lDZ39ssi1_MniQ6D-ypEW7-6WkH2Pfx7CDt-6RzbTfCHBzeykmed4Bvsd-AVpQu40hFTRZ08sLLsRs1fqErdKepzdgM4/s320/eqvideoplayer.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;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://play.google.com/store/apps/details?id=vijay.com.hdvideo.hgaudio&amp;amp;hl=en&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;123&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmDw8MD4snkyfnTEldVvIr0e1I4_L1cpFx3YNsX0qDneTzXcPgvw6KY_gRdRN4vB3I_SNor5fFx6cVVVLZdnLkoG9KPOtuwprSk2Bj7Z6D68kfq7Ny0N3HIwywTdfF4yryoZnDOZL2UVU/s320/en_badge_web_generic.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;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/6636948898298961631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2016/08/android-hd-video-player.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/6636948898298961631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/6636948898298961631'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2016/08/android-hd-video-player.html' title='Android HD Video Player '/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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/AVvXsEit5KoIGceNCNPnO2SBIN3zRoOB8fgTDsbm_-S2P5cQoFkel52-kJmod19a4r9oSk0JbtlpG14kWCsVNVC6Uh27sM5XWnROyCo_bYU6yKZ0NQfRgunpp_VZQGOvJap8oBNFYb0Ns8g-o8Q/s72-c/1024videoplayerhd1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3121772154556583723.post-4111155654061142256</id><published>2016-06-01T15:06:00.003+05:30</published><updated>2016-06-01T15:06:53.220+05:30</updated><title type='text'>Android Studio - “Unmappable character for encoding UTF-8”</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h1 itemprop=&quot;name&quot; style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; color: #242729; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 22px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 1.3; margin: 0px 0px 0.5em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&lt;a class=&quot;question-hyperlink&quot; href=&quot;http://stackoverflow.com/questions/27525451/android-studio-unmappable-character-for-encoding-utf-8&quot; style=&quot;border: 0px; color: #242729; cursor: pointer; font-size: 24px; font-weight: normal; line-height: 1.35; margin: 0px 0px 0.5em; padding: 0px; text-decoration: none;&quot;&gt;Android Studio - “Unmappable character for encoding UTF-8”&lt;/a&gt;&lt;/h1&gt;
&lt;h1 itemprop=&quot;name&quot; style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; color: #242729; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 22px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 1.3; margin: 0px 0px 0.5em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&amp;nbsp;&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: #242729; display: inline !important; float: none; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;Adding the following to&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;-webkit-text-stroke-width: 0px; background-color: #eff0f1; border: 0px; color: #242729; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin: 0px; orphans: auto; padding: 1px 5px; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 1; word-spacing: 0px;&quot;&gt;build.gradle&lt;/code&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: #242729; display: inline !important; float: none; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;solves the problem :&lt;/span&gt;&lt;/h1&gt;
&lt;h1 itemprop=&quot;name&quot; style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; color: #242729; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 22px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 1.3; margin: 0px 0px 0.5em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: #242729; display: inline !important; float: none; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h1&gt;
&lt;pre style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9.0pt;&quot;&gt;android {
  &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;    &lt;/span&gt;compileOptions.encoding = &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&#39;ISO-8859-1&#39;&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;  &lt;/span&gt;&lt;/pre&gt;
&lt;h1 itemprop=&quot;name&quot; style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; color: #242729; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 22px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 1.3; margin: 0px 0px 0.5em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: #242729; display: inline !important; float: none; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;/h1&gt;
&lt;h1 itemprop=&quot;name&quot; style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; color: #242729; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 22px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 1.3; margin: 0px 0px 0.5em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&amp;nbsp;&lt;/h1&gt;
&lt;h1 itemprop=&quot;name&quot; style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; color: #242729; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 22px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 1.3; margin: 0px 0px 0.5em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&amp;nbsp;&lt;/h1&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/4111155654061142256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2016/06/android-studio-unmappable-character-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/4111155654061142256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/4111155654061142256'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2016/06/android-studio-unmappable-character-for.html' title='Android Studio - “Unmappable character for encoding UTF-8”'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-9169866931892536670</id><published>2016-05-20T14:42:00.003+05:30</published><updated>2016-05-20T14:42:51.998+05:30</updated><title type='text'>java.lang.NoClassDefFoundError: com.google.android.gms.R$string</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
java.lang.NoClassDefFoundError: com.google.android.gms.R$string&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
Include in your build.gradle dependencies this:&lt;/div&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;compile &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;&#39;com.android.support:multidex:1.0.0&#39;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&amp;nbsp;your Manifest add MultiDexApplication class&lt;/div&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;xml version&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; encoding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;manifest&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;border: 0px; color: #e64320; margin: 0px; padding: 0px;&quot;&gt;xmlns:android&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;border: 0px; color: #0f74bd; margin: 0px; padding: 0px;&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;border: 0px; color: #e64320; margin: 0px; padding: 0px;&quot;&gt;package&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;border: 0px; color: #0f74bd; margin: 0px; padding: 0px;&quot;&gt;&quot;com.example.android.multidex.myapplication&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;application&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
        ...
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;border: 0px; color: #e64320; margin: 0px; padding: 0px;&quot;&gt;android:name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;border: 0px; color: #0f74bd; margin: 0px; padding: 0px;&quot;&gt;&quot;android.support.multidex.MultiDexApplication&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
        ...
    &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;/application&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;/manifest&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;If you already have your application class just extend it with MultiDexApplication class&lt;/span&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://iamvijayakumar.blogspot.com/feeds/9169866931892536670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2016/05/javalangnoclassdeffounderror.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/9169866931892536670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/9169866931892536670'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2016/05/javalangnoclassdeffounderror.html' title='java.lang.NoClassDefFoundError: com.google.android.gms.R$string'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-1742708445788075439</id><published>2016-01-07T09:58:00.003+05:30</published><updated>2016-01-07T10:02:20.696+05:30</updated><title type='text'>How to get Particular application used  Facebook Friends</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This post about how to get particular application used friends.&lt;br /&gt;
&lt;br /&gt;
* You can get friend list who is using particular application.&lt;br /&gt;
&lt;br /&gt;
Source Code Here&lt;br /&gt;
&lt;span style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre style=&quot;font-family: &#39;Courier New&#39;; font-size: 9pt;&quot;&gt;&lt;span style=&quot;background-color: #cfe2f3;&quot;&gt;FacebookSdk.&lt;span style=&quot;font-style: italic;&quot;&gt;sdkInitialize&lt;/span&gt;(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;this&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;pre style=&quot;font-family: &#39;Courier New&#39;; font-size: 9pt;&quot;&gt;&lt;span style=&quot;background-color: #cfe2f3;&quot;&gt;GraphRequest request=   &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;GraphRequest(
        AccessToken.&lt;span style=&quot;font-style: italic;&quot;&gt;getCurrentAccessToken&lt;/span&gt;(),
        &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;/me/friends&quot;&lt;/span&gt;,
        &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;,
        HttpMethod.&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;GET&lt;/span&gt;,
        &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;GraphRequest.Callback() {
            &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;onCompleted(GraphResponse response) {
       &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 9pt;&quot;&gt;
&lt;/span&gt;&lt;pre style=&quot;font-family: &#39;Courier New&#39;; font-size: 9pt;&quot;&gt;&lt;span style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;            &lt;/span&gt;}
        }
);

request.executeAsync();&lt;/span&gt;&lt;/pre&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;Output&lt;/span&gt;&lt;/b&gt;
&lt;span class=&quot;sBrace structure-1&quot; id=&quot;s-1&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;{&amp;nbsp;&lt;a href=&quot;https://www.blogger.com/null&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #2980b9;&quot;&gt;&lt;span class=&quot;fa fa-minus-square-o&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; line-height: 1; position: relative; top: 2px;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sObjectK&quot; id=&quot;s-2&quot; style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; font-weight: 700; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;data&quot;&lt;/span&gt;&lt;span class=&quot;sColon&quot; id=&quot;s-3&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;sBracket structure-2&quot; id=&quot;s-4&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;[&amp;nbsp;&lt;a href=&quot;https://www.blogger.com/null&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #2980b9;&quot;&gt;&lt;span class=&quot;fa fa-minus-square-o&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; line-height: 1; position: relative; top: 2px;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sBrace structure-3&quot; id=&quot;s-5&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;{&amp;nbsp;&lt;a href=&quot;https://www.blogger.com/null&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #2980b9;&quot;&gt;&lt;span class=&quot;fa fa-minus-square-o&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; line-height: 1; position: relative; top: 2px;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sObjectK&quot; id=&quot;s-6&quot; style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; font-weight: 700; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;sColon&quot; id=&quot;s-7&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;sObjectV&quot; id=&quot;s-8&quot; style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;Veena&amp;nbsp;Potter&quot;&lt;/span&gt;&lt;span class=&quot;sComma&quot; id=&quot;s-9&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sObjectK&quot; id=&quot;s-10&quot; style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; font-weight: 700; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;sColon&quot; id=&quot;s-11&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;sObjectV&quot; id=&quot;s-12&quot; style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;*******************&quot;&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sBrace structure-3&quot; id=&quot;s-13&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;sComma&quot; id=&quot;s-14&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sBrace structure-3&quot; id=&quot;s-15&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;{&amp;nbsp;&lt;a href=&quot;https://www.blogger.com/null&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #2980b9;&quot;&gt;&lt;span class=&quot;fa fa-minus-square-o&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; line-height: 1; position: relative; top: 2px;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sObjectK&quot; id=&quot;s-16&quot; style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; font-weight: 700; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;sColon&quot; id=&quot;s-17&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;sObjectV&quot; id=&quot;s-18&quot; style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;VijayaKumar&amp;nbsp;Muniappan&quot;&lt;/span&gt;&lt;span class=&quot;sComma&quot; id=&quot;s-19&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sObjectK&quot; id=&quot;s-20&quot; style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; font-weight: 700; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;sColon&quot; id=&quot;s-21&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;sObjectV&quot; id=&quot;s-22&quot; style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;*********&quot;&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sBrace structure-3&quot; id=&quot;s-23&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;sComma&quot; id=&quot;s-24&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sBrace structure-3&quot; id=&quot;s-25&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;{&amp;nbsp;&lt;a href=&quot;https://www.blogger.com/null&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #2980b9;&quot;&gt;&lt;span class=&quot;fa fa-minus-square-o&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; line-height: 1; position: relative; top: 2px;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sObjectK&quot; id=&quot;s-26&quot; style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; font-weight: 700; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;sColon&quot; id=&quot;s-27&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;sObjectV&quot; id=&quot;s-28&quot; style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;Mohammed&amp;nbsp;Siddiq&quot;&lt;/span&gt;&lt;span class=&quot;sComma&quot; id=&quot;s-29&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sObjectK&quot; id=&quot;s-30&quot; style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; font-weight: 700; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;sColon&quot; id=&quot;s-31&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;sObjectV&quot; id=&quot;s-32&quot; style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;1234324*********&quot;&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sBrace structure-3&quot; id=&quot;s-33&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sBracket structure-2&quot; id=&quot;s-34&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sComma&quot; id=&quot;s-35&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sObjectK&quot; id=&quot;s-36&quot; style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; font-weight: 700; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;paging&quot;&lt;/span&gt;&lt;span class=&quot;sColon&quot; id=&quot;s-37&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;sBrace structure-2&quot; id=&quot;s-38&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;{&amp;nbsp;&lt;a href=&quot;https://www.blogger.com/null&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #2980b9;&quot;&gt;&lt;span class=&quot;fa fa-minus-square-o&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; line-height: 1; position: relative; top: 2px;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sObjectK&quot; id=&quot;s-39&quot; style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; font-weight: 700; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;next&quot;&lt;/span&gt;&lt;span class=&quot;sColon&quot; id=&quot;s-40&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;sObjectV&quot; id=&quot;s-41&quot; style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;https:\/\/graph.facebook.com\/v2.5\/198639363810546\/friends?format=json&amp;amp;access_token=CAAOKcZCOlbVwBADkN0puCASZAdSJNPsHOqmUAZAPZB70OkftsRcIUSYZA9zKkWDFJbLvOZCwoFaTnWd9U6aa60ulmJ3aPiGKHZAtBxZBAQSNoojGZBVcDGDkd742jVkYIQkMlZAfaw7eNuwsN4dgHZBw29YnuxR5wHfeEcJMdFEgLZBJ7aSHCKYyjvDRsB0K03KtKiRZCv9RhNlFc9wZDZD&amp;amp;limit=25&amp;amp;offset=25&amp;amp;__after_id=enc_AdCJnOgPxZCJgh6xM5sZA3BoTs7q9POI3iIWOcsorUgCTJcHVg1jRUSO8vcoIkCvYkG7hSVf2hCZCi2U0rZAA1ZB6pfkZA&quot;&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sBrace structure-2&quot; id=&quot;s-42&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;sComma&quot; id=&quot;s-43&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sObjectK&quot; id=&quot;s-44&quot; style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; font-weight: 700; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;summary&quot;&lt;/span&gt;&lt;span class=&quot;sColon&quot; id=&quot;s-45&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;sBrace structure-2&quot; id=&quot;s-46&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;{&amp;nbsp;&lt;a href=&quot;https://www.blogger.com/null&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #2980b9;&quot;&gt;&lt;span class=&quot;fa fa-minus-square-o&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; line-height: 1; position: relative; top: 2px;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sObjectK&quot; id=&quot;s-47&quot; style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; font-weight: 700; line-height: 22.8571px; white-space: normal;&quot;&gt;&quot;total_count&quot;&lt;/span&gt;&lt;span class=&quot;sColon&quot; id=&quot;s-48&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;sObjectV&quot; id=&quot;s-49&quot; style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;5&lt;/span&gt;
&lt;span style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sBrace structure-2&quot; id=&quot;s-50&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;sBrace structure-1&quot; id=&quot;s-51&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;sComma&quot; id=&quot;s-52&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;sObjectK&quot; id=&quot;s-53&quot; style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; font-weight: 700; line-height: 22.8571px; white-space: normal;&quot;&gt;&lt;span class=&quot;error&quot; style=&quot;background-color: #c04830; box-sizing: border-box; color: white;&quot;&gt;error&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;sColon&quot; id=&quot;s-54&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;sObjectV&quot; id=&quot;s-55&quot; style=&quot;box-sizing: border-box; color: #555555; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;null&lt;/span&gt;
&lt;span class=&quot;sBrace structure-0&quot; id=&quot;s-56&quot; style=&quot;box-sizing: border-box; color: #666666; font-family: &#39;Ubuntu Mono&#39;, Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 16px; line-height: 22.8571px; white-space: normal;&quot;&gt;&lt;span class=&quot;error&quot; style=&quot;background-color: #c04830; box-sizing: border-box; color: white;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 9pt;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/1742708445788075439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2016/01/how-to-get-particular-application-used.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/1742708445788075439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/1742708445788075439'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2016/01/how-to-get-particular-application-used.html' title='How to get Particular application used  Facebook Friends'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-3265271707711941749</id><published>2015-11-25T18:30:00.001+05:30</published><updated>2015-11-25T21:26:04.348+05:30</updated><title type='text'>Android native long text splitter like Magazine  </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This post about how to split long html string as pager like &lt;b&gt;Magazine&lt;/b&gt;&amp;nbsp;. &lt;br /&gt;
&lt;br /&gt;
Below the source code for splitting long html text by passing device height and width .&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;NativePageSplitter.java&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;div style=&quot;background: #D9D9D9; border: solid windowtext 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 1.0pt 1.0pt 1.0pt;&quot;&gt;

&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;package&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;com.vj.pagesplitter&lt;/u&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.text.DynamicLayout;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.text.SpannableStringBuilder;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.text.TextPaint;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; android.util.Log;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; java.util.ArrayList;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; java.util.List;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;class&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;NativePageSplitter&lt;/u&gt;
{&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;private&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;pageWidth&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;private&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;pageHeight&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;private&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;float&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;lineSpacingMultiplier&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;private&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;float&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;lineSpacingExtra&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;private&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
List&amp;lt;CharSequence&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;pages&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; ArrayList&amp;lt;CharSequence&amp;gt;();&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;private&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; SpannableStringBuilder &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;mSpannableStringBuilder&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
SpannableStringBuilder();&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; NativePageSplitter(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; pageWidth, &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; pageHeight, &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;float&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
lineSpacingMultiplier, &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;float&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; lineSpacingExtra) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;this&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;pageWidth&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; = pageWidth;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;this&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;pageHeight&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; = pageHeight;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;this&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;lineSpacingMultiplier&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; =
lineSpacingMultiplier;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;this&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;lineSpacingExtra&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; = lineSpacingExtra;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; append(CharSequence
charSequence) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;mSpannableStringBuilder&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.append(charSequence);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; split(TextPaint
textPaint) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DynamicLayout staticLayout = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; DynamicLayout(&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&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;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;mSpannableStringBuilder&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&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; textPaint,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&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;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;pageWidth&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&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; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;null&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&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;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;lineSpacingMultiplier&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&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;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;lineSpacingExtra&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&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;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;true&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; startLine = 0;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;// Log.e(&quot;SM&quot;, &quot;pages ::
####### &amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;nbsp; &quot;
+staticLayout.getLineCount());&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;while&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;(startLine &amp;lt;
staticLayout.getLineCount()) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;// for(startLine =0; startLine&amp;lt;
staticLayout.getLineCount(); startLine++) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&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;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; startLineTop =
staticLayout.getLineTop(startLine);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&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;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; endLine =
staticLayout.getLineForVertical(startLineTop + &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;pageHeight&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&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;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; endLineBottom =
staticLayout.getLineBottom(endLine);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&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;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
lastFullyVisibleLine;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&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;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;(endLineBottom &amp;gt; startLineTop + &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;pageHeight&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;){&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&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; lastFullyVisibleLine = endLine
- 1;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&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 style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&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;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&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; lastFullyVisibleLine = endLine;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&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;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&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;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; startOffset =
staticLayout.getLineStart(startLine);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.&lt;i&gt;e&lt;/i&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;SM&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;########
:lastFullyVisibleLine::::&amp;nbsp;&amp;nbsp; &quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; +
lastFullyVisibleLine);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&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;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; endOffset =
staticLayout.getLineEnd(lastFullyVisibleLine);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&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 style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;pages&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.add(&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;mSpannableStringBuilder&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.subSequence(startOffset,
endOffset));&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; startLine = lastFullyVisibleLine +
1;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; List&amp;lt;CharSequence&amp;gt; getPages() {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;//Log.e(&quot;SM&quot;, &quot;pages ::
####### &quot; +pages.size());&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;pages&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;b&gt;Activity Class&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;div style=&quot;background: #D9D9D9; border: solid windowtext 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;&quot;&gt;

&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;package&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;com.vj.pagesplitter&lt;/u&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.app.Activity;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; android.os.Bundle;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; android.text.Html;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.text.TextPaint;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.util.DisplayMetrics;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; android.util.Log;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;class&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;MainActivity&lt;/u&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;extends&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; Activity {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;String &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;htmlStrng&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;&amp;lt;!DOCTYPE
html&amp;gt;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;p&amp;gt;At the core of Android Studio is an
intelligent code editor capable of advanced code completion, refactoring, and
code analysis.The powerful code editor helps you be a more productive Android
app developer..&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;This is a paragraph.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;TAt
the core of Android Studio is an intelligent code editor capable of advanced
code completion, refactoring, and code analysis.The powerful code editor helps
you be a more productive Android app developer.&amp;lt;/p&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #646464; font-family: Consolas; font-size: 10.0pt;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;protected&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; onCreate(Bundle
savedInstanceState) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;super&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.onCreate(savedInstanceState);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setContentView(R.layout.&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;activity_main&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DisplayMetrics dimension = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; DisplayMetrics();&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;getWindowManager().getDefaultDisplay()&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.getMetrics(dimension);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; w = dimension.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;widthPixels&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; h = dimension.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;heightPixels&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;//
PageSplitter_Articles pageSplitter = new PageSplitter_Articles(w-80, h-80&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;// , 1.3f, 1);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;NativePageSplitter&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; pageSplitter= &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;NativePageSplitter&lt;/u&gt;(w-70,
h-70&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;, 1.2f, 1);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;TextPaint textPaint =
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; TextPaint();&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;textPaint.setTextSize(15);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;pageSplitter.append(Html.&lt;i&gt;fromHtml&lt;/i&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;htmlStrng&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;));&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;pageSplitter.split(textPaint);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;String[] arr = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
String[pageSplitter.getPages().size()];&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;for&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; (&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; i = 0; i &amp;lt;
pageSplitter.getPages().size(); i++) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;arr[i] =
pageSplitter.getPages().get(i).toString();&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;Log.&lt;i&gt;e&lt;/i&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;SM&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;arr[i] &quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; +arr[i]);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;a href=&quot;https://github.com/iamvijayakumar/AndroidNativePage-Splitter&quot; target=&quot;_blank&quot;&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/3265271707711941749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2015/11/android-native-long-text-splitter-like.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/3265271707711941749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/3265271707711941749'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2015/11/android-native-long-text-splitter-like.html' title='Android native long text splitter like Magazine  '/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-3009814326611494711</id><published>2015-10-29T13:42:00.000+05:30</published><updated>2015-10-29T13:42:13.193+05:30</updated><title type='text'>Java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState&lt;br /&gt;
&lt;br /&gt;
when i try to remove fragment onStop after onSaveInstanceState got exception .&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;b&gt;Original Code&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&lt;span class=&quot;s1&quot;&gt;ft&lt;/span&gt; = &lt;span class=&quot;s1&quot;&gt;fm&lt;/span&gt;.beginTransaction();&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;ft&lt;/span&gt;.remove(&lt;span class=&quot;s1&quot;&gt;fragment3&lt;/span&gt;);&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;ft&lt;/span&gt;.addToBackStack(&lt;span class=&quot;s2&quot;&gt;null&lt;/span&gt;);&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;ft&lt;/span&gt;.commit();&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&lt;b&gt;Solutions&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
Instead of &lt;span style=&quot;color: #990000;&quot;&gt;&lt;b&gt;ft.commit &lt;/b&gt;&lt;/span&gt;change to&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span class=&quot;s1&quot;&gt;ft&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;commitAllowingStateLoss&lt;/span&gt;();&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&lt;span class=&quot;s1&quot;&gt;ft&lt;/span&gt; = &lt;span class=&quot;s1&quot;&gt;fm&lt;/span&gt;.beginTransaction();&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;ft&lt;/span&gt;.remove(&lt;span class=&quot;s1&quot;&gt;fragment3&lt;/span&gt;);&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;ft&lt;/span&gt;.addToBackStack(&lt;span class=&quot;s2&quot;&gt;null&lt;/span&gt;);&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;










&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;ft&lt;/span&gt;.commitAllowingStateLoss();&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/3009814326611494711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2015/10/javalangillegalstateexception-can-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/3009814326611494711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/3009814326611494711'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2015/10/javalangillegalstateexception-can-not.html' title='Java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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-3121772154556583723.post-3109516114758729380</id><published>2015-09-15T15:14:00.000+05:30</published><updated>2015-09-15T15:14:55.141+05:30</updated><title type='text'>Android Tag Cloud View Like Republic News</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This post about Tag cloud view like republic news.&lt;br /&gt;
&lt;br /&gt;
1.BARREL View&lt;br /&gt;
&lt;br /&gt;
2. SPHERE View&lt;br /&gt;
&lt;br /&gt;
3.Flat View&lt;br /&gt;
















&lt;br /&gt;
Output&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/AVvXsEjzoG05GABFl3MEzY9wlSPZQBLwAe3N5HiwW6Qw1jFU3MWrdrNqNCBXxArNPdLlzxcCUaeiTXxrrJZiczwNx5idKGdNJPtzytj4prwH2L-B0eC4XPifHAxzeXSIIZGK4Se5OX1qrpAtqN8/s1600/ezgif.com-video-to-gif+%25281%2529.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzoG05GABFl3MEzY9wlSPZQBLwAe3N5HiwW6Qw1jFU3MWrdrNqNCBXxArNPdLlzxcCUaeiTXxrrJZiczwNx5idKGdNJPtzytj4prwH2L-B0eC4XPifHAxzeXSIIZGK4Se5OX1qrpAtqN8/s320/ezgif.com-video-to-gif+%25281%2529.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Following &lt;a href=&quot;https://github.com/amrut8winjit/MyApplication.git&quot; target=&quot;_blank&quot;&gt;library&lt;/a&gt; i have referred and modified as per as requirement.&lt;br /&gt;
Source Code of View&lt;br /&gt;
&lt;br /&gt;








&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
TagCloudView.java&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; java.util.ArrayList;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; java.util.Iterator;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; java.util.List;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.content.Context;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.content.SharedPreferences;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.graphics.Canvas;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.graphics.Color;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.os.Handler;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.preference.PreferenceManager;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.util.Log;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.view.MotionEvent;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.view.View;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.view.animation.AlphaAnimation;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.view.animation.Animation;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.view.animation.AnimationSet;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.view.animation.ScaleAnimation;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.widget.RelativeLayout;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.widget.TextView;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;class&lt;/span&gt; TagCloudView &lt;span class=&quot;s1&quot;&gt;extends&lt;/span&gt; RelativeLayout {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; RelativeLayout &lt;span class=&quot;s2&quot;&gt;navigation_bar&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; TextView &lt;span class=&quot;s2&quot;&gt;mTextView1&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; TagCloudType &lt;span class=&quot;s2&quot;&gt;tagCloudType&lt;/span&gt; = TagCloudType.&lt;span class=&quot;s2&quot;&gt;SPHERE&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;private&lt;/span&gt; String &lt;span class=&quot;s3&quot;&gt;TAG&lt;/span&gt; = &lt;span class=&quot;s4&quot;&gt;&quot;TagCloudView&quot;&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; TagCloudView(Context mContext, &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; width, &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; height, List&amp;lt;Tag&amp;gt; tagList) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;this&lt;/span&gt;(mContext, width, height, tagList, TagCloud.&lt;span class=&quot;s2&quot;&gt;TEXT_SIZE_MIN&lt;/span&gt;, TagCloud.&lt;span class=&quot;s2&quot;&gt;TEXT_SIZE_MAX&lt;/span&gt;, 2); &lt;span class=&quot;s5&quot;&gt;// default for &lt;/span&gt;&lt;span class=&quot;s6&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;/max&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// text size&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; TagCloudView(Context mContext, &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; width, &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; height, List&amp;lt;Tag&amp;gt; tagList, &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; textSizeMin, &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; textSizeMax, &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; scrollSpeed) {&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;super&lt;/span&gt;(mContext);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;mContext&lt;/span&gt; = mContext;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;textSizeMin&lt;/span&gt; = textSizeMin;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;textSizeMax&lt;/span&gt; = textSizeMax;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;tspeed&lt;/span&gt; = scrollSpeed;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;x&lt;/span&gt; = getFromPreferences(&lt;span class=&quot;s4&quot;&gt;&quot;TagCloudView_x&quot;&lt;/span&gt;, 0.0f);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;y&lt;/span&gt; = getFromPreferences(&lt;span class=&quot;s4&quot;&gt;&quot;TagCloudView_y&quot;&lt;/span&gt;, 0.0f);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// set the center of the sphere on center of our screen:&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;centerX&lt;/span&gt; = width / 2;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;centerY&lt;/span&gt; = height / 2;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;radius&lt;/span&gt; = Math.min(&lt;span class=&quot;s2&quot;&gt;centerX&lt;/span&gt; * 0.95f, &lt;span class=&quot;s2&quot;&gt;centerY&lt;/span&gt; * 0.95f); &lt;span class=&quot;s5&quot;&gt;// use 95% of&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// screen&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// since we set tag margins from left of screen, we shift the whole tags&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// to left so that&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// it looks more realistic and symmetric relative to center of screen in&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// X direction&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;shiftLeft&lt;/span&gt; = (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (Math.min(&lt;span class=&quot;s2&quot;&gt;centerX&lt;/span&gt; * 0.15f, &lt;span class=&quot;s2&quot;&gt;centerY&lt;/span&gt; * 0.15f));&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// initialize the TagCloud from a list of tags&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// Filter() &lt;span class=&quot;s8&quot;&gt;func&lt;/span&gt;. screens tagList and ignores Tags with same text (Case&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// Insensitive)&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt; = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; TagCloud(Filter(tagList), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) &lt;span class=&quot;s2&quot;&gt;radius&lt;/span&gt;, textSizeMin, textSizeMax);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt;[] tempColor1 = {1.0f, 1.0f, 1.0f, 1}; &lt;span class=&quot;s5&quot;&gt;// &lt;/span&gt;&lt;span class=&quot;s6&quot;&gt;rgb&lt;/span&gt;&lt;span class=&quot;s5&quot;&gt; Alpha&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// {1f,0f,0f,1} red {0.3882f,0.21568f,0.0f,1} orange&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// {0.9412f,0.7686f,0.2f,1} light orange&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt;[] tempColor2 = {0.6f, 0.6f, 0.6f, 1}; &lt;span class=&quot;s5&quot;&gt;// &lt;/span&gt;&lt;span class=&quot;s6&quot;&gt;rgb&lt;/span&gt;&lt;span class=&quot;s5&quot;&gt; Alpha&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// {0f,0f,1f,1} blue&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// {0.1294f,0.1294f,0.1294f,1}&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s5&quot;&gt;// grey&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// {0.9412f,0.7686f,0.2f,1}&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// light orange&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.setTagColor1(tempColor1);&lt;span class=&quot;s5&quot;&gt;// higher color&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.setTagColor2(tempColor2);&lt;span class=&quot;s5&quot;&gt;// lower color&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.setRadius((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) &lt;span class=&quot;s2&quot;&gt;radius&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt;.create(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt;); &lt;/span&gt;// to put each Tag at its correct initial&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// location&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// update the transparency/scale of tags&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.setAngleX(&lt;span class=&quot;s2&quot;&gt;mAngleX&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.setAngleY(&lt;span class=&quot;s2&quot;&gt;mAngleY&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.update();&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt; = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; ArrayList&amp;lt;TextView&amp;gt;();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt; = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; ArrayList&amp;lt;LayoutParams&amp;gt;();&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// Now Draw the 3D objects: for all the tags in the TagCloud&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s8&quot;&gt;Iterator&lt;/span&gt; it = &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.iterator();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tag tempTag;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; i = 0;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;while&lt;/span&gt; (it.hasNext()) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tempTag = (Tag) it.next();&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tempTag.setParamNo(i); &lt;/span&gt;// store the parameter No. related to this&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s5&quot;&gt;// tag&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.add(&lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; TextView(&lt;span class=&quot;s1&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;mContext&lt;/span&gt;));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setText(tempTag.getText());&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setTag(tempTag);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setShadowLayer(3, 1, 1, Color.&lt;span class=&quot;s2&quot;&gt;BLACK&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt;.add(&lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; LayoutParams(LayoutParams.&lt;span class=&quot;s2&quot;&gt;WRAP_CONTENT&lt;/span&gt;, LayoutParams.&lt;span class=&quot;s2&quot;&gt;WRAP_CONTENT&lt;/span&gt;));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt;.get(i).addRule(RelativeLayout.&lt;span class=&quot;s2&quot;&gt;ALIGN_PARENT_LEFT&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt;.get(i).addRule(RelativeLayout.&lt;span class=&quot;s2&quot;&gt;ALIGN_PARENT_TOP&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt;.get(i).setMargins((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (&lt;span class=&quot;s2&quot;&gt;centerX&lt;/span&gt; - &lt;span class=&quot;s2&quot;&gt;shiftLeft&lt;/span&gt; + tempTag.getLoc2DX()), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (&lt;span class=&quot;s2&quot;&gt;centerY&lt;/span&gt; + tempTag.getLoc2DY()), 0, 0);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setLayoutParams(&lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt;.get(i));&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setSingleLine(&lt;span class=&quot;s1&quot;&gt;true&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; mergedColor = Color.argb((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getAlpha() * 255), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getColorR() * 255), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getColorG() * 255),&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getColorB() * 255));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setTextColor(mergedColor);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setTextSize(22);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; addView(&lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setOnClickListener(OnTagClickListener(tempTag.getUrl()));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i++;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; setTagCloudType(TagCloudType type) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;tagCloudType&lt;/span&gt; = type;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;handler&lt;/span&gt;.removeCallbacks(&lt;span class=&quot;s2&quot;&gt;animatorSpherical&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;handler&lt;/span&gt;.removeCallbacks(&lt;span class=&quot;s2&quot;&gt;animatorBarrel&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;s2&quot;&gt;tagCloudType&lt;/span&gt; == TagCloudType.&lt;span class=&quot;s2&quot;&gt;SPHERE&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;updateViewSpherical(&lt;span class=&quot;s2&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;y&lt;/span&gt;, .2f);&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;//&amp;nbsp; handler.post(animatorSpherical);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;span class=&quot;s1&quot;&gt;else&lt;/span&gt; {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postInvalidate();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;enum&lt;/span&gt; TagCloudType {&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;SPHERE&lt;span class=&quot;s7&quot;&gt;, &lt;/span&gt;BARREL&lt;span class=&quot;s7&quot;&gt;, &lt;/span&gt;FLAT&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;x&lt;/span&gt; = 0;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;y&lt;/span&gt; = 0;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;// &lt;span class=&quot;s8&quot;&gt;int&lt;/span&gt; textColor = Color.WHITE;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;changerY&lt;/span&gt; = 0.1f;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;changerX&lt;/span&gt; = 0.1f;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p5&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;@Override&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; onDraw(Canvas canvas) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;super&lt;/span&gt;.onDraw(canvas);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p5&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;@Override&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; dispatchDraw(Canvas canvas) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt;(&lt;span class=&quot;s2&quot;&gt;tagCloudType&lt;/span&gt; == TagCloudType.&lt;span class=&quot;s2&quot;&gt;SPHERE&lt;/span&gt;){&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;updateViewSpherical(&lt;span class=&quot;s2&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;y&lt;/span&gt;, .2f);&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;s2&quot;&gt;tagCloudType&lt;/span&gt; == TagCloudType.&lt;span class=&quot;s2&quot;&gt;BARREL&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; updateViewBarrel();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;span class=&quot;s1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;s2&quot;&gt;tagCloudType&lt;/span&gt; == TagCloudType.&lt;span class=&quot;s2&quot;&gt;FLAT&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; updateViewFlat();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;super&lt;/span&gt;.dispatchDraw(canvas);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; Handler &lt;span class=&quot;s2&quot;&gt;handler&lt;/span&gt; = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; Handler();&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;boolean&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;isAnimating&lt;span class=&quot;s7&quot;&gt; = &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; Runnable &lt;span class=&quot;s2&quot;&gt;animatorSpherical&lt;/span&gt; = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; Runnable() {&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p5&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;@Override&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; run() {&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// &lt;span class=&quot;s9&quot;&gt;TODO&lt;/span&gt; Auto-generated method stub&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;s2&quot;&gt;isAnimating&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Log.e(&lt;span class=&quot;s4&quot;&gt;&quot;x&quot;&lt;/span&gt;,&lt;span class=&quot;s4&quot;&gt;&quot;&quot;&lt;/span&gt;+&lt;span class=&quot;s2&quot;&gt;x&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Log.e(&lt;span class=&quot;s4&quot;&gt;&quot;y&quot;&lt;/span&gt;,&lt;span class=&quot;s4&quot;&gt;&quot;&quot;&lt;/span&gt;+&lt;span class=&quot;s2&quot;&gt;y&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Log.e(&lt;span class=&quot;s4&quot;&gt;&quot;changerX&quot;&lt;/span&gt;,&lt;span class=&quot;s4&quot;&gt;&quot;&quot;&lt;/span&gt;+&lt;span class=&quot;s2&quot;&gt;changerX&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Log.e(&lt;span class=&quot;s4&quot;&gt;&quot;changerY&quot;&lt;/span&gt;,&lt;span class=&quot;s4&quot;&gt;&quot;&quot;&lt;/span&gt;+&lt;span class=&quot;s2&quot;&gt;changerY&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Log.e(&lt;span class=&quot;s4&quot;&gt;&quot;tspeed&quot;&lt;/span&gt;,&lt;span class=&quot;s4&quot;&gt;&quot;&quot;&lt;/span&gt;+&lt;span class=&quot;s2&quot;&gt;tspeed&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;x&lt;/span&gt; = &lt;span class=&quot;s2&quot;&gt;x&lt;/span&gt; + &lt;span class=&quot;s2&quot;&gt;changerX&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;y&lt;/span&gt; = &lt;span class=&quot;s2&quot;&gt;y&lt;/span&gt; + &lt;span class=&quot;s2&quot;&gt;changerY&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p6&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Log.d(&lt;/span&gt;&quot;TAG&quot;&lt;span class=&quot;s7&quot;&gt;, &lt;/span&gt;&quot;animatorSpherical x=&quot;&lt;span class=&quot;s7&quot;&gt; + &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; + &lt;/span&gt;&quot;;changerX=&quot;&lt;span class=&quot;s7&quot;&gt; + &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;changerX&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; + &lt;/span&gt;&quot; y=&quot;&lt;span class=&quot;s7&quot;&gt; + &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; + &lt;/span&gt;&quot;; changerY=&quot;&lt;span class=&quot;s7&quot;&gt; + &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;changerY&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// updateViewSpherical(x, y, &lt;span class=&quot;s8&quot;&gt;tspeed&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// updateViewSpherical(x, y, 0.15f);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; };&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;timeSpherical&lt;span class=&quot;s7&quot;&gt; = 500;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;timeCircular&lt;/span&gt; = 500;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; addTag(Tag newTag) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.add(newTag);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; i = &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.size();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; newTag.setParamNo(i);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.add(&lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; TextView(&lt;span class=&quot;s1&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;mContext&lt;/span&gt;));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setText(newTag.getText());&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setTag(newTag);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setShadowLayer(3, 1, 1, Color.&lt;span class=&quot;s2&quot;&gt;BLACK&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt;.add(&lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; LayoutParams(LayoutParams.&lt;span class=&quot;s2&quot;&gt;WRAP_CONTENT&lt;/span&gt;, LayoutParams.&lt;span class=&quot;s2&quot;&gt;WRAP_CONTENT&lt;/span&gt;));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt;.get(i).addRule(RelativeLayout.&lt;span class=&quot;s2&quot;&gt;ALIGN_PARENT_LEFT&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt;.get(i).addRule(RelativeLayout.&lt;span class=&quot;s2&quot;&gt;ALIGN_PARENT_TOP&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt;.get(i).setMargins((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (&lt;span class=&quot;s2&quot;&gt;centerX&lt;/span&gt; - &lt;span class=&quot;s2&quot;&gt;shiftLeft&lt;/span&gt; + newTag.getLoc2DX()), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (&lt;span class=&quot;s2&quot;&gt;centerY&lt;/span&gt; + newTag.getLoc2DY()), 0, 0);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setLayoutParams(&lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt;.get(i));&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setSingleLine(&lt;span class=&quot;s1&quot;&gt;true&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; mergedColor = Color.argb((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (newTag.getAlpha() * 255), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (newTag.getColorR() * 255), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (newTag.getColorG() * 255),&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (newTag.getColorB() * 255));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setTextColor(mergedColor);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setTextSize((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (newTag.getTextSize() * newTag.getScale()));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; addView(&lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(i).setOnClickListener(OnTagClickListener(newTag.getUrl()));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p7&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;private&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;float&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; = 0;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;changer&lt;/span&gt; = -2;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; Runnable &lt;span class=&quot;s2&quot;&gt;animatorBarrel&lt;/span&gt; = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; Runnable() {&lt;/div&gt;
&lt;div class=&quot;p5&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;@Override&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; run() {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt; = &lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt; + &lt;span class=&quot;s2&quot;&gt;changer&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postInvalidate();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; };&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; updateViewBarrel() {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; radius = &lt;span class=&quot;s2&quot;&gt;centerY&lt;/span&gt; * 0.80f;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// float radius =&amp;nbsp; getHeight()/3f ;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt;(&lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt;&amp;lt;-10000){&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt; = -600; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt;(&lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt;&amp;gt;10000){&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt; = 600; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;s8&quot;&gt;deltaY&lt;/span&gt; = (&lt;span class=&quot;s2&quot;&gt;centerY&lt;/span&gt; - radius) / 2;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; i = 0; i &amp;lt; getChildCount(); i++) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; t = i + &lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt; / getHeight();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;s8&quot;&gt;theta&lt;/span&gt; = Math.&lt;span class=&quot;s2&quot;&gt;PI&lt;/span&gt; * 2 * t / getChildCount();&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float y = (float) (radius * Math.cos(&lt;span class=&quot;s8&quot;&gt;theta&lt;/span&gt;));&amp;nbsp; &amp;nbsp; // parametric circle equation&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float z = (float) (radius * Math.sin(&lt;span class=&quot;s8&quot;&gt;theta&lt;/span&gt;));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; y = (&lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt;) (radius * Math.cos(Math.&lt;span class=&quot;s2&quot;&gt;PI&lt;/span&gt; * 2 * t / getChildCount()));&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s5&quot;&gt;// parametric circle equation&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; z = (&lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt;) (radius * Math.sin(Math.&lt;span class=&quot;s2&quot;&gt;PI&lt;/span&gt; * 2 * t / getChildCount()));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;s8&quot;&gt;textSize&lt;/span&gt; = (radius + z) / radius / 2 * 20 + 16;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; alpha = (radius + z) / radius / 2 * 127 + 128;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; View view = getChildAt(i);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; left = getWidth() / 2 - view.getWidth() / 2;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; top = (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) ((getHeight() / 2) + y);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;s8&quot;&gt;right&lt;/span&gt; = left + view.getWidth();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;s8&quot;&gt;bottom&lt;/span&gt; = top + view.getHeight();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;s8&quot;&gt;color&lt;/span&gt; = (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (t * 10);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (view &lt;span class=&quot;s1&quot;&gt;instanceof&lt;/span&gt; TextView) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TextView textView = (TextView) view;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;//textView.setTextSize(textSize);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;//textView.setAlpha(alpha);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setAlphaAnimation(textView, alpha / 255);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; textView.setTextColor(Color.&lt;span class=&quot;s2&quot;&gt;WHITE&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LayoutParams params = (LayoutParams) textView.getLayoutParams();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; params.setMargins(left, top, 0, 0);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; textView.setLayoutParams(params);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;//&amp;nbsp; Log.d(TAG, &quot;animatorBarrel text=&quot; + textView.getText() + &quot;; z=&quot; + z + &quot;; scroll=&quot; + scroll);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// Log.e(TAG, &quot;animatorBarrel scroll=&quot; + scroll + &quot;; &lt;span class=&quot;s8&quot;&gt;theta&lt;/span&gt;=&quot; + &lt;span class=&quot;s8&quot;&gt;theta&lt;/span&gt; + &quot;; alpha=&quot; + alpha + &quot;; y=&quot; + y + &quot;; z=&quot; + z + &quot;; radius=&quot; + radius + &quot;; i=&quot; + i);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;//view.layout(left, top, right, bottom);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// view.scr&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;//Log.e()&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p6&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Log.e(&lt;/span&gt;&quot;invalidate&quot;&lt;span class=&quot;s7&quot;&gt;,&lt;/span&gt;&quot;radius&quot;&lt;span class=&quot;s7&quot;&gt;+radius+&lt;/span&gt;&quot;,centerY:&quot;&lt;span class=&quot;s7&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;centerY&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt;+&lt;/span&gt;&quot;,scroll:&quot;&lt;span class=&quot;s7&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt;+&lt;/span&gt;&quot;,getheight:&quot;&lt;span class=&quot;s7&quot;&gt;+getHeight());&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p6&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Log.e(&lt;/span&gt;&quot;invalidate1&quot;&lt;span class=&quot;s7&quot;&gt;,&lt;/span&gt;&quot;centery&quot;&lt;span class=&quot;s7&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;centerY&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p6&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Log.e(&lt;/span&gt;&quot;invalidate2&quot;&lt;span class=&quot;s7&quot;&gt;,&lt;/span&gt;&quot;scroll&quot;&lt;span class=&quot;s7&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Log.e(&lt;span class=&quot;s4&quot;&gt;&quot;invalidate3&quot;&lt;/span&gt;,&lt;span class=&quot;s4&quot;&gt;&quot;getheight&quot;&lt;/span&gt;+getHeight());&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
// &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; float r = getHeight() / 3;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
// &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; float t = i + scroll / getHeight();&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float y = (float) (r * Math.cos(Math.PI * 2 * t / getChildCount()));&amp;nbsp; &amp;nbsp; // parametric circle equation&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float z = (float) (r * Math.sin(Math.PI * 2 * t / getChildCount()));&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; paint.setTextSize((r + z) / r/2 * 40 + 20); &amp;nbsp; &amp;nbsp; // magic values, change to something better&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; paint.setAlpha((&lt;span class=&quot;s8&quot;&gt;int&lt;/span&gt;) ((r + z) / r/2 * 127 + 128));&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; canvas.drawText(tags[i], getWidth() / 2, getHeight() / 2 + y, paint);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
// &amp;nbsp; &amp;nbsp; mTagCloud.setAngleX(90);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mTagCloud.setAngleY(180);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mTagCloud.update();&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Iterator it = mTagCloud.iterator();&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tag tempTag;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s8&quot;&gt;int&lt;/span&gt; i=0;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (it.hasNext()) {&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tempTag = (Tag) it.next();&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float t = i + scroll / getHeight();&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double &lt;span class=&quot;s8&quot;&gt;theta&lt;/span&gt; = Math.PI * 2 * t / getChildCount();&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float y = (float) (radius * Math.cos(&lt;span class=&quot;s8&quot;&gt;theta&lt;/span&gt;));&amp;nbsp; &amp;nbsp; // parametric circle equation&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float z = (float) (radius * Math.sin(&lt;span class=&quot;s8&quot;&gt;theta&lt;/span&gt;));&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float textSize = (radius + z) / radius / 2 * 32 + 16;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float alpha = (radius + z) / radius / 2 * 127 + 128;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TextView textView = mTextView.get(tempTag.getParamNo());&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s8&quot;&gt;int&lt;/span&gt; left = (&lt;span class=&quot;s8&quot;&gt;int&lt;/span&gt;) (centerX - textView.getWidth() / 2);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s8&quot;&gt;int&lt;/span&gt; top = (&lt;span class=&quot;s8&quot;&gt;int&lt;/span&gt;) ((getHeight() / 2) + y);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s8&quot;&gt;int&lt;/span&gt; right = left + textView.getWidth();&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s8&quot;&gt;int&lt;/span&gt; bottom = top + textView.getHeight();&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s8&quot;&gt;int&lt;/span&gt; color = (&lt;span class=&quot;s8&quot;&gt;int&lt;/span&gt;) (t * 10);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mParams.get(tempTag.getParamNo()).setMargins(left,top,0,0);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; textView.setTextSize(textSize);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; textView.setTextColor(Color.WHITE);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; textView.bringToFront();&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i++;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;handler&lt;span class=&quot;s7&quot;&gt;.postDelayed(&lt;/span&gt;animatorBarrel&lt;span class=&quot;s7&quot;&gt;, &lt;/span&gt;timeCircular&lt;span class=&quot;s7&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; updateViewSpherical(&lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; x, &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; y, &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; tspeed) {&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// &lt;span class=&quot;s9&quot;&gt;TODO&lt;/span&gt; Auto-generated method stub&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// rotate elements depending on how far the selection point is from&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// center of cloud&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; dx = x - &lt;span class=&quot;s2&quot;&gt;centerX&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; dy = y - &lt;span class=&quot;s2&quot;&gt;centerY&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mAngleX&lt;/span&gt; = (dy / &lt;span class=&quot;s2&quot;&gt;radius&lt;/span&gt;) * tspeed * &lt;span class=&quot;s2&quot;&gt;TOUCH_SCALE_FACTOR&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mAngleY&lt;/span&gt; = (-dx / &lt;span class=&quot;s2&quot;&gt;radius&lt;/span&gt;) * tspeed * &lt;span class=&quot;s2&quot;&gt;TOUCH_SCALE_FACTOR&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.setAngleX(&lt;span class=&quot;s2&quot;&gt;mAngleX&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.setAngleY(&lt;span class=&quot;s2&quot;&gt;mAngleY&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.update();&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s8&quot;&gt;Iterator&lt;/span&gt; it = &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.iterator();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tag tempTag;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;while&lt;/span&gt; (it.hasNext()) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tempTag = (Tag) it.next();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt;.get(tempTag.getParamNo()).setMargins((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (&lt;span class=&quot;s2&quot;&gt;centerX&lt;/span&gt; - &lt;span class=&quot;s2&quot;&gt;shiftLeft&lt;/span&gt; + tempTag.getLoc2DX()), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (&lt;span class=&quot;s2&quot;&gt;centerY&lt;/span&gt; + tempTag.getLoc2DY()),&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0, 0);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Log.e(&lt;span class=&quot;s4&quot;&gt;&quot;textsizwww&quot;&lt;/span&gt;,&lt;span class=&quot;s4&quot;&gt;&quot;&quot;&lt;/span&gt;+(&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getTextSize() * tempTag.getScale()));&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// mTextView.get(tempTag.getParamNo()).setTextSize((&lt;span class=&quot;s8&quot;&gt;int&lt;/span&gt;) (tempTag.getTextSize() * tempTag.getScale()));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; mergedColor = Color.argb((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getAlpha() * 255), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getColorR() * 255), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getColorG() * 255),&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getColorB() * 255));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(tempTag.getParamNo()).setTextColor(mergedColor);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(tempTag.getParamNo()).bringToFront();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;boolean&lt;/span&gt; Replace(Tag newTag, String oldTagText) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;boolean&lt;/span&gt; result = &lt;span class=&quot;s1&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; j = &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.Replace(newTag, oldTagText);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; (j &amp;gt;= 0) { &lt;/span&gt;// then oldTagText was found and replaced with newTag data&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s8&quot;&gt;Iterator&lt;/span&gt; it = &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.iterator();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tag tempTag;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;while&lt;/span&gt; (it.hasNext()) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tempTag = (Tag) it.next();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt;.get(tempTag.getParamNo()).setMargins((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (&lt;span class=&quot;s2&quot;&gt;centerX&lt;/span&gt; - &lt;span class=&quot;s2&quot;&gt;shiftLeft&lt;/span&gt; + tempTag.getLoc2DX()),&lt;/div&gt;
&lt;div class=&quot;p1&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;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (&lt;span class=&quot;s2&quot;&gt;centerY&lt;/span&gt; + tempTag.getLoc2DY()), 0, 0);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(tempTag.getParamNo()).setText(tempTag.getText());&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(tempTag.getParamNo()).setTextSize((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getTextSize() * tempTag.getScale()));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; mergedColor = Color.argb((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getAlpha() * 255), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getColorR() * 255),&lt;/div&gt;
&lt;div class=&quot;p1&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;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getColorG() * 255), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getColorB() * 255));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(tempTag.getParamNo()).setTextColor(mergedColor);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(tempTag.getParamNo()).bringToFront();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result = &lt;span class=&quot;s1&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;return&lt;/span&gt; result;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; reset() {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.reset();&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s8&quot;&gt;Iterator&lt;/span&gt; it = &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;.iterator();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tag tempTag;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;while&lt;/span&gt; (it.hasNext()) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tempTag = (Tag) it.next();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt;.get(tempTag.getParamNo()).setMargins((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (&lt;span class=&quot;s2&quot;&gt;centerX&lt;/span&gt; - &lt;span class=&quot;s2&quot;&gt;shiftLeft&lt;/span&gt; + tempTag.getLoc2DX()), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (&lt;span class=&quot;s2&quot;&gt;centerY&lt;/span&gt; + tempTag.getLoc2DY()),&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0, 0);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(tempTag.getParamNo()).setTextSize((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getTextSize() * tempTag.getScale()));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; mergedColor = Color.argb((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getAlpha() * 255), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getColorR() * 255), (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getColorG() * 255),&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) (tempTag.getColorB() * 255));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(tempTag.getParamNo()).setTextColor(mergedColor);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;.get(tempTag.getParamNo()).bringToFront();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p5&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;@Override&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;boolean&lt;/span&gt; onTrackballEvent(MotionEvent e) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;s2&quot;&gt;tagCloudType&lt;/span&gt; == TagCloudType.&lt;span class=&quot;s2&quot;&gt;SPHERE&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; x = e.getX();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; y = e.getY();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (e.getY() != &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (e.getY() - &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt; &amp;gt; 0) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;changerY&lt;/span&gt; = 0 - Math.abs(&lt;span class=&quot;s2&quot;&gt;changerY&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;span class=&quot;s1&quot;&gt;else&lt;/span&gt; {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;changerY&lt;/span&gt; = Math.abs(&lt;span class=&quot;s2&quot;&gt;changerY&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (e.getX() != &lt;span class=&quot;s2&quot;&gt;prevX&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (e.getX() - &lt;span class=&quot;s2&quot;&gt;prevX&lt;/span&gt; &amp;gt; 0) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;changerX&lt;/span&gt; = 0 - Math.abs(&lt;span class=&quot;s2&quot;&gt;changerX&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;span class=&quot;s1&quot;&gt;else&lt;/span&gt; {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;changerX&lt;/span&gt; = Math.abs(&lt;span class=&quot;s2&quot;&gt;changerX&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; updateViewSpherical(-x, y, &lt;span class=&quot;s2&quot;&gt;tspeed&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;span class=&quot;s1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;s2&quot;&gt;tagCloudType&lt;/span&gt; == TagCloudType.&lt;span class=&quot;s2&quot;&gt;BARREL&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (e.getAction() != MotionEvent.&lt;span class=&quot;s2&quot;&gt;ACTION_DOWN&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; diff = e.getY() - &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt; = &lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt; - diff * 4; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s5&quot;&gt;// only one plane&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (e.getY() != &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (e.getY() - &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt; &amp;gt; 0) {&lt;/div&gt;
&lt;div class=&quot;p1&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;span class=&quot;s2&quot;&gt;changer&lt;/span&gt; = 0 - Math.abs(&lt;span class=&quot;s2&quot;&gt;changer&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;span class=&quot;s1&quot;&gt;else&lt;/span&gt; {&lt;/div&gt;
&lt;div class=&quot;p1&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;span class=&quot;s2&quot;&gt;changer&lt;/span&gt; = Math.abs(&lt;span class=&quot;s2&quot;&gt;changer&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Log.e(&lt;span class=&quot;s4&quot;&gt;&quot;onTrackball&quot;&lt;/span&gt;, &lt;span class=&quot;s4&quot;&gt;&quot;scroll=&quot;&lt;/span&gt; + &lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt; + &lt;span class=&quot;s4&quot;&gt;&quot;; prevY=&quot;&lt;/span&gt; + &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt; + &lt;span class=&quot;s4&quot;&gt;&quot;; y=&quot;&lt;/span&gt; + e.getY() + &lt;span class=&quot;s4&quot;&gt;&quot;; changer=&quot;&lt;/span&gt; + &lt;span class=&quot;s2&quot;&gt;changer&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt; = e.getY();&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postInvalidate();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;prevX&lt;/span&gt; = 0.0f;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt; = 0.0f;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p5&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;@Override&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;s8&quot;&gt;onTouchEvent&lt;/span&gt;(MotionEvent e) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;s2&quot;&gt;tagCloudType&lt;/span&gt; == TagCloudType.&lt;span class=&quot;s2&quot;&gt;SPHERE&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; x = e.getX();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; y = e.getY();&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;switch&lt;/span&gt; (e.getAction()) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;case&lt;/span&gt; MotionEvent.&lt;span class=&quot;s2&quot;&gt;ACTION_DOWN&lt;/span&gt;:&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;isAnimating&lt;/span&gt; = &lt;span class=&quot;s1&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;case&lt;/span&gt; MotionEvent.&lt;span class=&quot;s2&quot;&gt;ACTION_MOVE&lt;/span&gt;:&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Log.d(&lt;span class=&quot;s4&quot;&gt;&quot;TAG&quot;&lt;/span&gt;, &lt;span class=&quot;s4&quot;&gt;&quot;x=&quot;&lt;/span&gt; + x + &lt;span class=&quot;s4&quot;&gt;&quot;;changerX=&quot;&lt;/span&gt; + &lt;span class=&quot;s2&quot;&gt;changerX&lt;/span&gt; + &lt;span class=&quot;s4&quot;&gt;&quot; y=&quot;&lt;/span&gt; + y + &lt;span class=&quot;s4&quot;&gt;&quot;; changerY=&quot;&lt;/span&gt; + &lt;span class=&quot;s2&quot;&gt;changerY&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (e.getY() != &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&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;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (e.getY() - &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt; &amp;gt; 0) {&lt;/div&gt;
&lt;div class=&quot;p1&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; &lt;span class=&quot;s2&quot;&gt;changerY&lt;/span&gt; = 0 - Math.abs(&lt;span class=&quot;s2&quot;&gt;changerY&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&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;span class=&quot;s1&quot;&gt;else&lt;/span&gt; {&lt;/div&gt;
&lt;div class=&quot;p1&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; &lt;span class=&quot;s2&quot;&gt;changerY&lt;/span&gt; = Math.abs(&lt;span class=&quot;s2&quot;&gt;changerY&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&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;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (e.getX() != &lt;span class=&quot;s2&quot;&gt;prevX&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&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;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (e.getX() - &lt;span class=&quot;s2&quot;&gt;prevX&lt;/span&gt; &amp;gt; 0) {&lt;/div&gt;
&lt;div class=&quot;p1&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; &lt;span class=&quot;s2&quot;&gt;changerX&lt;/span&gt; = 0 - Math.abs(&lt;span class=&quot;s2&quot;&gt;changerX&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&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;span class=&quot;s1&quot;&gt;else&lt;/span&gt; {&lt;/div&gt;
&lt;div class=&quot;p1&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; &lt;span class=&quot;s2&quot;&gt;changerX&lt;/span&gt; = Math.abs(&lt;span class=&quot;s2&quot;&gt;changerX&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&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;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; updateViewSpherical(x, y, &lt;span class=&quot;s2&quot;&gt;tspeed&lt;/span&gt; * 2);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;case&lt;/span&gt; MotionEvent.&lt;span class=&quot;s2&quot;&gt;ACTION_UP&lt;/span&gt;:&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;isAnimating&lt;/span&gt; = &lt;span class=&quot;s1&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s5&quot;&gt;/*&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * case MotionEvent.ACTION_UP: //now it is clicked!!!! &lt;span class=&quot;s8&quot;&gt;dx&lt;/span&gt; = x - centerX;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; * &lt;span class=&quot;s8&quot;&gt;dy&lt;/span&gt; = y - centerY; break;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; */&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;y&lt;/span&gt; = &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt; = e.getY();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;x&lt;/span&gt; = &lt;span class=&quot;s2&quot;&gt;prevX&lt;/span&gt; = e.getX();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;span class=&quot;s1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;s2&quot;&gt;tagCloudType&lt;/span&gt; == TagCloudType.&lt;span class=&quot;s2&quot;&gt;BARREL&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (e.getAction() != MotionEvent.&lt;span class=&quot;s2&quot;&gt;ACTION_DOWN&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Log.e(&lt;span class=&quot;s4&quot;&gt;&quot;prevY1&quot;&lt;/span&gt;,&lt;span class=&quot;s4&quot;&gt;&quot;&quot;&lt;/span&gt;+&lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; diff = e.getY() - &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Log.e(&lt;span class=&quot;s4&quot;&gt;&quot;prevY2&quot;&lt;/span&gt;,&lt;span class=&quot;s4&quot;&gt;&quot;&quot;&lt;/span&gt;+diff);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt; = &lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt; - diff *4 ; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s5&quot;&gt;// only one plane&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (e.getY() != &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (e.getY() - &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt; &amp;lt; 0) {&lt;/div&gt;
&lt;div class=&quot;p1&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;span class=&quot;s2&quot;&gt;changer&lt;/span&gt; = 0 - Math.abs(&lt;span class=&quot;s2&quot;&gt;changer&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&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;&lt;/div&gt;
&lt;div class=&quot;p2&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;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;span class=&quot;s1&quot;&gt;else&lt;/span&gt; {&lt;/div&gt;
&lt;div class=&quot;p1&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;span class=&quot;s2&quot;&gt;changer&lt;/span&gt; = Math.abs(&lt;span class=&quot;s2&quot;&gt;changer&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Log.e(&lt;span class=&quot;s4&quot;&gt;&quot;ontouch&quot;&lt;/span&gt;, &lt;span class=&quot;s4&quot;&gt;&quot;scroll=&quot;&lt;/span&gt; + &lt;span class=&quot;s2&quot;&gt;scroll&lt;/span&gt; + &lt;span class=&quot;s4&quot;&gt;&quot;; prevY=&quot;&lt;/span&gt; + &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt; + &lt;span class=&quot;s4&quot;&gt;&quot;; y=&quot;&lt;/span&gt; + e.getY() + &lt;span class=&quot;s4&quot;&gt;&quot;; changer=&quot;&lt;/span&gt; + &lt;span class=&quot;s2&quot;&gt;changer&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;//changer = Math.abs(changer);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;prevY&lt;/span&gt; = e.getY();&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
//updateViewBarrel();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postInvalidate();&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; setAlphaAnimation(View view, &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; alpha) {&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// &lt;span class=&quot;s9&quot;&gt;TODO&lt;/span&gt; Auto-generated method stub&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AnimationSet set = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; AnimationSet(&lt;span class=&quot;s1&quot;&gt;true&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Animation animation = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; AlphaAnimation(alpha, alpha);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set.addAnimation(animation);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set.setDuration(0);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set.setFillAfter(&lt;span class=&quot;s1&quot;&gt;true&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; view.setAnimation(set);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set.start();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; setScaleAnimation(View view) {&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// &lt;span class=&quot;s9&quot;&gt;TODO&lt;/span&gt; Auto-generated method stub&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ScaleAnimation scaleAnimation = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; ScaleAnimation(1.0f, 5.0f, 1.0f, 5.0f, 50.0f, 50.0f);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scaleAnimation.setDuration(500);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scaleAnimation.setFillAfter(&lt;span class=&quot;s1&quot;&gt;false&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; view.startAnimation(scaleAnimation);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p5&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;@Override&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; onLayout(&lt;span class=&quot;s1&quot;&gt;boolean&lt;/span&gt; changed, &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; l, &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; t, &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; r, &lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; b) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;super&lt;/span&gt;.onLayout(changed, l, t, r, b);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;s2&quot;&gt;tagCloudType&lt;/span&gt; == TagCloudType.&lt;span class=&quot;s2&quot;&gt;SPHERE&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;handler&lt;span class=&quot;s7&quot;&gt;.postDelayed(&lt;/span&gt;animatorSpherical&lt;span class=&quot;s7&quot;&gt;, &lt;/span&gt;timeSpherical&lt;span class=&quot;s7&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;span class=&quot;s1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;s2&quot;&gt;tagCloudType&lt;/span&gt; == TagCloudType.&lt;span class=&quot;s2&quot;&gt;BARREL&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; updateViewBarrel();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;span class=&quot;s1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;s2&quot;&gt;tagCloudType&lt;/span&gt; == TagCloudType.&lt;span class=&quot;s2&quot;&gt;FLAT&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; updateViewFlat();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; updateViewFlat() {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; top = 10;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; left = 0;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; i = getChildCount() - 1; i &amp;gt;= 0; i--) {&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; View view = getChildAt(i);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;//top = (&lt;span class=&quot;s8&quot;&gt;int&lt;/span&gt;) ((getHeight() / 2) + y);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (view &lt;span class=&quot;s1&quot;&gt;instanceof&lt;/span&gt; TextView) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TextView textView = (TextView) view;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;//textView.setTextColor(Color.WHITE);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; left = left + 20;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LayoutParams params = (LayoutParams) textView.getLayoutParams();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; params.setMargins((&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) left, (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;) top, 0, 0);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; textView.setLayoutParams(params);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; left = left + view.getWidth();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (left &amp;gt;= getWidth()) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; left = 0;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; top = top + view.getHeight();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;span class=&quot;s1&quot;&gt;else&lt;/span&gt; {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (i - 1 &amp;gt;= 0) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; top = top + (view.getHeight() - getChildAt(i - 1).getHeight());&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (i - 1 &amp;gt;= 0) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (getWidth() - left &amp;lt; getChildAt(i - 1).getWidth()) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; left = 0;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; top = top + view.getHeight();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Log.e(&lt;span class=&quot;s4&quot;&gt;&quot;updateview&quot;&lt;/span&gt;, &lt;span class=&quot;s4&quot;&gt;&quot;left=&quot;&lt;/span&gt; + left + &lt;span class=&quot;s4&quot;&gt;&quot;; top=&quot;&lt;/span&gt; + top);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p5&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;@Override&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;boolean&lt;/span&gt; onInterceptTouchEvent(MotionEvent ev) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; onTouchEvent(ev);&lt;/div&gt;
&lt;div class=&quot;p7&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;return&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;false&lt;span class=&quot;s7&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; String urlMaker(String url) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; ((url.substring(0, 7).equalsIgnoreCase(&lt;span class=&quot;s4&quot;&gt;&quot;http://&quot;&lt;/span&gt;)) || (url.substring(0, 8).equalsIgnoreCase(&lt;span class=&quot;s4&quot;&gt;&quot;https://&quot;&lt;/span&gt;)))&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;return&lt;/span&gt; url;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;else&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s4&quot;&gt;&quot;http://&quot;&lt;/span&gt; + url;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;// the filter function makes sure that there all elements are having unique&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;// Text field:&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; List&amp;lt;Tag&amp;gt; Filter(List&amp;lt;Tag&amp;gt; tagList) {&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// current implementation is O(n^2) but since the number of tags are not&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// that many,&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// it is acceptable.&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;Tag&amp;gt; tempTagList = &lt;span class=&quot;s10&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;s8&quot;&gt; ArrayList()&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s8&quot;&gt;Iterator&lt;/span&gt; itr = tagList.iterator();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s8&quot;&gt;Iterator&lt;/span&gt; itrInternal;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tag tempTag1, tempTag2;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// for all elements of TagList&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;while&lt;/span&gt; (itr.hasNext()) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tempTag1 = (Tag) (itr.next());&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;boolean&lt;/span&gt; found = &lt;span class=&quot;s1&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// go over all elements of temoTagList&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; itrInternal = tempTagList.iterator();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;while&lt;/span&gt; (itrInternal.hasNext()) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tempTag2 = (Tag) (itrInternal.next());&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (tempTag2.getText().equalsIgnoreCase(tempTag1.getText())) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; found = &lt;span class=&quot;s1&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (found == &lt;span class=&quot;s1&quot;&gt;false&lt;/span&gt;)&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tempTagList.add(tempTag1);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;return&lt;/span&gt; tempTagList;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;// for handling the click on the tags&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;// &lt;span class=&quot;s8&quot;&gt;onclick&lt;/span&gt; open the tag &lt;span class=&quot;s8&quot;&gt;url&lt;/span&gt; in a new window. Back button will bring you back&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;// to TagCloud&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; OnClickListener OnTagClickListener(&lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt; String url) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; OnClickListener() {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s11&quot;&gt;@Override&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; onClick(&lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt; View v) {&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// we now have &lt;span class=&quot;s8&quot;&gt;url&lt;/span&gt; from main code&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s5&quot;&gt;/*&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &lt;span class=&quot;s8&quot;&gt;Uri&lt;/span&gt; &lt;span class=&quot;s8&quot;&gt;uri&lt;/span&gt; = Uri.parse(urlMaker(&lt;span class=&quot;s8&quot;&gt;url&lt;/span&gt;)); // just open a new intent&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; * and set the content to search for the // &lt;span class=&quot;s8&quot;&gt;url&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; * mContext.startActivity(new Intent(Intent.ACTION_VIEW, &lt;span class=&quot;s8&quot;&gt;uri&lt;/span&gt;));&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; */&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; saveInPreferences(&lt;span class=&quot;s4&quot;&gt;&quot;TagCloudView_x&quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;x&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; saveInPreferences(&lt;span class=&quot;s4&quot;&gt;&quot;TagCloudView_y&quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;y&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setScaleAnimation(v);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt; Tag tag = (Tag) v.getTag();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (v &lt;span class=&quot;s1&quot;&gt;instanceof&lt;/span&gt; TextView) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TextView textView = (TextView) v;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; textView.setTextColor(Color.&lt;span class=&quot;s2&quot;&gt;RED&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; textView.postDelayed(&lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; Runnable() {&lt;/div&gt;
&lt;div class=&quot;p1&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;span class=&quot;s11&quot;&gt;@Override&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&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;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; run() {&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&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; &lt;/span&gt;// &lt;span class=&quot;s9&quot;&gt;TODO&lt;/span&gt; Auto-generated method stub&lt;/div&gt;
&lt;div class=&quot;p1&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; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;s2&quot;&gt;onTagClickListener&lt;/span&gt; != &lt;span class=&quot;s1&quot;&gt;null&lt;/span&gt;) {&lt;/div&gt;
&lt;div class=&quot;p1&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; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;onTagClickListener&lt;/span&gt;.onTagClick(v, tag);&lt;/div&gt;
&lt;div class=&quot;p1&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; }&lt;/div&gt;
&lt;div class=&quot;p1&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;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }, 500);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p5&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;@Override&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; onDetachedFromWindow() {&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// &lt;span class=&quot;s9&quot;&gt;TODO&lt;/span&gt; Auto-generated method stub&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; saveInPreferences(&lt;span class=&quot;s4&quot;&gt;&quot;TagCloudView_x&quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;x&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; saveInPreferences(&lt;span class=&quot;s4&quot;&gt;&quot;TagCloudView_y&quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;y&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;super&lt;/span&gt;.onDetachedFromWindow();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; getFromPreferences(String name, &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; fDefault) {&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// &lt;span class=&quot;s9&quot;&gt;TODO&lt;/span&gt; Auto-generated method stub&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SharedPreferences selectPreferences = PreferenceManager.getDefaultSharedPreferences(&lt;span class=&quot;s2&quot;&gt;mContext&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;return&lt;/span&gt; selectPreferences.getFloat(name, fDefault);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; saveInPreferences(String name, &lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt; fData) {&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// &lt;span class=&quot;s9&quot;&gt;TODO&lt;/span&gt; Auto-generated method stub&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SharedPreferences selectPreferences = PreferenceManager.getDefaultSharedPreferences(&lt;span class=&quot;s2&quot;&gt;mContext&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SharedPreferences.Editor prefsEditor = selectPreferences.edit();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prefsEditor.putFloat(name, fData);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prefsEditor.commit();&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; OnTagClickListener &lt;span class=&quot;s2&quot;&gt;onTagClickListener&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; setOnTagClickListener(OnTagClickListener onTagClickListener) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;onTagClickListener&lt;/span&gt; = onTagClickListener;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;interface&lt;/span&gt; OnTagClickListener {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; onTagClick(View view, Tag tag);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;private&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;TOUCH_SCALE_FACTOR&lt;span class=&quot;s7&quot;&gt; = .8f;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;private&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s8&quot;&gt;TRACKBALL_SCALE_FACTOR&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; = 10;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p7&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;private&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;float&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;tspeed&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;private&lt;/span&gt; TagCloud &lt;span class=&quot;s2&quot;&gt;mTagCloud&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p7&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;private&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;float&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;mAngleX&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; = 0;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p7&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;private&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;float&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;mAngleY&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; = 0;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;private&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;centerX&lt;span class=&quot;s7&quot;&gt;, &lt;/span&gt;centerY&lt;span class=&quot;s7&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p7&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;private&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;float&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;radius&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;private&lt;/span&gt; Context &lt;span class=&quot;s2&quot;&gt;mContext&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;private&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s8&quot;&gt;textSizeMin&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;s8&quot;&gt;textSizeMax&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;private&lt;/span&gt; List&amp;lt;TextView&amp;gt; &lt;span class=&quot;s2&quot;&gt;mTextView&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;private&lt;/span&gt; List&amp;lt;LayoutParams&amp;gt; &lt;span class=&quot;s2&quot;&gt;mParams&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p7&quot;&gt;
&lt;span class=&quot;s7&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;private&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;int&lt;span class=&quot;s7&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;shiftLeft&lt;/span&gt;&lt;span class=&quot;s7&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;

















































































































































































































































































































































































































































































































































































































































































































&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
}&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Download Source code from &lt;a href=&quot;https://github.com/iamvijayakumar/TagCloudDemo_Android.git&quot; target=&quot;_blank&quot;&gt;Github&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&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;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;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/3109516114758729380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2015/09/android-tag-cloud-view-like-republic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/3109516114758729380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/3109516114758729380'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2015/09/android-tag-cloud-view-like-republic.html' title='Android Tag Cloud View Like Republic News'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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/AVvXsEjzoG05GABFl3MEzY9wlSPZQBLwAe3N5HiwW6Qw1jFU3MWrdrNqNCBXxArNPdLlzxcCUaeiTXxrrJZiczwNx5idKGdNJPtzytj4prwH2L-B0eC4XPifHAxzeXSIIZGK4Se5OX1qrpAtqN8/s72-c/ezgif.com-video-to-gif+%25281%2529.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3121772154556583723.post-272796251521122319</id><published>2015-08-04T15:52:00.000+05:30</published><updated>2015-08-17T13:23:15.439+05:30</updated><title type='text'>Android Horizontal Staggeredgridview  with PositiontoCenter</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This post about&amp;nbsp;Horizontal Staggeredgridview &amp;nbsp;with view to center position like pager.&lt;br /&gt;
&lt;br /&gt;
when i have &amp;nbsp;developed application . i have requirement like tile view with on swipe view should be center to position. &amp;nbsp;then i tried and found solution.&lt;br /&gt;
&lt;br /&gt;
See the below screen output will be like this.&lt;br /&gt;
&lt;br /&gt;
Output&lt;br /&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/AVvXsEjiBZq4XXzrba9W3gNey6Oc0ci4lPmdpE3rYywKSn9a5d4YfXahZqCQh4Iq_R_whNxYNitutB8XVm41x3zAdUK_CQxo7nXOBDmDcXNVSo4q9v6op8lm-sAFLIgdo2c4-R6N3YQ5e9S8hfo/s1600/ezgif.com-crop+%25281%2529.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiBZq4XXzrba9W3gNey6Oc0ci4lPmdpE3rYywKSn9a5d4YfXahZqCQh4Iq_R_whNxYNitutB8XVm41x3zAdUK_CQxo7nXOBDmDcXNVSo4q9v6op8lm-sAFLIgdo2c4-R6N3YQ5e9S8hfo/s320/ezgif.com-crop+%25281%2529.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
For this one i have used libray called lucasr &lt;a href=&quot;https://github.com/lucasr/twoway-view/%C2%A0&quot; target=&quot;_blank&quot;&gt;https://github.com/lucasr/twoway-view/&amp;nbsp;&lt;/a&gt;&amp;nbsp; and modified as per as my requirement.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Activity Code&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;div style=&quot;background: #F2F2F2; border: solid windowtext 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 1.0pt 1.0pt 1.0pt;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;package&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;inf.vj.twowaystaggeredgridviewviewcenterposition&lt;/u&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; java.util.ArrayList;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;org.lucasr&lt;/u&gt;.twowayview.widget.DividerItemDecoration;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;org.lucasr&lt;/u&gt;.twowayview.widget.TwoWayView;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;com.squareup&lt;/u&gt;.picasso.Picasso;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.annotation.SuppressLint;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.app.Activity;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.graphics.drawable.Drawable;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; android.os.Bundle;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;android.support.v7.widget.RecyclerView&lt;/u&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.widget.AbsListView.OnScrollListener;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;class&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;MainActivity&lt;/u&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;extends&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; Activity {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;TwoWayView&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;mRecyclerView&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;ArrayList&amp;lt;&lt;u&gt;NewsStructure&lt;/u&gt;&amp;gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;newsArrayLst&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; ArrayList&amp;lt;&lt;u&gt;NewsStructure&lt;/u&gt;&amp;gt;();&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;String[] &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;strImageUrl&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; = {&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;http://www.hdwallpapersos.com/wp-content/uploads/2014/08/Nature-HD-Wallpaper-1080p.jpg&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQJfVFBg3wTps8lucZi1RJ_sDrNDlsWUn5v_CP3dTI-eWlqnedn&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSnrFdFpG_70zp8RFPkuM7myrc6xkIVKS8aubXAvo_t3unbWuiJ&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSuTV9Y9xYVvd0DHO7-gHht6O8tc343B5pa9kQnXMQbeyfQvwQF&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcS5iTL5GeVCo2hlfCl9h1c8fBW7bF-2ZQ7hAuo6aNGzgpZgfELW&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQJfVFBg3wTps8lucZi1RJ_sDrNDlsWUn5v_CP3dTI-eWlqnedn&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;http://www.hdwallpapersos.com/wp-content/uploads/2014/08/Nature-HD-Wallpaper-1080p.jpg&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSnrFdFpG_70zp8RFPkuM7myrc6xkIVKS8aubXAvo_t3unbWuiJ&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSuTV9Y9xYVvd0DHO7-gHht6O8tc343B5pa9kQnXMQbeyfQvwQF&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcS5iTL5GeVCo2hlfCl9h1c8fBW7bF-2ZQ7hAuo6aNGzgpZgfELW&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;};&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #646464; font-family: Consolas; font-size: 10.0pt;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;protected&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; onCreate(Bundle
savedInstanceState) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;super&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.onCreate(savedInstanceState);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setContentView(&lt;u&gt;R&lt;/u&gt;.layout.activity_main);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;u&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;mRecyclerView&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; = (&lt;u&gt;TwoWayView&lt;/u&gt;)
findViewById(&lt;u&gt;R&lt;/u&gt;.id.list);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;u&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;mRecyclerView&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.setHasFixedSize(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;true&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;u&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;mRecyclerView&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.setLongClickable(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;false&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;u&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;mRecyclerView&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.setOrientation(&lt;u&gt;org.lucasr&lt;/u&gt;.twowayview.TwoWayLayoutManager.Orientation.HORIZONTAL);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;for&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; i =0; i&amp;lt; 10; i++){&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u&gt;NewsStructure&lt;/u&gt; newsStr = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;NewsStructure&lt;/u&gt;();&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newsStr.setmId(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;strImageUrl&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;[i]);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;u&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;newsArrayLst&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.add(newsStr);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; Drawable divider =
getResources().getDrawable(&lt;u&gt;R&lt;/u&gt;.drawable.divider);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;u&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;mRecyclerView&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.addItemDecoration(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;DividerItemDecoration&lt;/u&gt;(divider));&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u&gt;ItemAdapter&lt;/u&gt; mAdapter = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;ItemAdapter&lt;/u&gt;(MainActivity.&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;this&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;, &lt;/span&gt;&lt;u&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;mRecyclerView&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;, &lt;u&gt;R&lt;/u&gt;.layout.activity_main,
&lt;/span&gt;&lt;u&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;newsArrayLst&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;u&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;mRecyclerView&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.setAdapter(mAdapter);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;u&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;mRecyclerView&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.setOnScrollListener(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;RecyclerView&lt;/u&gt;.OnScrollListener()
{&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&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 style=&quot;color: #646464; font-family: Consolas; font-size: 10.0pt;&quot;&gt;@SuppressLint&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;NewApi&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: #646464; font-family: Consolas; font-size: 10.0pt;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&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;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
onScrollStateChanged(&lt;u&gt;RecyclerView&lt;/u&gt; recyclerView, &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; scrollState) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&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;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;boolean&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; pauseOnScroll = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;false&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;// or true&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;boolean&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; pauseOnFling = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;false&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;// or false&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;Picasso&lt;/u&gt; picasso = &lt;u&gt;Picasso&lt;/u&gt;.with(MainActivity.&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;this&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&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;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;switch&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; (scrollState) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;case&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; OnScrollListener.&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;SCROLL_STATE_IDLE&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;picasso.resumeTag(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;mylist&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;break&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;case&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; OnScrollListener.&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;SCROLL_STATE_TOUCH_SCROLL&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; (pauseOnScroll) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;picasso.pauseTag(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;mylist&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;break&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;case&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; OnScrollListener.&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;SCROLL_STATE_FLING&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; (pauseOnFling) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;picasso.pauseTag(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;mylist&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;break&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&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 style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&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 style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&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 style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&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 style=&quot;color: #646464; font-family: Consolas; font-size: 10.0pt;&quot;&gt;@SuppressLint&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;NewApi&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: #646464; font-family: Consolas; font-size: 10.0pt;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&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;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; onScrolled(&lt;u&gt;RecyclerView&lt;/u&gt;
recyclerView, &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; i, &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; i2) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&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 style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&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 style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;Adapter&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;div style=&quot;background: #F2F2F2; border: solid windowtext 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 1.0pt 1.0pt 1.0pt;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;package&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
inf.vj.twowaystaggeredgridviewviewcenterposition;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;/*&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;* Copyright (C) 2014 &lt;u&gt;Lucas&lt;/u&gt; &lt;u&gt;Rocha&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;*&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;* Licensed under the &lt;u&gt;Apache&lt;/u&gt; License,
Version 2.0 (the &quot;License&quot;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;* you may not use this file except in
compliance with the License.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;* You may obtain a copy of the License at&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;*&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
http://www.apache.org/licenses/LICENSE-2.0&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;*&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;* Unless required by applicable law or agreed
to in writing, software&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;* distributed under the License is distributed
on an &quot;AS IS&quot; BASIS,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;* WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;* See the License for the specific language
governing permissions and&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;* limitations under the License.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.content.Context;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.graphics.Bitmap;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.graphics.Typeface;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;android.support.v7.widget.RecyclerView&lt;/u&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; android.util.Log;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.view.LayoutInflater;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; android.view.View;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.view.ViewGroup;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.widget.ImageView;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.widget.TextView;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;org.lucasr&lt;/u&gt;.twowayview.TwoWayLayoutManager;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;org.lucasr&lt;/u&gt;.twowayview.widget.TwoWayView;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;org.lucasr&lt;/u&gt;.twowayview.widget.SpannableGridLayoutManager;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;org.lucasr&lt;/u&gt;.twowayview.widget.StaggeredGridLayoutManager;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;com.squareup&lt;/u&gt;.picasso.Picasso;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; java.util.ArrayList;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; java.util.List;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;class&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;ItemAdapter&lt;/u&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;extends&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;RecyclerView&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.Adapter&amp;lt;ItemAdapter.SimpleViewHolder&amp;gt;
{&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;private&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; Context mContext;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;private&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; mLayoutId;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;ArrayList&amp;lt;NewsStructure&amp;gt;
newsArrayLst = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; ArrayList&amp;lt;NewsStructure&amp;gt;();&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; Typeface typeFace;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;String imageUrl = &lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;class&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; SimpleViewHolder &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;extends&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;RecyclerView&lt;/u&gt;.ViewHolder
{&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; ImageView imageView;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
SimpleViewHolder(View view) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;super&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;(view);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;imageView =
(ImageView) view.findViewById(&lt;u&gt;R&lt;/u&gt;.id.newsTileImage);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; ItemAdapter(Context
context, &lt;u&gt;TwoWayView&lt;/u&gt; recyclerView, &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; layoutId,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;ArrayList&amp;lt;NewsStructure&amp;gt;
newsAry) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;mContext = context;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;newsArrayLst =
newsAry;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;mLayoutId = layoutId;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #646464; font-family: Consolas; font-size: 10.0pt;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;Override&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; SimpleViewHolder &lt;u&gt;onCreateViewHolder(ViewGroup
parent, &lt;/u&gt;&lt;/span&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; viewType)&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; View view =
LayoutInflater.from(mContext).inflate(&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;R&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.layout.news_feed_item_en,
parent, &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;false&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
SimpleViewHolder(view);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #646464; font-family: Consolas; font-size: 10.0pt;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;SuppressWarnings(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;deprecation&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #646464; font-family: Consolas; font-size: 10.0pt;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;Override&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;onBindViewHolder(SimpleViewHolder
holder, &lt;/u&gt;&lt;/span&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; position)&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; View itemView =
holder.&lt;u&gt;itemView&lt;/u&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; itemId = position;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; (mLayoutId == &lt;u&gt;R&lt;/u&gt;.layout.activity_main)
{&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; dimenId;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; span;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; (itemId % 3 == 0) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;imageUrl =
newsArrayLst.get(position).getmId();&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;span = 2;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;Picasso&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.with(mContext).load(imageUrl)&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.placeholder(&lt;u&gt;R&lt;/u&gt;.drawable.ic_launcher).noFade()&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.tag(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;mylist&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;).into(holder.imageView);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;} &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;imageUrl =&amp;nbsp; newsArrayLst.get(position).getmId();;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;span = 1;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;Picasso&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.with(mContext).load(imageUrl)&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.placeholder(&lt;u&gt;R&lt;/u&gt;.drawable.ic_launcher).noFade()&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.tag(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&quot;mylist&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;).into(holder.imageView);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;dimenId = &lt;u&gt;R&lt;/u&gt;.dimen.staggered_child_medium;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; size =
mContext.getResources().getDimensionPixelSize(&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;dimenId);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;StaggeredGridLayoutManager&lt;/u&gt;.LayoutParams
lp = (&lt;u&gt;StaggeredGridLayoutManager&lt;/u&gt;.LayoutParams) itemView&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.getLayoutParams();&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;lp.span = span;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;lp.width = size;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;itemView.setLayoutParams(lp);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #646464; font-family: Consolas; font-size: 10.0pt;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;Override&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;u&gt;getItemCount()&lt;/u&gt;
{&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; newsArrayLst.size();&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;NewsStructure.class&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;NewsStructure.&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10pt;&quot;&gt;class&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10pt;&quot;&gt;package&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;u&gt;inf.vj.twowaystaggeredgridviewviewcenterposition&lt;/u&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10pt;&quot;&gt;class&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;u&gt;NewsStructure&lt;/u&gt;&amp;nbsp;{&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;String mId =&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;String getmId() {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;mId;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;setmId(String mId) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10pt;&quot;&gt;this&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.mId = mId;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
XML&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;activity_main.xml&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;div style=&quot;background: #F2F2F2; border: solid windowtext 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;xml&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt; &lt;span style=&quot;color: #7f007f;&quot;&gt;version&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;/i&gt;
&lt;span style=&quot;color: #7f007f;&quot;&gt;encoding&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: teal;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;LinearLayout&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt; &lt;span style=&quot;color: #7f007f;&quot;&gt;xmlns:android&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;xmlns:app&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:layout_width&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:layout_height&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:orientation&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;vertical&quot;&lt;/span&gt;&lt;/i&gt;
&lt;span style=&quot;color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;RelativeLayout&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:layout_width&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:layout_height&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:layout_gravity&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;left&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:orientation&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;vertical&quot;&lt;/span&gt;&lt;/i&gt;
&lt;span style=&quot;color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;org.lucasr.twowayview.widget.TwoWayView&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:id&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;@+id/list&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;style&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;@style/TwoWayView&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:layout_width&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:layout_height&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:layout_gravity&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;left&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:background&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;#000000&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:visibility&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;visible&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;app:twowayview_layoutManager&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;StaggeredGridLayoutManager&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;app:twowayview_numColumns&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;2&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;app:twowayview_numRows&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;2&quot;&lt;/span&gt;&lt;/i&gt;
&lt;span style=&quot;color: teal;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;RelativeLayout&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt; line-height: 115%;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt; line-height: 115%;&quot;&gt;LinearLayout&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt; line-height: 115%;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;news_feed_item_en.xml&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;div style=&quot;background: #F2F2F2; border: solid windowtext 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;xml&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt; &lt;span style=&quot;color: #7f007f;&quot;&gt;version&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;/i&gt;
&lt;span style=&quot;color: #7f007f;&quot;&gt;encoding&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: teal;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f5fbf; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f5fbf; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp; Copyright (C) 2012 Lucas Rocha&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f5fbf; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp; Licensed under the Apache License, Version
2.0 (the &quot;License&quot;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f5fbf; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp; you may not use this file except in
compliance with the License.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f5fbf; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp; You may obtain a copy of the License at&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f5fbf; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
http://www.apache.org/licenses/LICENSE-2.0&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f5fbf; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp; Unless required by applicable law or agreed
to in writing, software&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f5fbf; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp; distributed under the License is distributed
on an &quot;AS IS&quot; BASIS,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f5fbf; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp; WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f5fbf; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp; See the License for the specific language
governing permissions and&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f5fbf; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp; limitations under the License.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: #3f5fbf; font-family: Consolas; font-size: 10.0pt;&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;RelativeLayout&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;xmlns:android&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;
&lt;span style=&quot;color: #7f007f;&quot;&gt;android:layout_width&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:layout_height&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;ImageView&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; 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;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:id&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;@+id/newsTileImage&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:layout_width&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:layout_height&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:src&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;@drawable/ic_launcher&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:gravity&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;center&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:scaleType&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;centerCrop&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: teal;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin-bottom: 0.0001pt; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; padding: 0in;&quot;&gt;
&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt; line-height: 115%;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt; line-height: 115%;&quot;&gt;RelativeLayout&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt; line-height: 115%;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;a href=&quot;https://github.com/iamvijayakumar/Horizontal-Staggeredgridview-Android/tree/master/TwoWayStaggeredGridViewViewCenterPosition&quot; target=&quot;_blank&quot;&gt;Download Source code&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/272796251521122319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2015/07/android-horizontal-staggeredgridview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/272796251521122319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/272796251521122319'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2015/07/android-horizontal-staggeredgridview.html' title='Android Horizontal Staggeredgridview  with PositiontoCenter'/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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/AVvXsEjiBZq4XXzrba9W3gNey6Oc0ci4lPmdpE3rYywKSn9a5d4YfXahZqCQh4Iq_R_whNxYNitutB8XVm41x3zAdUK_CQxo7nXOBDmDcXNVSo4q9v6op8lm-sAFLIgdo2c4-R6N3YQ5e9S8hfo/s72-c/ezgif.com-crop+%25281%2529.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3121772154556583723.post-6977514265030278375</id><published>2015-07-22T13:22:00.000+05:30</published><updated>2015-08-17T13:22:59.291+05:30</updated><title type='text'>Android Customize Intent Share </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Android Customize Intent Share&lt;br /&gt;
&lt;br /&gt;
This post about how to &amp;nbsp;share the data from particular application like : whatsapp m facebook , twitter , gmail etc..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;b&gt;Share Intent via GMAIL&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Intent shareIntent = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; Intent(android.content.Intent.&lt;span class=&quot;s2&quot;&gt;ACTION_SEND&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; shareIntent.setType(&lt;span class=&quot;s3&quot;&gt;&quot;text/plain&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; shareIntent.putExtra(android.content.Intent.&lt;span class=&quot;s2&quot;&gt;EXTRA_SUBJECT&lt;/span&gt;, Html.fromHtml(&lt;span class=&quot;s2&quot;&gt;shareTitle&lt;/span&gt;)&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;.toString());&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; shareIntent.putExtra(android.content.Intent.&lt;span class=&quot;s2&quot;&gt;EXTRA_TEXT&lt;/span&gt;, Html.fromHtml(&lt;span class=&quot;s2&quot;&gt;shareContent&lt;/span&gt;)&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;.toString());&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; shareIntent.putExtra(Intent.&lt;span class=&quot;s2&quot;&gt;EXTRA_STREAM&lt;/span&gt;,&amp;nbsp; Uri.fromFile(&lt;span class=&quot;s2&quot;&gt;file&lt;/span&gt;));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; PackageManager pm = &lt;span class=&quot;s2&quot;&gt;mContext&lt;/span&gt;.getPackageManager();&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; List&amp;lt;ResolveInfo&amp;gt; activityList = pm.queryIntentActivities(shareIntent, 0);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt; ResolveInfo app : activityList)&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; ((app.&lt;span class=&quot;s2&quot;&gt;activityInfo&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;name&lt;/span&gt;).contains(&lt;span class=&quot;s3&quot;&gt;&quot;android.gm&quot;&lt;/span&gt;))&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt; ActivityInfo activity = app.&lt;span class=&quot;s2&quot;&gt;activityInfo&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt; ComponentName name = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; ComponentName(activity.&lt;span class=&quot;s2&quot;&gt;applicationInfo&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;packageName&lt;/span&gt;, activity.&lt;span class=&quot;s2&quot;&gt;name&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shareIntent.addCategory(Intent.&lt;span class=&quot;s2&quot;&gt;CATEGORY_LAUNCHER&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s4&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shareIntent.setFlags(Intent.&lt;/span&gt;FLAG_ACTIVITY_NEW_TASK&lt;span class=&quot;s4&quot;&gt; | Intent.&lt;/span&gt;FLAG_ACTIVITY_RESET_TASK_IF_NEEDED&lt;span class=&quot;s4&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shareIntent.setComponent(name);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mContext&lt;/span&gt;.startActivity(shareIntent);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Share Intent Via TWITTER&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; Intent shareIntent = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; Intent(android.content.Intent.&lt;span class=&quot;s2&quot;&gt;ACTION_SEND&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; shareIntent.setType(&lt;span class=&quot;s3&quot;&gt;&quot;text/plain&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; shareIntent.putExtra(android.content.Intent.&lt;span class=&quot;s2&quot;&gt;EXTRA_SUBJECT&lt;/span&gt;, Html.fromHtml(&lt;span class=&quot;s2&quot;&gt;shareTitle&lt;/span&gt;)&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;.toString());&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; shareIntent.putExtra(android.content.Intent.&lt;span class=&quot;s2&quot;&gt;EXTRA_TEXT&lt;/span&gt;, Html.fromHtml(&lt;span class=&quot;s2&quot;&gt;shareContent&lt;/span&gt;)&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;.toString());&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; shareIntent.putExtra(Intent.&lt;span class=&quot;s2&quot;&gt;EXTRA_STREAM&lt;/span&gt;,&amp;nbsp; Uri.fromFile(&lt;span class=&quot;s2&quot;&gt;file&lt;/span&gt;));&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; PackageManager pm = &lt;span class=&quot;s2&quot;&gt;mContext&lt;/span&gt;.getPackageManager();&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; List&amp;lt;ResolveInfo&amp;gt; activityList = pm.queryIntentActivities(shareIntent, 0);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt; ResolveInfo app : activityList)&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s4&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt; (&lt;/span&gt;&quot;com.twitter.android.PostActivity&quot;&lt;span class=&quot;s4&quot;&gt;.equals(app.&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;activityInfo&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;))&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt; ActivityInfo activity = app.&lt;span class=&quot;s2&quot;&gt;activityInfo&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt; ComponentName name = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; ComponentName(activity.&lt;span class=&quot;s2&quot;&gt;applicationInfo&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;packageName&lt;/span&gt;, activity.&lt;span class=&quot;s2&quot;&gt;name&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shareIntent.addCategory(Intent.&lt;span class=&quot;s2&quot;&gt;CATEGORY_LAUNCHER&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shareIntent.setFlags(Intent.&lt;span class=&quot;s2&quot;&gt;FLAG_ACTIVITY_NEW_TASK&lt;/span&gt; | Intent.&lt;span class=&quot;s2&quot;&gt;FLAG_ACTIVITY_RESET_TASK_IF_NEEDED&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shareIntent.setComponent(name);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mContext&lt;/span&gt;.startActivity(shareIntent);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;






























&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Share Intent Via Facebook&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Intent shareIntent = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; Intent(android.content.Intent.&lt;span class=&quot;s2&quot;&gt;ACTION_SEND&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; shareIntent.setType(&lt;span class=&quot;s3&quot;&gt;&quot;text/plain&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; shareIntent.putExtra(android.content.Intent.&lt;span class=&quot;s2&quot;&gt;EXTRA_SUBJECT&lt;/span&gt;, Html.fromHtml(&lt;span class=&quot;s2&quot;&gt;shareTitle&lt;/span&gt;)&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;.toString());&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; shareIntent.putExtra(android.content.Intent.&lt;span class=&quot;s2&quot;&gt;EXTRA_TEXT&lt;/span&gt;, Html.fromHtml(&lt;span class=&quot;s2&quot;&gt;shareContent&lt;/span&gt;)&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;.toString());&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; shareIntent.putExtra(Intent.&lt;span class=&quot;s2&quot;&gt;EXTRA_STREAM&lt;/span&gt;,&amp;nbsp; Uri.fromFile(&lt;span class=&quot;s2&quot;&gt;file&lt;/span&gt;));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; PackageManager pm = &lt;span class=&quot;s2&quot;&gt;mContext&lt;/span&gt;.getPackageManager();&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; List&amp;lt;ResolveInfo&amp;gt; activityList = pm.queryIntentActivities(shareIntent, 0);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt; ResolveInfo app : activityList)&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; ((app.&lt;span class=&quot;s2&quot;&gt;activityInfo&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;name&lt;/span&gt;).contains(&lt;span class=&quot;s3&quot;&gt;&quot;facebook&quot;&lt;/span&gt;))&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt; ActivityInfo activity = app.&lt;span class=&quot;s2&quot;&gt;activityInfo&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt; ComponentName name = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; ComponentName(activity.&lt;span class=&quot;s2&quot;&gt;applicationInfo&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;packageName&lt;/span&gt;, activity.&lt;span class=&quot;s2&quot;&gt;name&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shareIntent.addCategory(Intent.&lt;span class=&quot;s2&quot;&gt;CATEGORY_LAUNCHER&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s4&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shareIntent.setFlags(Intent.&lt;/span&gt;FLAG_ACTIVITY_NEW_TASK&lt;span class=&quot;s4&quot;&gt; | Intent.&lt;/span&gt;FLAG_ACTIVITY_RESET_TASK_IF_NEEDED&lt;span class=&quot;s4&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shareIntent.setComponent(name);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;mContext&lt;/span&gt;.startActivity(shareIntent);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
































&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Share Intent Via WhatsApp&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Intent shareIntent = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; Intent(android.content.Intent.&lt;span class=&quot;s2&quot;&gt;ACTION_SEND&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;shareIntent.setType(&lt;span class=&quot;s3&quot;&gt;&quot;text/html&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; shareIntent.putExtra(android.content.Intent.&lt;span class=&quot;s2&quot;&gt;EXTRA_SUBJECT&lt;/span&gt;, Html.fromHtml(&lt;span class=&quot;s2&quot;&gt;shareTitle&lt;/span&gt;)&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;.toString());&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; shareIntent.putExtra(android.content.Intent.&lt;span class=&quot;s2&quot;&gt;EXTRA_TEXT&lt;/span&gt;, Html.fromHtml(&lt;span class=&quot;s2&quot;&gt;shareContent&lt;/span&gt;)&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;.toString());&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; shareIntent.putExtra(Intent.&lt;span class=&quot;s2&quot;&gt;EXTRA_STREAM&lt;/span&gt;,&amp;nbsp; Uri.fromFile(&lt;span class=&quot;s2&quot;&gt;file&lt;/span&gt;));&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;PackageManager pm = &lt;span class=&quot;s2&quot;&gt;mContext&lt;/span&gt;.getPackageManager();&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;List&amp;lt;ResolveInfo&amp;gt; activityList = pm.queryIntentActivities(shareIntent, 0);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;s1&quot;&gt;final&lt;/span&gt; ResolveInfo app : activityList) {&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; ((app.&lt;span class=&quot;s2&quot;&gt;activityInfo&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;name&lt;/span&gt;).contains(&lt;span class=&quot;s3&quot;&gt;&quot;com.whatsapp&quot;&lt;/span&gt;)) {&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&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 class=&quot;s1&quot;&gt;final&lt;/span&gt; ActivityInfo activity = app.&lt;span class=&quot;s2&quot;&gt;activityInfo&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&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 class=&quot;s1&quot;&gt;final&lt;/span&gt; ComponentName name = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; ComponentName(&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&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; activity.&lt;span class=&quot;s2&quot;&gt;applicationInfo&lt;/span&gt;.&lt;span class=&quot;s2&quot;&gt;packageName&lt;/span&gt;, activity.&lt;span class=&quot;s2&quot;&gt;name&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&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; shareIntent.addCategory(Intent.&lt;span class=&quot;s2&quot;&gt;CATEGORY_LAUNCHER&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&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; shareIntent.setFlags(Intent.&lt;span class=&quot;s2&quot;&gt;FLAG_ACTIVITY_NEW_TASK&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&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; | Intent.&lt;span class=&quot;s2&quot;&gt;FLAG_ACTIVITY_RESET_TASK_IF_NEEDED&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&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; shareIntent.setComponent(name);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&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; &lt;span class=&quot;s2&quot;&gt;mContext&lt;/span&gt;.startActivity(shareIntent);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&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; &lt;span class=&quot;s1&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&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;/div&gt;
&lt;div class=&quot;p2&quot;&gt;































&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iamvijayakumar.blogspot.com/feeds/6977514265030278375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iamvijayakumar.blogspot.com/2015/07/android-customize-intent-share.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/6977514265030278375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3121772154556583723/posts/default/6977514265030278375'/><link rel='alternate' type='text/html' href='http://iamvijayakumar.blogspot.com/2015/07/android-customize-intent-share.html' title='Android Customize Intent Share '/><author><name>VIJAYAKUMAR M</name><uri>http://www.blogger.com/profile/05399165223474626566</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></feed>