tag:blogger.com,1999:blog-66189382274404904972024-03-13T11:36:00.825-07:00Android DeveloperNovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.comBlogger32125tag:blogger.com,1999:blog-6618938227440490497.post-58083211696934336502013-05-13T07:00:00.000-07:002014-07-10T01:16:44.213-07:00Call web services easily<div dir="ltr" style="text-align: left;" trbidi="on">get source code from here,<br /><br /><a href="https://docs.google.com/file/d/0BwmiUPcxUHHlSUpMN29yLWNmLTQ/edit?usp=sharing">Download</a></div>NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com9tag:blogger.com,1999:blog-6618938227440490497.post-74314735911968261312013-05-07T20:34:00.002-07:002013-05-07T20:34:58.881-07:00View Flipper in android example
<br />
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #222222;"><span style="font-family: Roboto, sans-serif;"><span style="font-size: x-small;">Simple
</span></span></span><code class="western"><a href="http://developer.android.com/reference/android/widget/ViewAnimator.html"><span style="color: #258aaf;"><span style="text-decoration: none;"><span style="font-family: monospace;"><span style="font-size: x-small;">ViewAnimator</span></span></span></span></a></code><code class="western"><span style="color: #222222;"><span style="font-family: monospace;"><span style="font-size: x-small;">
</span></span></span></code><span style="color: #222222;"><span style="font-family: Roboto, sans-serif;"><span style="font-size: x-small;">that
will animate between two or more views that have been added to it.
Only one child is shown at a time. If requested, can automatically
flip between each child at a regular interval.</span></span></span>
</div>
<div align="LEFT">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">The
ViewFlipper is a nifty widget that can be used to slide views in and
out of the user’s current view port. At times I find it a handy UI
replacement for the tab widget (</span></span></span><a href="http://www.techrepublic.com/blog/app-builder/android-tabs-hurt-my-head/523" target="_blank"><span style="color: #003399;"><span style="text-decoration: none;"><span style="font-family: inherit;"><span style="font-size: x-small;">which
I’ve stated before I’m not overly fond of</span></span></span></span></a><span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">).
What I like most about the ViewFlipper is the slick user experience.
It’s the same sort of effect that is prevalent on </span></span></span><a href="http://www.microsoft.com/windowsphone/en-gb/"><span style="color: #003399;"><span style="text-decoration: none;"><span style="font-family: inherit;"><span style="font-size: x-small;">Windows
Phone 7</span></span></span></span></a><span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">,
and was used by Google to jazz up the latest incarnation of the
</span></span></span><a href="https://market.android.com/?hl=en" target="_blank"><span style="color: #003399;"><span style="text-decoration: none;"><span style="font-family: inherit;"><span style="font-size: x-small;">Android
Market</span></span></span></span></a><span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">.</span></span></span></div>
<div style="border: none; line-height: 0.5cm; margin-bottom: 0cm; padding: 0cm;">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">Despite
the widget only recently gaining popularity on Android, it’s been
around since version 1.0 of the API. (</span></span></span><a href="http://developer.android.com/reference/android/widget/ViewFlipper.html" target="_blank"><span style="color: #003399;"><span style="text-decoration: none;"><span style="font-family: inherit;"><span style="font-size: x-small;">Read
the official ViewFlipper documentation.</span></span></span></span></a><span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">)
However, I don’t think the developer documentation makes it
immediately obvious how to use the widget in your applications. In
particular, puzzling through the sliding in and out animation
transitions can be a little tough. Maybe not as tough as ignoring the
candy bowl sitting on my kitchen counter, assuring me no one will
notice if I take just one more Laffy Taffy, but still, it requires
you to put on your thinking cap. If you’d like to download and
import the entire project detailed in this tutorial, you can do so
</span></span></span><a href="http://i.techrepublic.com.com/downloads/Weilage/flipper.zip" target="_blank"><span style="color: #003399;"><span style="text-decoration: none;"><span style="font-family: inherit;"><span style="font-size: x-small;">here</span></span></span></span></a><span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">.</span></span></span></div>
<div style="border: none; line-height: 0.5cm; margin-bottom: 0cm; padding: 0cm;">
<br />
</div>
<div style="border: none; line-height: 0.5cm; margin-bottom: 0cm; padding: 0cm;">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">activity_main.xml</span></span></span></div>
<div style="border: none; line-height: 0.5cm; margin-bottom: 0cm; padding: 0cm;">
<br />
</div>
<div style="border: none; line-height: 0.5cm; margin-bottom: 0cm; padding: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><?</span><span style="color: #3f7f7f;">xml</span><span style="color: #37414b;">
</span><span style="color: #7f007f;">version</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"1.0"</i></span><span style="color: #37414b;">
</span><span style="color: #7f007f;">encoding</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"utf-8"</i></span><span style="color: teal;">?></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">LinearLayout</span>
<span style="color: #7f007f;">xmlns:android</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"http://schemas.android.com/apk/res/android"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"fill_parent"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"fill_parent"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:orientation</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"vertical"</i></span>
<span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">TextView</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"fill_parent"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:gravity</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"center"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;"><u>android:text</u></span><span style="color: black;"><u>=</u></span><span style="color: #2a00ff;"><i><u>"View
Flipper Demo"</u></i></span> <span style="color: teal;">/></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">ViewFlipper</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:id</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@+id/view_flipper"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"fill_parent"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"fill_parent"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_margin</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"6dip"</i></span>
<span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">LinearLayout</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"fill_parent"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"fill_parent"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:gravity</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"center"</i></span>
<span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">TextView</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;"><u>android:text</u></span><span style="color: black;"><u>=</u></span><span style="color: #2a00ff;"><i><u>"A
dog limps into a saloon and says..."</u></i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:textColor</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"#00ff00"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:textSize</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"14sp"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:textStyle</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"bold"</i></span>
<span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"></</span><span style="color: #3f7f7f;">TextView</span><span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"></</span><span style="color: #3f7f7f;">LinearLayout</span><span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">LinearLayout</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"fill_parent"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"fill_parent"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:gravity</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"center"</i></span>
<span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">TextView</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;"><u>android:text</u></span><span style="color: black;"><u>=</u></span><span style="color: #2a00ff;"><i><u>"I&apos;m
looking for the man who shot my paw!"</u></i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:textColor</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"#00ff00"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:textSize</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"14sp"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:textStyle</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"bold"</i></span>
<span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"></</span><span style="color: #3f7f7f;">TextView</span><span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"></</span><span style="color: #3f7f7f;">LinearLayout</span><span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"></</span><span style="color: #3f7f7f;">ViewFlipper</span><span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: teal;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"></</span></span></span><span style="color: #3f7f7f;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">LinearLayout</span></span></span><span style="color: teal;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">MainActivity.java</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">package
com.example.viewflipper;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">import
android.app.Activity;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">import
android.os.Bundle;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">import
android.view.Menu;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">import
android.view.MotionEvent;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">import
android.widget.ViewFlipper;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #37414b;"><span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: #7f0055;"><b>public</b></span><span style="color: black;">
</span><span style="color: #7f0055;"><b>class</b></span><span style="color: black;">
MainActivity </span><span style="color: #7f0055;"><b>extends</b></span><span style="color: black;">
Activity {</span></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>private</b></span><span style="color: black;">
</span><span style="color: black;"><u>ViewFlipper</u></span><span style="color: black;">
</span><span style="color: #0000c0;">vf</span><span style="color: black;">;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>private</b></span><span style="color: black;">
</span><span style="color: #7f0055;"><b>float</b></span><span style="color: black;">
</span><span style="color: #0000c0;">lastX</span><span style="color: black;">;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #3f5fbf;">/**
Called when the activity is first created. */</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #646464;">@Override</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>public</b></span><span style="color: black;">
</span><span style="color: #7f0055;"><b>void</b></span><span style="color: black;">
onCreate(Bundle savedInstanceState) {</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>super</b></span><span style="color: black;">.onCreate(savedInstanceState);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> setContentView(R.layout.</span><span style="color: #0000c0;"><i>activity_main</i></span><span style="color: black;">);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #0000c0;"><u>vf</u></span><span style="color: black;">
= (</span><span style="color: black;"><u>ViewFlipper</u></span><span style="color: black;">)
findViewById(R.id.</span><span style="color: black;"><u>view_flipper</u></span><span style="color: black;">);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Monospace;"><span style="font-size: x-small;"> }</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #646464;">@Override</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>public</b></span><span style="color: black;">
</span><span style="color: #7f0055;"><b>boolean</b></span><span style="color: black;">
onCreateOptionsMenu(</span><span style="color: black;"><u>Menu</u></span><span style="color: black;">
menu) {</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #3f7f5f;">//
Inflate the menu; this adds items to the action bar if it is present.</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Monospace;"><span style="font-size: x-small;"> getMenuInflater().inflate(R.<u>menu</u>.main,
menu);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>return</b></span><span style="color: black;">
</span><span style="color: #7f0055;"><b>true</b></span><span style="color: black;">;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Monospace;"><span style="font-size: x-small;"> }</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>public</b></span><span style="color: black;">
</span><span style="color: #7f0055;"><b>boolean</b></span><span style="color: black;">
onTouchEvent(</span><span style="color: black;"><u>MotionEvent</u></span><span style="color: black;">
touchevent) {</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>switch</b></span><span style="color: black;">
(touchevent.getAction()) {</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>case</b></span><span style="color: black;">
</span><span style="color: black;"><u>MotionEvent</u></span><span style="color: black;">.ACTION_DOWN:
{</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #0000c0;">lastX</span><span style="color: black;">
= touchevent.getX();</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>break</b></span><span style="color: black;">;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Monospace;"><span style="font-size: x-small;"> }</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>case</b></span><span style="color: black;">
</span><span style="color: black;"><u>MotionEvent</u></span><span style="color: black;">.ACTION_UP:
{</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>float</b></span><span style="color: black;">
currentX = touchevent.getX();</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>if</b></span><span style="color: black;">
(</span><span style="color: #0000c0;">lastX</span><span style="color: black;"> <
currentX) {</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>if</b></span><span style="color: black;">
(</span><span style="color: #0000c0;"><u>vf</u></span><span style="color: black;">.getDisplayedChild()
== 0)</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>break</b></span><span style="color: black;">;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #0000c0;"><u>vf</u></span><span style="color: black;">.setInAnimation(</span><span style="color: #7f0055;"><b>this</b></span><span style="color: black;">,
R.</span><span style="color: black;"><u>anim</u></span><span style="color: black;">.in_from_left);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #0000c0;"><u>vf</u></span><span style="color: black;">.setOutAnimation(</span><span style="color: #7f0055;"><b>this</b></span><span style="color: black;">,
R.</span><span style="color: black;"><u>anim</u></span><span style="color: black;">.out_to_right);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Monospace;"><span style="font-size: x-small;"> </span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #0000c0;"><u>vf</u></span><span style="color: black;">.showNext();</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Monospace;"><span style="font-size: x-small;"> }</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>if</b></span><span style="color: black;">
(</span><span style="color: #0000c0;">lastX</span><span style="color: black;"> >
currentX) {</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>if</b></span><span style="color: black;">
(</span><span style="color: #0000c0;"><u>vf</u></span><span style="color: black;">.getDisplayedChild()
== 1)</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>break</b></span><span style="color: black;">;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #0000c0;"><u>vf</u></span><span style="color: black;">.setInAnimation(</span><span style="color: #7f0055;"><b>this</b></span><span style="color: black;">,
R.</span><span style="color: black;"><u>anim</u></span><span style="color: black;">.in_from_right);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #0000c0;"><u>vf</u></span><span style="color: black;">.setOutAnimation(</span><span style="color: #7f0055;"><b>this</b></span><span style="color: black;">,
R.</span><span style="color: black;"><u>anim</u></span><span style="color: black;">.out_to_left);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #0000c0;"><u>vf</u></span><span style="color: black;">.showPrevious();</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Monospace;"><span style="font-size: x-small;"> }</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>break</b></span><span style="color: black;">;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Monospace;"><span style="font-size: x-small;"> }</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Monospace;"><span style="font-size: x-small;"> }</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>return</b></span><span style="color: black;">
</span><span style="color: #7f0055;"><b>false</b></span><span style="color: black;">;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Monospace;"><span style="font-size: x-small;"> }</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Monospace;"><span style="font-size: x-small;"> }</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">and
Two another animation file;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;"><br />to
create that file first you need to create a new folder into /res
named animation and into that you need to create xml files.</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">in_from_left.xml</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">set</span><span style="color: #37414b;">
</span><span style="color: #7f007f;">xmlns:android</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"http://schemas.android.com/apk/res/android"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:shareInterpolator</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"false"</i></span>
<span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #3f5fbf;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><!--
</span></span></span>
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #3f5fbf;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><translate</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #3f5fbf;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">android:duration="1400"</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #3f5fbf;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">android:fromXDelta="-100%"</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #3f5fbf;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">android:fromYDelta="0%"</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #3f5fbf;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">android:toXDelta="0%"</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #3f5fbf;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">android:toYDelta="0%"
/> --></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #3f5fbf;"><!--
<scale android:duration="100"</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #3f5fbf;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">android:fromXScale="100%"</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #3f5fbf;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">android:fromYScale="0%"</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #3f5fbf;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">android:repeatMode="reverse"/></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #3f5fbf;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">--></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">rotate</span>
<span style="color: #7f007f;">android:fromDegrees</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"5"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:toDegrees</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"50"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:duration</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"5000"</i></span><span style="color: teal;">/></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: teal;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"></</span></span></span><span style="color: #3f7f7f;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">set</span></span></span><span style="color: teal;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;">in_from_right.xml</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">set</span><span style="color: #37414b;">
</span><span style="color: #7f007f;">xmlns:android</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"http://schemas.android.com/apk/res/android"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:shareInterpolator</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"false"</i></span>
<span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">translate</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:duration</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"1400"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:fromXDelta</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"100%"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:fromYDelta</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"0%"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:toXDelta</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"0%"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:toYDelta</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"0%"</i></span>
<span style="color: teal;">/></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: teal;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"></</span></span></span><span style="color: #3f7f7f;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">set</span></span></span><span style="color: teal;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div style="border: none; line-height: 0.5cm; margin-bottom: 0cm; padding: 0cm;">
<span style="color: #37414b;"><span style="font-family: Helvetica Neue, Helvetica, sans-serif;"><span style="font-size: x-small;"><u>Screen
shot</u></span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOnS2mSj7avxzTNnW0CuDB7Nl2UbeKxhLEMBv01ixY-pLFCvlUecKaRuEAXcgU1s7OQElTrzLCoW-PB5yF1ouJySmKr4aBsZAYVmnG6tmcHyQfj7tfExO3QcptfIXqtNbd8g4yqdyoJuj_/s1600/Screenshot+from+2013-05-08+09:02:31.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOnS2mSj7avxzTNnW0CuDB7Nl2UbeKxhLEMBv01ixY-pLFCvlUecKaRuEAXcgU1s7OQElTrzLCoW-PB5yF1ouJySmKr4aBsZAYVmnG6tmcHyQfj7tfExO3QcptfIXqtNbd8g4yqdyoJuj_/s1600/Screenshot+from+2013-05-08+09:02:31.png" height="158" width="320" /></a></div>
<div style="border: none; line-height: 0.5cm; margin-bottom: 0cm; padding: 0cm;">
<br />
</div>
<div style="border: none; line-height: 0.5cm; margin-bottom: 0cm; padding: 0cm;">
<br /></div>
<div style="border: none; line-height: 0.5cm; margin-bottom: 0cm; padding: 0cm;">
Thanks </div>
<div style="border: none; line-height: 0.5cm; margin-bottom: 0cm; padding: 0cm;">
<br /></div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com7tag:blogger.com,1999:blog-6618938227440490497.post-9021526621451576852013-05-07T20:32:00.000-07:002013-05-07T20:32:17.166-07:00SlidingDrawer in Android ExampleSliding Drawer :<br />
<br />
<br />
<div style="line-height: 0.5cm; margin-bottom: 0cm;">
<strong><span style="color: #222222;"><span style="font-family: Roboto, sans-serif;"><span style="font-size: x-small;">This
class was deprecated in API level 17.</span></span></span></strong><br /><span style="color: #222222;"><span style="font-family: Roboto, sans-serif;"><span style="font-size: x-small;">This
class is not supported anymore. It is recommended you base your own
implementation on the source code for the Android Open Source Project
if you must use it in your application.</span></span></span>
</div>
<div style="line-height: 0.5cm; margin-bottom: 0cm;">
<br />
</div>
<div style="line-height: 0.5cm; margin-bottom: 0cm;">
<span style="color: #222222;"><span style="font-family: Roboto, sans-serif;"><span style="font-size: x-small;">SlidingDrawer
hides content out of the screen and allows the user to drag a handle
to bring the content on screen. SlidingDrawer can be used vertically
or horizontally. A special widget composed of two children views: the
handle, that the users drags, and the content, attached to the handle
and dragged with it. SlidingDrawer should be used as an overlay
inside layouts. This means SlidingDrawer should only be used inside
of a FrameLayout or a RelativeLayout for instance. The size of the
SlidingDrawer defines how much space the content will occupy once
slid out so SlidingDrawer should usually use match_parent for both
its dimensions. Inside an XML layout, SlidingDrawer must define the
id of the handle and of the content:</span></span></span>
</div>
<div style="line-height: 0.5cm; margin-bottom: 0cm;">
<br />
</div>
<div style="line-height: 0.5cm; margin-bottom: 0cm;">
activity_main.xml</div>
<div style="line-height: 0.5cm; margin-bottom: 0cm;">
</div>
<div style="line-height: 0.5cm; margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">RelativeLayout</span>
<span style="color: #7f007f;">xmlns:android</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"http://schemas.android.com/apk/res/android"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">xmlns:tools</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"http://schemas.android.com/tools"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"match_parent"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"match_parent"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:paddingBottom</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@dimen/activity_vertical_margin"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:paddingLeft</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@dimen/activity_horizontal_margin"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:paddingRight</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@dimen/activity_horizontal_margin"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:paddingTop</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@dimen/activity_vertical_margin"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">tools:context</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>".MainActivity"</i></span>
<span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">SlidingDrawer</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:id</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@+id/slidingDrawer1"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"match_parent"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"match_parent"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:content</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@+id/content"</i></span>
<span style="color: #7f007f;">android:allowSingleTap</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"true"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:handle</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@+id/handle"</i></span>
<span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">Button</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:id</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@+id/handle"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:background</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@drawable/up"</i></span>
<span style="color: teal;">/></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">LinearLayout</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:id</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@+id/content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:gravity</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"center_vertical"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:orientation</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"vertical"</i></span>
<span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">Button</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:id</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@+id/button1"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: #2a00ff;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;"><u>android:text</u></span><span style="color: black;"><u>=</u></span><span style="color: #2a00ff;"><i><u>"1"</u></i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;">/></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">Button</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:id</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@+id/button2"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;"><u>android:text</u></span><span style="color: black;"><u>=</u></span><span style="color: #2a00ff;"><i><u>"2"</u></i></span>
<span style="color: teal;">/></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">Button</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:id</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@+id/button3"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;"><u>android:text</u></span><span style="color: black;"><u>=</u></span><span style="color: #2a00ff;"><i><u>"3"</u></i></span>
<span style="color: teal;">/></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"></</span><span style="color: #3f7f7f;">LinearLayout</span><span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"></</span><span style="color: #3f7f7f;">SlidingDrawer</span><span style="color: teal;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;">
</span><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: teal;"><</span><span style="color: #3f7f7f;">TextView</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:id</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@+id/textView1"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_width</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_height</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"wrap_content"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_alignLeft</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@+id/slidingDrawer1"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_alignTop</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"@+id/slidingDrawer1"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:layout_marginLeft</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"73dp"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;">android:gravity</span><span style="color: black;">=</span><span style="color: #2a00ff;"><i>"center"</i></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f007f;"><u>android:text</u></span><span style="color: black;"><u>=</u></span><span style="color: #2a00ff;"><i><u>"Sliding
drawer example"</u></i></span> <span style="color: teal;">/></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: teal;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"></</span></span></span><span style="color: #3f7f7f;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">RelativeLayout</span></span></span><span style="color: teal;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">MainActivity.java</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: teal;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> </span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f0055;"><b>package</b></span><span style="color: black;">
com.example.slidingdrawer;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f0055;"><b>import</b></span><span style="color: black;">
android.app.Activity;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f0055;"><b>import</b></span><span style="color: black;">
android.os.Bundle;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f0055;"><b>import</b></span><span style="color: black;">
android.view.Menu;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f0055;"><b>import</b></span><span style="color: black;">
android.widget.Button;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f0055;"><b>import</b></span><span style="color: black;">
</span><span style="color: black;"><u>android.widget.</u></span><span style="color: black;"><strike><u>SlidingDrawer</u></strike></span><span style="color: black;">;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f0055;"><b>import</b></span><span style="color: black;">
</span><span style="color: black;"><u>android.widget.</u></span><span style="color: black;"><strike><u>SlidingDrawer</u></strike></span><span style="color: black;"><u>.OnDrawerCloseListener</u></span><span style="color: black;">;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f0055;"><b>import</b></span><span style="color: black;">
</span><span style="color: black;"><u>android.widget.</u></span><span style="color: black;"><strike><u>SlidingDrawer</u></strike></span><span style="color: black;"><u>.OnDrawerOpenListener</u></span><span style="color: black;">;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: #7f0055;"><b>public</b></span><span style="color: black;">
</span><span style="color: #7f0055;"><b>class</b></span><span style="color: black;">
MainActivity </span><span style="color: #7f0055;"><b>extends</b></span><span style="color: black;">
Activity {</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> </span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: black;"><strike><u>SlidingDrawer</u></strike></span><span style="color: black;">
</span><span style="color: #0000c0;">drawer</span><span style="color: black;">;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> Button
</span><span style="color: #0000c0;">button</span><span style="color: black;">;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> </span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #646464;">@SuppressWarnings</span><span style="color: black;">(</span><span style="color: #2a00ff;">"deprecation"</span><span style="color: black;">)</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #646464;">@Override</span><span style="color: black;">
</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>protected</b></span><span style="color: black;">
</span><span style="color: #7f0055;"><b>void</b></span><span style="color: black;">
onCreate(Bundle savedInstanceState) {</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>super</b></span><span style="color: black;">.onCreate(savedInstanceState);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> setContentView(R.layout.</span><span style="color: #0000c0;"><i>activity_main</i></span><span style="color: black;">);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #0000c0;">drawer</span><span style="color: black;">=(</span><span style="color: black;"><strike>SlidingDrawer</strike></span><span style="color: black;">)findViewById(R.id.</span><span style="color: #0000c0;"><i>slidingDrawer1</i></span><span style="color: black;">);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #0000c0;">button</span><span style="color: black;">=(Button)findViewById(R.id.</span><span style="color: #0000c0;"><i>handle</i></span><span style="color: black;">);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> </span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #0000c0;">drawer</span><span style="color: black;">.setOnDrawerOpenListener(</span><span style="color: #7f0055;"><b>new</b></span><span style="color: black;">
OnDrawerOpenListener() {</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> </span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #646464;">@Override</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>public</b></span><span style="color: black;">
</span><span style="color: #7f0055;"><b>void</b></span><span style="color: black;">
onDrawerOpened() {</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #3f7f5f;">//
</span><span style="color: #7f9fbf;"><b>TODO</b></span><span style="color: #3f7f5f;">
Auto-generated method stub</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #0000c0;">button</span><span style="color: black;">.setBackgroundResource(R.drawable.</span><span style="color: #0000c0;"><i>down</i></span><span style="color: black;">);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> </span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> }</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> });</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #0000c0;">drawer</span><span style="color: black;">.setOnDrawerCloseListener(</span><span style="color: #7f0055;"><b>new</b></span><span style="color: black;">
OnDrawerCloseListener() {</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> </span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #646464;">@Override</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>public</b></span><span style="color: black;">
</span><span style="color: #7f0055;"><b>void</b></span><span style="color: black;">
onDrawerClosed() {</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #3f7f5f;">//
</span><span style="color: #7f9fbf;"><b>TODO</b></span><span style="color: #3f7f5f;">
Auto-generated method stub</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #0000c0;">button</span><span style="color: black;">.setBackgroundResource(R.drawable.</span><span style="color: #0000c0;"><i>up</i></span><span style="color: black;">);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> </span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> }</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> });</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> </span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> }</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #646464;">@Override</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>public</b></span><span style="color: black;">
</span><span style="color: #7f0055;"><b>boolean</b></span><span style="color: black;">
onCreateOptionsMenu(Menu menu) {</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #3f7f5f;">//
Inflate the menu; this adds items to the action bar if it is present.</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> getMenuInflater().inflate(R.menu.</span><span style="color: #0000c0;"><i>main</i></span><span style="color: black;">,
menu);</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #7f0055;"><b>return</b></span><span style="color: black;">
</span><span style="color: #7f0055;"><b>true</b></span><span style="color: black;">;</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"> }</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;">}</span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<br />
</div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><u>Screen
Shot:</u></span></span></span></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><u><br /></u></span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj5YoeDWbsCTE8GFbdZjzrbwGmL7bw5XPu8ENlaROQdV9pgSmFaaeKeHqvdxEuOesBARwJiEecqv8VXITa2UEQr67lGsKEmYkpBBzmQm63IhGnLV9sztu6c_iGlZCpPx3eVkpWZF_vmrZJ/s1600/Screenshot+from+2013-05-08+08:59:52.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj5YoeDWbsCTE8GFbdZjzrbwGmL7bw5XPu8ENlaROQdV9pgSmFaaeKeHqvdxEuOesBARwJiEecqv8VXITa2UEQr67lGsKEmYkpBBzmQm63IhGnLV9sztu6c_iGlZCpPx3eVkpWZF_vmrZJ/s1600/Screenshot+from+2013-05-08+08:59:52.png" height="221" width="320" /></a></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<span style="color: black;"><span style="font-family: Consolas, sans-serif;"><span style="font-size: x-small;"><u><br /></u></span></span></span></div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com6tag:blogger.com,1999:blog-6618938227440490497.post-78272918961105774742013-05-07T05:45:00.000-07:002013-05-07T05:45:05.445-07:00Android game free open source code download
<br />
<div style="margin-bottom: 0cm;">
<span style="font-size: medium;"><b>Android
2d/3d game development :</b></span></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-size: medium;">Android
Open source game free download from here:</span></div>
<div style="margin-bottom: 0cm;">
<a href="http://code.google.com/hosting/search?q=android+game&projectsearch=Search+projects">http://code.google.com/hosting/search?q=android+game&projectsearch=Search+projects</a></div>
<div style="margin-bottom: 0cm;">
<a href="http://code.google.com/p/wagic/">http://code.google.com/p/wagic/</a></div>
<div style="margin-bottom: 0cm;">
<a href="http://code.google.com/p/gamekit/">http://code.google.com/p/gamekit/</a></div>
<div style="margin-bottom: 0cm;">
<a href="http://code.google.com/p/cocos2d-android-1/">http://code.google.com/p/cocos2d-android-1/</a></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
Our Android Applications on Google Play</div>
<div style="margin-bottom: 0cm;">
<a href="https://play.google.com/store/search?q=novaradix">https://play.google.com/store/search?q=novaradix</a></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
Thanks</div>
<div style="margin-bottom: 0cm;">
NovaRadix Technology, India</div>
<div style="margin-bottom: 0cm;">
Skype : novaradix</div>
<div style="margin-bottom: 0cm;">
Gmail: <a href="mailto:novaradix@gmail.com">novaradix@gmail.com</a></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com5tag:blogger.com,1999:blog-6618938227440490497.post-80589868856764687782013-05-07T00:37:00.000-07:002013-05-07T00:37:26.872-07:00Android PDF Reader Open Source code application free Download
<br />
<div style="margin-bottom: 0cm;">
<span style="font-size: medium;"><b>Pdf Reader android
source code on github.</b></span></div>
<div style="margin-bottom: 0cm;">
<a href="https://github.com/chintanvyas89/android-pdf-viewer">https://github.com/chintanvyas89/android-pdf-viewer</a></div>
<div style="margin-bottom: 0cm;">
<a href="https://github.com/jblough/Android-Pdf-Viewer-Library">https://github.com/jblough/Android-Pdf-Viewer-Library</a></div>
<div style="margin-bottom: 0cm;">
<a href="https://github.com/yob/pdf-reader">https://github.com/yob/pdf-reader</a></div>
<div style="margin-bottom: 0cm;">
<a href="https://github.com/jlegewie/zotfile">https://github.com/jlegewie/zotfile</a></div>
<div style="margin-bottom: 0cm;">
<a href="https://github.com/jblough/Android-Pdf-Viewer-Library">https://github.com/jblough/Android-Pdf-Viewer-Library</a></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<span style="font-size: medium;"><b>Pdf Reader android open
source project free downloaded from here :</b></span></div>
<div style="margin-bottom: 0cm;">
<a href="http://code.google.com/hosting/search?q=pdf+reader&projectsearch=Search+projects">http://code.google.com/hosting/search?q=pdf+reader&projectsearch=Search+projects</a></div>
<div style="margin-bottom: 0cm;">
<a href="http://code.google.com/p/flexpaper/">http://code.google.com/p/flexpaper/</a></div>
<div style="margin-bottom: 0cm;">
<a href="http://code.google.com/p/sumatrapdf/">http://code.google.com/p/sumatrapdf/</a></div>
<div style="margin-bottom: 0cm;">
<a href="http://code.google.com/p/fb2pdf/">http://code.google.com/p/fb2pdf/</a></div>
<div style="margin-bottom: 0cm;">
<a href="http://code.google.com/p/ebookdroid/">http://code.google.com/p/ebookdroid/</a></div>
<div style="margin-bottom: 0cm;">
<a href="http://code.google.com/p/vudroid/">http://code.google.com/p/vudroid/</a></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
Our Android Applications on Google Play</div>
<div style="margin-bottom: 0cm;">
<a href="https://play.google.com/store/search?q=novaradix">https://play.google.com/store/search?q=novaradix</a></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
Thanks</div>
<div style="margin-bottom: 0cm;">
NovaRadix Technology, India</div>
<div style="margin-bottom: 0cm;">
Skype : novaradix</div>
<div style="margin-bottom: 0cm;">
Gmail: <a href="mailto:novaradix@gmail.com">novaradix@gmail.com</a></div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
<div style="margin-bottom: 0cm;">
<br />
</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com8tag:blogger.com,1999:blog-6618938227440490497.post-41387209447347518262013-05-07T00:30:00.001-07:002013-05-07T00:30:50.016-07:00Android Configchanges Attributes - Manifest Description
<br />
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<div class="western" style="margin-bottom: 0cm;">
To declare that your
activity handles a configuration change, edit the appropriate
<code class="western"><activity></code> element in your
manifest file to include the <code class="western">android:configChanges</code>
attribute with a value that represents the configuration you want to
handle. Possible values are listed in the documentation for the
<code class="western">android:configChanges</code> attribute (the
most commonly used values are <code class="western">"orientation"</code>
to prevent restarts when the screen orientation changes and
<code class="western">"keyboardHidden"</code> to prevent
restarts when the keyboard availability changes). You can declare
multiple configuration values in the attribute by separating them
with a pipe <code class="western">|</code> character.</div>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<div class="western" style="margin-bottom: 0cm;">
android:configChanges=["mcc", "mnc", "locale",</div>
<div class="western" style="margin-bottom: 0cm;">
"touchscreen",
"keyboard", "keyboardHidden",</div>
<div class="western" style="margin-bottom: 0cm;">
"navigation",
"screenLayout", "fontScale", "uiMode",</div>
<div class="western" style="margin-bottom: 0cm;">
"orientation",
"screenSize", "smallestScreenSize"]</div>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<div class="western" style="margin-bottom: 0cm;">
Now, when one of these
configurations change, <code class="western">MyActivity</code> does
not restart. Instead, the <code class="western">MyActivity</code>
receives a call to <code class="western">onConfigurationChanged()</code>.
This method is passed a <code class="western">Configuration</code>
object that specifies the new device configuration. By reading fields
in the <code class="western">Configuration</code>, you can determine
the new configuration and make appropriate changes by updating the
resources used in your interface. At the time this method is called,
your activity's <code class="western">Resources</code> object is
updated to return resources based on the new configuration, so you
can easily reset elements of your UI without the system restarting
your activity.</div>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<div class="western" style="margin-bottom: 0cm;">
Lists configuration
changes that the activity will handle itself. When a configuration
change occurs at runtime, the activity is shut down and restarted by
default, but declaring a configuration with this attribute will
prevent the activity from being restarted. Instead, the activity
remains running and its <code class="western">onConfigurationChanged()</code>
method is called.
</div>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<table cellpadding="2" cellspacing="0" style="width: 643px;">
<colgroup><col width="192"></col>
<col width="443"></col>
</colgroup><tbody>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
Value</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western">
Description</div>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
"<code class="western">mcc</code>"</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western">
The IMSI mobile country code (MCC) has changed
— a SIM has been detected and updated the MCC.</div>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
"<code class="western">mnc</code>"</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western">
The IMSI mobile network code (MNC) has changed
— a SIM has been detected and updated the MNC.</div>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
"<code class="western">locale</code>"</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western">
The locale has changed — the user has
selected a new language that text should be displayed in.</div>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
"<code class="western">touchscreen</code>"</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western">
The touchscreen has changed. (This should never
normally happen.)</div>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
"<code class="western">keyboard</code>"</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western">
The keyboard type has changed — for example,
the user has plugged in an external keyboard.</div>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
"<code class="western">keyboardHidden</code>"</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western">
The keyboard accessibility has changed — for
example, the user has revealed the hardware keyboard.</div>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
"<code class="western">navigation</code>"</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western">
The navigation type (trackball/dpad) has
changed. (This should never normally happen.)</div>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
"<code class="western">screenLayout</code>"</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western">
The screen layout has changed — this might be
caused by a different display being activated.</div>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
"<code class="western">fontScale</code>"</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western">
The font scaling factor has changed — the
user has selected a new global font size.</div>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
"<code class="western">uiMode</code>"</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western">
The user interface mode has changed — this
can be caused when the user places the device into a desk/car dock
or when the night mode changes. See <code class="western">UiModeManager</code>.
<em>Added in API level 8</em>.</div>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
"<code class="western">orientation</code>"</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western" style="margin-bottom: 0cm;">
The screen
orientation has changed — the user has rotated the device.
</div>
<div class="western">
<strong>Note:</strong> If your application
targets API level 13 or higher (as declared by the <code class="western">minSdkVersion</code>
and <code class="western">targetSdkVersion</code> attributes),
then you should also declare the <code class="western">"screenSize"</code>
configuration, because it also changes when a device switches
between portrait and landscape orientations.</div>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
"<code class="western">screenSize</code>"</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western" style="margin-bottom: 0cm;">
The current
available screen size has changed. This represents a change in the
currently available size, relative to the current aspect ratio, so
will change when the user switches between landscape and portrait.
However, if your application targets API level 12 or lower, then
your activity always handles this configuration change itself
(this configuration change does not restart your activity, even
when running on an Android 3.2 or higher device).
</div>
<div class="western">
<em>Added in API level 13.</em></div>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
"<code class="western">smallestScreenSize</code>"</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western" style="margin-bottom: 0cm;">
The physical screen
size has changed. This represents a change in size regardless of
orientation, so will only change when the actual physical screen
size has changed such as switching to an external display. A
change to this configuration corresponds to a change in the
smallestWidth configuration. However, if your application targets
API level 12 or lower, then your activity always handles this
configuration change itself (this configuration change does not
restart your activity, even when running on an Android 3.2 or
higher device).
</div>
<div class="western">
<em>Added in API level 13.</em></div>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm;" width="192">
<div class="western">
"<code class="western">layoutDirection</code>"</div>
</td>
<td style="border: none; padding: 0cm;" width="443">
<div class="western">
The layout direction has changed. For example,
changing from left-to-right (LTR) to right-to-left (RTL). <em>Added
in API level 17.</em></div>
</td>
</tr>
</tbody></table>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<div class="western" style="margin-bottom: 0cm;">
For More Details :</div>
<div class="western" style="margin-bottom: 0cm;">
<a href="http://developer.android.com/guide/topics/manifest/activity-element.html">http://developer.android.com/guide/topics/manifest/activity-element.html</a></div>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<div class="western" style="margin-bottom: 0cm;">
Our Android
Applications on Google Play</div>
<div class="western" style="margin-bottom: 0cm;">
<a href="https://play.google.com/store/search?q=novaradix">https://play.google.com/store/search?q=novaradix</a></div>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<div class="western" style="margin-bottom: 0cm;">
Thanks</div>
<div class="western" style="margin-bottom: 0cm;">
NovaRadix Technology,
India</div>
<div class="western" style="margin-bottom: 0cm;">
Skype : novaradix</div>
<div class="western" style="margin-bottom: 0cm;">
Gmail:
novaradix@gmail.com</div>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
<div class="western" style="margin-bottom: 0cm;">
<br />
</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com1tag:blogger.com,1999:blog-6618938227440490497.post-10590437033572226642013-04-24T23:19:00.000-07:002014-07-10T01:16:44.268-07:00Make SplashScreen in android<div dir="ltr" style="text-align: left;" trbidi="on"><h2 style="text-align: center;">Make Splash screen in android </h2><div><br /></div><div>wait for some time in android for display any screen like splash screen.</div><div><br /></div><div><br /></div><div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;">Timer timer2 = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;"> Timer();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> timer2.schedule(</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;"> TimerTask() {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10.0pt;">@Override</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> run() {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br /></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> Intent intent = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;"> Intent(Spash_Activity.</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">this</span></b><span style="font-family: Consolas; font-size: 10pt;">,</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> LoginActivity.</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">class</span></b><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> startActivity(intent);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> finish();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal"><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"> }, 3000);</span></div><div class="MsoNormal"><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"><br /></span></div><div class="MsoNormal"><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">here is the "3000" means 3 second wait for load another screen </span></div></div></div>NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com0tag:blogger.com,1999:blog-6618938227440490497.post-1232520761245789442013-04-21T00:50:00.000-07:002013-04-21T00:50:07.457-07:00Reflection Photo Effect for android <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">Please use below class and pass the bitmap to this function and get return bitmap with </span></b><span style="font-family: 'Courier New'; font-size: 13px;">Reflection </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">effect.</span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;"><br /></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;"><br /></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">class</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> NewReflection {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">static</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">final</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> Bitmap
applyReflection(Bitmap bitmap) {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// gap space
between original and reflected</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">final</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> reflectionGap =
4;</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// get image
size</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> width =
bitmap.getWidth();</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> height =
bitmap.getHeight();</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// this will
not scale but will flip on the Y axis</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> Matrix
matrix = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> Matrix();</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> matrix.preScale(1,
-1);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// create a
Bitmap with the flip matrix applied to it.</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// we only
want the bottom half of the image</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> Bitmap
reflectionImage = Bitmap.<i>createBitmap</i>(bitmap, 0, height / 2,</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> width,
height / 2, matrix, </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">false</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// create a new
bitmap with same width but taller to fit reflection</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> Bitmap
bitmapWithReflection = Bitmap.<i>createBitmap</i>(width,</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> (height
+ height / 2), Config.</span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt;">ARGB_8888</span></i><span style="font-family: 'Courier New'; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// create a
new Canvas with the bitmap that's big enough for</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// the image
plus gap plus reflection</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> Canvas
canvas = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> Canvas(bitmapWithReflection);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// draw in the
original image</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> canvas.drawBitmap(bitmap,
0, 0, </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">null</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// draw in the
gap</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> Paint
defaultPaint = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> Paint();</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> canvas.drawRect(0,
height, width, height + reflectionGap, defaultPaint);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// draw in the
reflection</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> canvas.drawBitmap(reflectionImage,
0, height + reflectionGap, </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">null</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// create a
shader that is a linear gradient that covers the reflection</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> Paint
paint = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> Paint();</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> LinearGradient
shader = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> LinearGradient(0, bitmap.getHeight(), 0,</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> bitmapWithReflection.getHeight()
+ reflectionGap, 0x70ffffff,</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 0x00ffffff,
TileMode.</span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt;">CLAMP</span></i><span style="font-family: 'Courier New'; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// set the
paint to use this shader (linear gradient)</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> paint.setShader(shader);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// set the
Transfer mode to be porter <u>duff</u> and destination in</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> paint.setXfermode(</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">
PorterDuffXfermode(Mode.</span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt;">DST_IN</span></i><span style="font-family: 'Courier New'; font-size: 10pt;">));</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// draw a
rectangle using the paint with our linear gradient</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> canvas.drawRect(0,
height, width, bitmapWithReflection.getHeight()</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> +
reflectionGap, paint);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">return</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">
bitmapWithReflection;</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;">}</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p><br /></o:p></div>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p><br /></o:p></div>
</div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><a href="https://play.google.com/store/apps/details?id=com.history.amazing.real.love.story" target="_blank">Amazing Real Life Love Story Android Application</a></span></div>
<div class="MsoNormal">
By: NovaRadix Technology.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><br /></span>
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><br /></span></div>
<div class="MsoNormal">
</div>
</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com0tag:blogger.com,1999:blog-6618938227440490497.post-71364098548233495402013-04-21T00:43:00.000-07:002013-04-21T00:43:16.562-07:00Photo Sketch Effect for android <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;"><br /></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #7f0055; font-family: 'Courier New'; font-size: 13px; font-weight: bold;">Please use below class and pass the bitmap to this function and get return bitmap with Sketch effect.You can also customize the value and get the customization of sketch effect.</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #7f0055; font-family: 'Courier New'; font-size: 13px; font-weight: bold;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;"><br /></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">class</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> Sketch {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// type = 3(Negative), 4(Pencil Sketch), 5(Color
Pencil Sketch)</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">static</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">final</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> Bitmap
changeToSketch(Bitmap bitmap) {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">return</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> <i>changeToSketch</i>(bitmap,
5,110);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> } </span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">static</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">final</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> Bitmap
changeToSketch(Bitmap src,</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> type,</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> threshold) {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> width =
src.getWidth();</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> height = src.getHeight();</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> Bitmap result = Bitmap.<i>createBitmap</i>(width,
height, src.getConfig());</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> A, R, G, B;</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> sumR, sumG, sumB;</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">[][] pixels = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">[3][3];</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">for</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">(</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> y = 0; y <
height - 2; ++y) {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">for</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">(</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> x = 0; x <
width - 2; ++x) {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">//
get pixel matrix</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">for</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">(</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> i = 0; i <
3; ++i) {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">for</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">(</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> j = 0; j <
3; ++j) {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> pixels[i][j] =
src.getPixel(x + i, y + j);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// get alpha of center pixel</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> A = Color.<i>alpha</i>(pixels[1][1]);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// <u>init</u> color sum</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> sumR = sumG = sumB = 0;</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> sumR = (type*Color.<i>red</i>(pixels[1][1]))
- Color.<i>red</i>(pixels[0][0]) - Color.<i>red</i>(pixels[0][2]) - Color.<i>red</i>(pixels[2][0])
- Color.<i>red</i>(pixels[2][2]);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> sumG = (type*Color.<i>green</i>(pixels[1][1]))
- Color.<i>green</i>(pixels[0][0]) - Color.<i>green</i>(pixels[0][2]) - Color.<i>green</i>(pixels[2][0])
- Color.<i>green</i>(pixels[2][2]);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> sumB = (type*Color.<i>blue</i>(pixels[1][1]))
- Color.<i>blue</i>(pixels[0][0]) - Color.<i>blue</i>(pixels[0][2]) - Color.<i>blue</i>(pixels[2][0])
- Color.<i>blue</i>(pixels[2][2]);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// get final Red</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> R = (</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">)(sumR + threshold);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">if</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">(R < 0) { R =
0; }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">else</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">if</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">(R > 255) { R
= 255; }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// get final Green</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> G = (</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">)(sumG + threshold);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">if</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">(G < 0) { G =
0; }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">else</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">if</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">(G > 255) { G
= 255; }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// get final Blue</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> B = (</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">)(sumB + threshold);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">if</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">(B < 0) { B =
0; }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">else</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">if</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">(B > 255) { B
= 255; }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> result.setPixel(x + 1, y + 1,
Color.<i>argb</i>(A, R, G, B));</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">return</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> result;</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;">}</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><a href="https://play.google.com/store/apps/details?id=com.history.amazing.real.love.story" target="_blank">Amazing Real Life Love Story Android Application</a></span></div>
<div class="MsoNormal">
By: NovaRadix Technology.</div>
<div class="MsoNormal">
</div>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p><br /></o:p></div>
<br />
</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com3tag:blogger.com,1999:blog-6618938227440490497.post-60045394508046142362013-04-21T00:39:00.001-07:002013-04-21T00:39:20.234-07:00Snow Image Effect for android <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">Please use below class and pass the bitmap to this function and get return bitmap with Snow effect.</span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;"><br /></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;"><br /></span></b>
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;"><br /></span></b>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">class</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> NewSnowFilter {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">static</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">final</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt;">COLOR_MIN</span></i><span style="font-family: 'Courier New'; font-size: 10pt;"> = 0x00;</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">static</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">final</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt;">COLOR_MAX</span></i><span style="font-family: 'Courier New'; font-size: 10pt;"> = 0xFF;</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">static</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> Bitmap
applySnowEffect(Bitmap bitmap) {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// get image
size</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> width =
bitmap.getWidth();</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> height =
bitmap.getHeight();</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">[] pixels = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">[width *
height];</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// get pixel
array from source</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> bitmap.getPixels(pixels,
0, width, 0, 0, width, height);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// random
object</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> Random
random = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> Random();</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> R, G, B, index
= 0, thresHold = 50;</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// iteration
through pixels</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">for</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> (</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> y = 0; y <
height; ++y) {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">for</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> (</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> x = 0; x <
width; ++x) {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// get current
index in 2D-matrix</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> index
= y * width + x;</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// get color</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> R
= Color.<i>red</i>(pixels[index]);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> G
= Color.<i>green</i>(pixels[index]);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> B
= Color.<i>blue</i>(pixels[index]);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// generate
threshold</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> thresHold
= random.nextInt(</span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt;">COLOR_MAX</span></i><span style="font-family: 'Courier New'; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">if</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> (R >
thresHold && G > thresHold && B > thresHold) {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> pixels[index]
= Color.<i>rgb</i>(</span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt;">COLOR_MAX</span></i><span style="font-family: 'Courier New'; font-size: 10pt;">, </span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt;">COLOR_MAX</span></i><span style="font-family: 'Courier New'; font-size: 10pt;">, </span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt;">COLOR_MAX</span></i><span style="font-family: 'Courier New'; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// output
bitmap</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> Bitmap
bmOut = Bitmap</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> .<i>createBitmap</i>(width,
height, Bitmap.Config.</span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt;">RGB_565</span></i><span style="font-family: 'Courier New'; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> bmOut.setPixels(pixels,
0, width, 0, 0, width, height);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">return</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> bmOut;</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 107%;">}<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p><br /></o:p></div>
<div class="MsoNormal">
<o:p><br /></o:p></div>
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><a href="https://play.google.com/store/apps/details?id=com.history.amazing.real.love.story" target="_blank">Amazing Real Life Love Story Android Application</a></span></div>
<div class="MsoNormal">
By: NovaRadix Technology.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><br /></span></div>
<div class="MsoNormal">
</div>
</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com1tag:blogger.com,1999:blog-6618938227440490497.post-33478379398352923892013-04-21T00:35:00.000-07:002013-04-21T00:35:55.426-07:00Gray Scale Photo Effect for android <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">Please use below class and pass the bitmap to this function and get return bitmap with gray scale effect.</span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;"><br /></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;"><br /></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">class</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> GrayFilter {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt;">// <u>satutarion</u> --- 1.0 , 0.5 and 0</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">static</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> Bitmap
changeToGray(Bitmap bitmap) {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">return</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> <i>changeToGray</i>(bitmap,
0);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">static</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> Bitmap
changeToGray(Bitmap bitmap,</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">float</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> sat) {</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">int</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> width, height;</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> width
= bitmap.getWidth();</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> height
= bitmap.getHeight();</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> Bitmap
grayBitmap = Bitmap.<i>createBitmap</i>(width, height, Bitmap.Config.</span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt;">RGB_565</span></i><span style="font-family: 'Courier New'; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> Canvas
canvas = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> Canvas(grayBitmap);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> Paint
paint = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> Paint();</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> paint.setAntiAlias(</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">true</span></b><span style="font-family: 'Courier New'; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> ColorMatrix
colorMatrix = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> ColorMatrix();</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> colorMatrix.setSaturation(sat);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> ColorMatrixColorFilter
filter = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> ColorMatrixColorFilter(colorMatrix);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> paint.setColorFilter(filter);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> canvas.drawBitmap(bitmap,
0, 0, paint);</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt;">return</span></b><span style="font-family: 'Courier New'; font-size: 10pt;"> grayBitmap;</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 107%;">}</span><o:p></o:p></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 107%;"><a href="https://play.google.com/store/apps/details?id=com.history.amazing.real.love.story" target="_blank">Amazing Real Life Love Story Android Application</a></span></div>
<div class="MsoNormal">
By: NovaRadix Technology.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 107%;"><br /></span></div>
</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com0tag:blogger.com,1999:blog-6618938227440490497.post-70663405927744881342013-04-20T05:43:00.001-07:002013-04-20T05:43:27.176-07:00Linear Layout and its major properties in android <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="line-height: 18px; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: medium;"><span lang="en"><b>[1]</b></span></span><span style="font-size: x-small;"><span lang="en"><b> </b></span></span><span style="font-size: medium;"><span lang="en"><u><b>LinearLayout</b></u></span></span></span></div>
<ul style="text-align: left;">
<li><div align="JUSTIFY" style="margin-bottom: 0.35cm;">
<h3>
<div style="line-height: 19px; text-align: left;">
<span style="font-family: Verdana, sans-serif; font-size: small; font-weight: normal; line-height: 16px;">LinearLayout is a view group that align all children in a single direction, vertically or horizontally. The default orientation is horizontal.</span></div>
<span style="font-size: small;"><div style="line-height: 16px; text-align: left;">
<span style="font-family: Verdana, sans-serif; font-weight: normal;">In vertical LinearLayout,all children are stacked one after another,so a vertical list will only have one child per row,no matter how wide they are and a horizontal list will only be one row high. </span><span lang="en" style="font-family: Verdana, sans-serif;"><span style="font-weight: normal;">You can specify the layout direction with the </span></span><span lang="en" style="font-family: Verdana, sans-serif;"><u><span style="font-weight: normal;">android:orientation </span></u></span><span lang="en" style="font-family: Verdana, sans-serif;"><span style="font-weight: normal;">attribute or</span></span><span lang="en" style="font-family: Verdana, sans-serif;"><u><span style="font-weight: normal;"> setOrientation() </span></u></span><span lang="en" style="font-family: Verdana, sans-serif;"><span style="font-weight: normal;">method.</span></span></div>
<div style="font-family: Verdana, sans-serif; font-weight: normal; line-height: 16px; text-align: left;">
<span lang="en"><br /></span></div>
<div style="font-family: Verdana, sans-serif; line-height: 16px; text-align: left;">
<span lang="en">Gravity:<span style="font-weight: normal;"> which specifies the alignment of all the child elements(right, center,or left alignment) by calling </span></span><span lang="en" style="font-weight: normal;"><u>setGravity() </u></span><span lang="en" style="font-weight: normal;">method or </span><span lang="en" style="font-weight: normal;"><u>android:gravity </u></span><span lang="en" style="font-weight: normal;">attribute.</span></div>
</span></h3>
<h3>
<div style="font-family: Verdana, sans-serif; font-size: medium; font-weight: normal; line-height: 19px; text-align: left;">
<span lang="en" style="line-height: 16px;">LinearLayout also supports assigning a weight to individual children with the </span><span lang="en" style="line-height: 16px;"><u>android:layout_weight </u></span><span lang="en" style="line-height: 16px;">attribute. This attribute assigns an "importance" value to a view in terms of how much space is should occupy on the screen. A larger weight value allows it to expand to fill any remaining space in the parent view. Child views can specify a weight value, and then any remaining space in the view group is assigned to children in the proportion of their declared weight. Default weight is zero.</span></div>
<div style="font-family: Verdana, sans-serif; font-size: medium; font-weight: normal; line-height: 19px; text-align: left;">
<span lang="en" style="line-height: 16px;"> </span></div>
<div style="font-family: Verdana, sans-serif; font-size: medium; font-weight: normal; line-height: 19px; text-align: left;">
<span lang="en" style="line-height: 16px;"> </span></div>
<div style="font-family: Verdana, sans-serif; font-size: medium; font-weight: normal; line-height: 19px; text-align: left;">
<span lang="en" style="line-height: 16px;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil8HzO66w1nH62q_EgkOlQCGnoAdkCzQCbt7_eQk9NWhMBgdtIf_I3KSZjhIpwVTqZxosT0ObmOOQubep0p21Wf5V7kANbZrDDk2G48C2tsLSccD4-52GWotA6bEWi5RvZA4OqpCnsIwjZ/s1600/1.png" imageanchor="1" style="font-family: Arial, Helvetica, sans-serif; line-height: normal; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil8HzO66w1nH62q_EgkOlQCGnoAdkCzQCbt7_eQk9NWhMBgdtIf_I3KSZjhIpwVTqZxosT0ObmOOQubep0p21Wf5V7kANbZrDDk2G48C2tsLSccD4-52GWotA6bEWi5RvZA4OqpCnsIwjZ/s320/1.png" width="320" /></a></span></div>
<div style="font-family: Verdana, sans-serif; font-size: medium; font-weight: normal; line-height: 19px; text-align: left;">
<br /></div>
<div style="font-family: Verdana, sans-serif; font-size: medium; font-weight: normal; line-height: 19px; text-align: left;">
<br /></div>
<div style="font-family: Verdana, sans-serif; font-size: medium; font-weight: normal; line-height: 19px; text-align: left;">
<br /></div>
<div style="font-family: Verdana, sans-serif; font-size: medium; font-weight: normal; line-height: 19px; text-align: left;">
<br /></div>
<div style="font-family: Verdana, sans-serif; font-size: medium; font-weight: normal; text-align: left;">
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"></span></div>
<div style="color: black; font-family: Verdana, sans-serif; font-size: medium;">
<span style="line-height: 16px;">Another important property of linear layout is Orientation.</span></div>
<div style="color: black; font-family: Verdana, sans-serif; font-size: medium;">
<span style="line-height: 16px;">Orientation is either Horizontal or vertical.</span></div>
<div style="color: black; font-family: Verdana, sans-serif; font-size: medium;">
<span style="line-height: 16px;">If </span><span style="line-height: 16px;">Orientation is horizontal then it adds view in one row and if </span><span style="line-height: 16px;">Orientation</span></div>
<div style="color: black; font-family: Verdana, sans-serif; font-size: medium;">
<span style="line-height: 16px;">is vertical then it adds view in one column.<br />Below xml is for horizontal orientation</span></div>
<div>
<span style="line-height: 16px;"><br /></span></div>
<div>
<br /></div>
<br />
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;">LinearLayout</span><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_width</span>=<i><span style="color: #2a00ff;">"match_parent"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_height</span>=<i><span style="color: #2a00ff;">"wrap_content"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:orientation</span>=<i><span style="color: #2a00ff;">"horizontal"</span></i> <span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;">TextView</span><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:id</span>=<i><span style="color: #2a00ff;">"@+id/personinformation_txtvw_title1"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_width</span>=<i><span style="color: #2a00ff;">"0dp"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_height</span>=<i><span style="color: #2a00ff;">"wrap_content"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_weight</span>=<i><span style="color: #2a00ff;">"1"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:gravity</span>=<i><span style="color: #2a00ff;">"center"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:text</span>=<i><span style="color: #2a00ff;">"@string/title"</span></i> <span style="color: teal;">/></span></span></div>
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
</div>
<blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;">TextView</span></blockquote>
<br />
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"><span style="color: teal;"></span></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:id</span>=<i><span style="color: #2a00ff;">"@+id/personinformation_txtvw_title2"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_width</span>=<i><span style="color: #2a00ff;">"0dp"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_height</span>=<i><span style="color: #2a00ff;">"wrap_content"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_weight</span>=<i><span style="color: #2a00ff;">"1"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:gravity</span>=<i><span style="color: #2a00ff;">"center"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:text</span>=<i><span style="color: #2a00ff;">"@string/title"</span></i> <span style="color: teal;">/></span></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"><span style="color: teal;"></span></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
</div>
<blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;">TextView</span></blockquote>
<br />
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:id</span>=<i><span style="color: #2a00ff;">"@+id/personinformation_txtvw_title3"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_width</span>=<i><span style="color: #2a00ff;">"0dp"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_height</span>=<i><span style="color: #2a00ff;">"wrap_content"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_weight</span>=<i><span style="color: #2a00ff;">"1"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:gravity</span>=<i><span style="color: #2a00ff;">"center"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:text</span>=<i><span style="color: #2a00ff;">"@string/title"</span></i> <span style="color: teal;">/></span></span></div>
<br />
<br />
<div class="MsoNormal" style="font-family: 'Times New Roman'; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"> </span><span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"></</span><span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;">LinearLayout</span><span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;">></span></div>
<div style="line-height: 19px;">
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><br /></span></div>
<div style="line-height: 19px;">
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><br /></span></div>
<div style="line-height: 19px;">
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"></span></div>
<div style="color: black; font-family: Verdana, sans-serif; font-size: medium;">
<span style="line-height: 16px;">For vertical orientation you have to just change </span><span style="line-height: 16px;">orientation="Vertical" in the linear layout .</span></div>
<div style="color: black; font-family: Verdana, sans-serif; font-size: medium;">
<span style="line-height: 16px;">Below xml is for Vertical orientation</span></div>
<div>
<span style="line-height: 16px;"><br /></span></div>
<div>
<br /></div>
<br />
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;">LinearLayout</span><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_width</span>=<i><span style="color: #2a00ff;">"match_parent"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_height</span>=<i><span style="color: #2a00ff;">"wrap_content"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:orientation</span>=<i><span style="color: #2a00ff;">"horizontal"</span></i> <span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;">TextView</span><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:id</span>=<i><span style="color: #2a00ff;">"@+id/personinformation_txtvw_title1"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_width</span>=<i><span style="color: #2a00ff;">"0dp"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_height</span>=<i><span style="color: #2a00ff;">"wrap_content"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_weight</span>=<i><span style="color: #2a00ff;">"1"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:gravity</span>=<i><span style="color: #2a00ff;">"center"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:text</span>=<i><span style="color: #2a00ff;">"@string/title"</span></i> <span style="color: teal;">/></span></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
</div>
<blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;">
<span style="font-size: 10pt;"> </span><span style="font-size: 10pt;"><</span><span style="color: #3f7f7f; font-size: 10pt;">TextView</span></blockquote>
<br />
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"><span style="color: teal;"></span></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:id</span>=<i><span style="color: #2a00ff;">"@+id/personinformation_txtvw_title2"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_width</span>=<i><span style="color: #2a00ff;">"0dp"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_height</span>=<i><span style="color: #2a00ff;">"wrap_content"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_weight</span>=<i><span style="color: #2a00ff;">"1"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:gravity</span>=<i><span style="color: #2a00ff;">"center"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:text</span>=<i><span style="color: #2a00ff;">"@string/title"</span></i> <span style="color: teal;">/></span></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"><span style="color: teal;"></span></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
</div>
<blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;">
<span style="font-size: 10pt;"> </span><span style="font-size: 10pt;"><</span><span style="color: #3f7f7f; font-size: 10pt;">TextView</span></blockquote>
<br />
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:id</span>=<i><span style="color: #2a00ff;">"@+id/personinformation_txtvw_title3"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_width</span>=<i><span style="color: #2a00ff;">"0dp"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_height</span>=<i><span style="color: #2a00ff;">"wrap_content"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:layout_weight</span>=<i><span style="color: #2a00ff;">"1"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:gravity</span>=<i><span style="color: #2a00ff;">"center"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> <span style="color: #7f007f;">android:text</span>=<i><span style="color: #2a00ff;">"@string/title"</span></i> <span style="color: teal;">/></span></span></div>
<br />
<br />
<div class="MsoNormal" style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"> </span><span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"></</span><span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;">LinearLayout</span><span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;">></span></div>
<div>
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><br /></span></div>
<div>
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><br /></span></div>
<div>
<br /></div>
</span></div>
<div>
<span style="line-height: 16px;">There is another useful property of linear layout is layout:weight.</span></div>
<div>
<span style="line-height: 16px;">It will assign the area of view.</span></div>
<div>
<br /></div>
<div>
<span style="line-height: 16px;">Hope this will clear the linear layout and you can use it friendly in your android application.</span></div>
<div>
<span style="line-height: 16px;"><br /></span></div>
<div>
<span style="line-height: 16px;"><br /></span></div>
<div style="line-height: 19px;">
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><br /></span></div>
<div style="line-height: 19px;">
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><br /></span></div>
<div style="line-height: 19px;">
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><br /></span></div>
<div style="line-height: 19px;">
<br /></div>
<div style="line-height: 19px;">
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 13px;"><br /></span></div>
</div>
<div style="font-family: Verdana, sans-serif; font-size: medium; font-weight: normal; line-height: 19px; text-align: left;">
<span lang="en" style="line-height: 16px;"></span></div>
</h3>
</div>
</li>
</ul>
</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com0tag:blogger.com,1999:blog-6618938227440490497.post-20789478730016753082013-04-16T04:26:00.000-07:002014-07-10T01:16:44.279-07:00Date Picker Like iPhone in Android<div dir="ltr" style="text-align: left;" trbidi="on">in iPhone date picker like this and here is the demo of date picker like iPhone in android<br /><br />make date piker in android same as iPhone in android using wheel view<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX-0YkV_78H53sHSGtfkIaIPo4-NkXN4XhuZUWfG-I0uV2zFKXf-BCOrHq1Cx8s7Oz0ld2u0LiTZ-Sa6m_8UbAZgZPMmdr31ilh-a8MDnEakN-itPa-gjOg7KMn4YxISa14SbWKHhHy5du/s1600/device-2013-04-16-161804.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX-0YkV_78H53sHSGtfkIaIPo4-NkXN4XhuZUWfG-I0uV2zFKXf-BCOrHq1Cx8s7Oz0ld2u0LiTZ-Sa6m_8UbAZgZPMmdr31ilh-a8MDnEakN-itPa-gjOg7KMn4YxISa14SbWKHhHy5du/s320/device-2013-04-16-161804.png" width="213" /></a></div><br /><div style="text-align: center;">Download Source Code</div><div style="text-align: center;"><a href="https://docs.google.com/file/d/0BwmiUPcxUHHlTzJObGs5ZVYtMHM/edit?usp=sharing">Download</a></div></div>NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com8tag:blogger.com,1999:blog-6618938227440490497.post-59760705005836009792013-04-10T21:33:00.000-07:002013-04-20T05:53:41.811-07:00Android Controls - widget guidelines <div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">P { margin-bottom: 0.21cm; }</style>
<br />
<div style="line-height: 115%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: medium;"><span lang="en"><b>[1]</b></span></span><span style="font-size: x-small;"><span lang="en"><b>
</b></span></span><span style="font-size: medium;"><span lang="en"><u><b>LinearLayout</b></u></span></span></span></div>
<ul style="text-align: left;">
<li><div align="JUSTIFY" style="margin-bottom: 0.35cm;">
<h3>
<div style="line-height: 100%; text-align: left;">
<span style="font-family: Verdana, sans-serif; font-size: small; font-weight: normal; line-height: 100%; text-align: left;">LinearLayout
is a view group that align all children in a single direction,
vertically or horizontally. The default orientation is horizontal.</span></div>
<span style="font-size: small;"><div style="line-height: 100%; text-align: left;">
<span style="font-family: Verdana, sans-serif; font-weight: normal; line-height: 100%; text-align: left;">In
vertical LinearLayout,all children are stacked one after another,so
a vertical list will only have one child per row,no matter how wide
they are and a horizontal list will only be one row high. </span><span lang="en" style="font-family: Verdana, sans-serif; line-height: 100%;"><span style="font-weight: normal;">You
can specify the layout direction with the </span></span><span lang="en" style="font-family: Verdana, sans-serif; line-height: 100%;"><u><span style="font-weight: normal;">android:orientation
</span></u></span><span lang="en" style="font-family: Verdana, sans-serif; line-height: 100%;"><span style="font-weight: normal;">attribute
or</span></span><span lang="en" style="font-family: Verdana, sans-serif; line-height: 100%;"><u><span style="font-weight: normal;">
setOrientation() </span></u></span><span lang="en" style="font-family: Verdana, sans-serif; line-height: 100%;"><span style="font-weight: normal;">method.</span></span></div>
<div style="font-family: Verdana, sans-serif; font-weight: normal; line-height: 16px; text-align: left;">
<span lang="en" style="line-height: 100%;"><br /></span></div>
<div style="font-family: Verdana, sans-serif; line-height: 16px; text-align: left;">
<span lang="en" style="line-height: 100%;">Gravity:<span style="font-weight: normal;"> which specifies the alignment of all the child elements(right,
center,or left alignment) by calling </span></span><span lang="en" style="font-weight: normal; line-height: 100%;"><u>setGravity()
</u></span><span lang="en" style="font-weight: normal; line-height: 100%;">method
or </span><span lang="en" style="font-weight: normal; line-height: 100%;"><u>android:gravity
</u></span><span lang="en" style="font-weight: normal; line-height: 100%;">attribute.</span></div>
</span></h3>
<h3>
<div style="font-family: Verdana, sans-serif; font-size: medium; font-weight: normal; line-height: 19px; text-align: left;">
<span lang="en" style="line-height: 100%;">LinearLayout
also supports assigning a weight to individual children with the </span><span lang="en" style="line-height: 100%;"><u>android:layout_weight
</u></span><span lang="en" style="line-height: 100%;">attribute.
This attribute assigns an "importance" value to a view in
terms of how much space is should occupy on the screen. A larger
weight value allows it to expand to fill any remaining space in the
parent view. Child views can specify a weight value, and then any
remaining space in the view group is assigned to children in the
proportion of their declared weight. Default weight is zero.</span></div>
</h3>
</div>
</li>
<li>
<div align="JUSTIFY" style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil8HzO66w1nH62q_EgkOlQCGnoAdkCzQCbt7_eQk9NWhMBgdtIf_I3KSZjhIpwVTqZxosT0ObmOOQubep0p21Wf5V7kANbZrDDk2G48C2tsLSccD4-52GWotA6bEWi5RvZA4OqpCnsIwjZ/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil8HzO66w1nH62q_EgkOlQCGnoAdkCzQCbt7_eQk9NWhMBgdtIf_I3KSZjhIpwVTqZxosT0ObmOOQubep0p21Wf5V7kANbZrDDk2G48C2tsLSccD4-52GWotA6bEWi5RvZA4OqpCnsIwjZ/s320/1.png" width="320" /></a></span></div>
<div align="JUSTIFY" style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
</ul>
<div align="CENTER" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.64cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: medium;"><span lang="en"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.64cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: medium;"><span lang="en"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.64cm;">
<div style="text-align: left;">
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">LinearLayout</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 10.0pt;">
<span style="color: #7f007f;">android:layout_width</span>=<i><span style="color: #2a00ff;">"match_parent"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 10.0pt;">
<span style="color: #7f007f;">android:layout_height</span>=<i><span style="color: #2a00ff;">"wrap_content"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 10.0pt;">
<span style="color: #7f007f;">android:orientation</span>=<i><span style="color: #2a00ff;">"horizontal"</span></i>
<span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">TextView</span><span style="font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 10.0pt;">
<span style="color: #7f007f;">android:id</span>=<i><span style="color: #2a00ff;">"@+id/personinformation_txtvw_title"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 10.0pt;">
<span style="color: #7f007f;">android:layout_width</span>=<i><span style="color: #2a00ff;">"0dp"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">android:layout_height</span>=<i><span style="color: #2a00ff;">"wrap_content"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 10.0pt;">
<span style="color: #7f007f;">android:layout_weight</span>=<i><span style="color: #2a00ff;">"1"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 10.0pt;">
<span style="color: #7f007f;">android:gravity</span>=<i><span style="color: #2a00ff;">"center"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 10.0pt;">
<span style="color: #7f007f;">android:text</span>=<i><span style="color: #2a00ff;">"@string/title"</span></i> <span style="color: teal;">/></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 107%;"> </span><span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 107%;"></</span><span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt; line-height: 107%;">LinearLayout</span><span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 107%;">></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal">
<o:p></o:p></div>
</div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[2]</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en-US"><span style="font-style: normal;"><u><b>
RelativeLayout</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">RelativeLayout
is a view group that displays child views in relative positions. The
position of each view can be specified as relative to sibling
elements (such as to the left-of or below another view) or in
positions relative to the parent RelativeLayout area (such as
aligned to the bottom, left of center).</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">if
you find yourself using several nested LinearLayout groups, you may
be able to replace them with a single RelativeLayout ,which improves
performance .</span></span></span></span></span></span></span></div>
</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgWx8oHlp64Afx1b3du_Ygl18YrvawsjyIgNe1Yj3Rvh2n9m9dJFKTjW5SzJKueQsQMeC1FQqXVkwR4dNY5CgiMpqq7MPeMjTDAo8lgLHbra23QdoYzDpxA-pmNOj_54kiPxETd05AHcTE/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgWx8oHlp64Afx1b3du_Ygl18YrvawsjyIgNe1Yj3Rvh2n9m9dJFKTjW5SzJKueQsQMeC1FQqXVkwR4dNY5CgiMpqq7MPeMjTDAo8lgLHbra23QdoYzDpxA-pmNOj_54kiPxETd05AHcTE/s320/2.png" width="320" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[3]</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>FrameLayout</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">FrameLayout
should be used to hold a single child view, because it can be
difficult to organize child views in a way that's scalable to
different screen sizes without the children overlapping each other. </span></span></span></span></span></span></span>
</div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">FrameLayout
contain many widgets but only one will appear at a time.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">control
the position of multiple children within a FrameLayout by assigning
gravity to each child,using </span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">android:layout_gravtiy
</span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">attribute.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">child
view are drawn in a stack,with the most recently added child on top.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
size of the FrameLayout is the size of its largest child(with
padding),visible or not(if FrameLayout's parnt permits).</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgumTktIXscnJHlDFvyVIQiYfYpjzuuTrPSI9QgfVTN_NkN-VtS7sA272dZqeOZlOOzaNJQ_0XylsrcGNm6MkHcrryTQ85Bcmom6Vgx5VfHyFCPPa0Li-iCkQS8BWwfgRfwVeoZdHKYRq9u/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgumTktIXscnJHlDFvyVIQiYfYpjzuuTrPSI9QgfVTN_NkN-VtS7sA272dZqeOZlOOzaNJQ_0XylsrcGNm6MkHcrryTQ85Bcmom6Vgx5VfHyFCPPa0Li-iCkQS8BWwfgRfwVeoZdHKYRq9u/s1600/3.png" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
</span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[4]</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>
TabularLayout</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">A
layout that arranges its children into rows and columns.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">TableLayout
containers do not display border lines for their rows, columns, or
cells. Each row has zero or more cells; each cell can hold one View
object. </span></span></span></span></span></span></span>
</div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
table has as many columns as the row with the most cells.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">a
TableLayout can specify certain columns as shrinkable or stretchable
.</span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> <span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">setColumnShrinkable()</span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
:- the column width can be shrunk to fit the table
into its parent object. </span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">setColumnStretchable()</span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
:- it can expand in width to fit any extra
space. The total width of the
table is defined by its parent container.</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">
setColumnCollapsed() </span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">:-
hide a column .</span></span></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">children
of a TableLayout </span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">cannot
specify the layout_width attribute.</span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">
Width </span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">is
always </span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">MATCH_PARENT</span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">.
However, the </span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">layout_height
</span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">attribute
can be defined by a child; </span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">default
value is WRAP_CONTENT</span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">.
If the child is a TableRow, then the height is always WRAP_CONTENT.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Cells
must be added to a row in increasing column order, both in code and
XML. Column numbers are zero-based. If you don't specify a column
number for a child cell, it will autoincrement to the next available
column. If you skip a column number, it will be considered an empty
cell in that row.</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXiFvSwGpJxHx6TFeSQmkCNv2fOLQGsvHf_8lWOMKAhxDOLn9HZ8So9hg1Vw1lLRG31FpUjmnRF6im_Vz4Z5m1PwT1axkAZIItUM3dTHba6VloF7UYfQx4yGngNC_MmTCXpqYZXalxmbMm/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXiFvSwGpJxHx6TFeSQmkCNv2fOLQGsvHf_8lWOMKAhxDOLn9HZ8So9hg1Vw1lLRG31FpUjmnRF6im_Vz4Z5m1PwT1axkAZIItUM3dTHba6VloF7UYfQx4yGngNC_MmTCXpqYZXalxmbMm/s320/4.png" width="232" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[5]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>AbsoluteLayout</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">AbsoluteLayout
specify exact lacation(X/ Y coordinates) of its children means
Per-child layout information.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">Absolute
layouts are less flexible and harder to maintain than other types
of layouts without absolute positioning.</span></span></span></span></span></span></span></div>
</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOgCMrf9w_j6jL8OAcmIo-9Ta8DBryIwEmneAmcAbzUKHa5Ef3wajB8intDZ7_Z5NNuI8GS-49x_-eNEN0oxxsfm2J4K4zlKBvkz7GF_3ILmnKbQTvHRvq-e_1Qrh0oc8x7YNkcCAlXa30/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="127" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOgCMrf9w_j6jL8OAcmIo-9Ta8DBryIwEmneAmcAbzUKHa5Ef3wajB8intDZ7_Z5NNuI8GS-49x_-eNEN0oxxsfm2J4K4zlKBvkz7GF_3ILmnKbQTvHRvq-e_1Qrh0oc8x7YNkcCAlXa30/s320/5.png" width="320" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.54cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[6]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>Buttons</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">A
button consists of text that communicates what action occurs when
the user touches it. </span></span></span></span></span></span></span>
</div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Android
supports two different types of buttons:</span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.12cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> 1)
basic buttons</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.12cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> i)
default</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.12cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> ii)small</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.12cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> 2)
borderless buttons</span></span></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">Basic
buttons </span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">are
traditional buttons with borders and background.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">Default
buttons </span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">have
slightly larger font size and are optimized for display outside of
form content</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">Small
buttons </span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">are
intended for display alongside other content. They have a smaller
font and smaller minimum height. Use small buttons in forms where
they need to align with other UI elements. </span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.54cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.54cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> [Default
Bsuttons] [Small Buttons]</span></span></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">Borderless
buttons</span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
resemble basic buttons except that they have no borders or
background. You can use borderless buttons with both icons and text.
Borderless buttons are visually more lightweight than basic buttons.</span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.54cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> <Button</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.54cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> <span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_text" /></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.54cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnXufle_RfYe-vImQkPZo-dhTLUpoKmA9klyvpz-6pJLZg-YwnZriU2BRUnqJQUEAkIzl36b-uL7hhSOjcrtZPRYOa_3vE0kAd-rO2d-BC8GFDaT-6Z-4XGdr1s2BrvqAb14wRf8nUnIDc/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="64" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnXufle_RfYe-vImQkPZo-dhTLUpoKmA9klyvpz-6pJLZg-YwnZriU2BRUnqJQUEAkIzl36b-uL7hhSOjcrtZPRYOa_3vE0kAd-rO2d-BC8GFDaT-6Z-4XGdr1s2BrvqAb14wRf8nUnIDc/s320/6.png" width="320" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.54cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[7]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>ImageView</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Use
“android.widget.ImageView” class to display an image file. </span></span></span></span></span></span></span>
</div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Image
file is easy to use but hard to master, because of the various
screen and dpi in Android devices.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Put
your images into folder “res/drawable-ldpi“, “res/drawable-mdpi”
or “res/drawable-hdpi“.</span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: teal;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;"><</span></u></span></span></span></span><span style="color: #3f7f7f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">ImageView</span></u></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">
</span></u></span></span></span></span></span>
</div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:id</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"@+id/home_imgv_penguins"</span></span></i></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_height</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"150dp"</span></span></i></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_width</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"100dp"</span></span></i></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_margin</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"5dp"</span></span></i></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>android:</b></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><b>src</b></span></span></span></span></span><span style="color: black;"><span style="font-size: small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>=</b></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: small;"><span lang="en"><i><span style="text-decoration: none;"><b>"@drawable/penguins</b></span></i></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"</span></span></i></span></span></span><span style="color: teal;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">/></span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
</span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[8]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>ImageButton</b></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span></span>
</div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">A
button with an image (instead of text) that can be pressed or
clicked by the user </span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">The
image on the surface of the button is defined either by the
android:src attribute in the XML element or by
the setImageResource(int) method. </span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">To
remove the standard button background image, define your own
background image or set the background color to be transparent. </span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">define
a different image to show different states(focused,selected,etc..) </span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span>
</span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.12cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
E.g., a blue image by default, an orange one for when
focused, a yellow one for when pressed.</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.12cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGVgMwkVpvjg18aBcgrt4K76-yuRfEaidL6EZzWBtOso2v1-L0LTYkIkIOauRFr0fYC0gpJyL2K7RUlYzrXC3mPDq9b_AVt3QaaLrdOpDQbaGKmS8AYZ62yjnMZ1bTVpk1vP1vbVQYfvh7/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="145" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGVgMwkVpvjg18aBcgrt4K76-yuRfEaidL6EZzWBtOso2v1-L0LTYkIkIOauRFr0fYC0gpJyL2K7RUlYzrXC3mPDq9b_AVt3QaaLrdOpDQbaGKmS8AYZ62yjnMZ1bTVpk1vP1vbVQYfvh7/s320/7.png" width="320" /></a></span></span></span></div>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<br />
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.12cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: teal;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"><</span></span></span></span></span></span><span style="color: #3f7f7f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">ImageButton</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:id</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"@+id/home_imgbtn_repeatactive"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_height</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"wrap_content"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_width</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"wrap_content"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:src</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"@drawable/repeatactive"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_marginLeft</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"30dp"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_marginTop</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"90dp"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:background</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"@android:color/transparent"</span></span></i></span></span></span><span style="color: teal;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">/></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[9]</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>ImageSwitcher</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">ImageSwitcher
is a view useful to switch smoothly between two images and thus
provides ways of transitioning from one to another through
appropriate animations.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">concept
of showing a gallery of images that scrolls at the top of the
android screen landscape and upon selection of one image, it gets
displayed as a larger image in the lower part through the use of an
ImageSwitcher</span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.54cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5kKP3Xjf8Aoq0qHR5BTieJiCjpFtbeuzSofd8nd8a2xnKs3Ji5PL73dDt6g3WfIWxE3MvRj5-Iew78z5D5uPVmZPnvg1evEMVKHGlia7HvpQ77mPB2p3yxFbOzpyBcAWpyLN0ws1rwdkD/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5kKP3Xjf8Aoq0qHR5BTieJiCjpFtbeuzSofd8nd8a2xnKs3Ji5PL73dDt6g3WfIWxE3MvRj5-Iew78z5D5uPVmZPnvg1evEMVKHGlia7HvpQ77mPB2p3yxFbOzpyBcAWpyLN0ws1rwdkD/s1600/8.png" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 2.54cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> <Gallery
android:id="@+id/Gallery01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"> </Gallery></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> <ImageSwitcher
android:id="@+id/ImageSwitcher01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </ImageSwitcher></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[10]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>ScrollView</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">A
ScrollView is a FrameLayout, meaning you should place one child
in it containing the entire contents to scroll; this child may
itself be a layout manager with a complex hierarchy of objects. </span></span></span></span></span></span></span>
</div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">A
child that is often used is a LinearLayout in a vertical
orientation, presenting a vertical array of top-level items that the
user can scroll through.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">You
should never use a ScrollView with a ListView, because ListView
takes care of its own vertical scrolling.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">ScrollView
only supports vertical scrolling. For horizontal scrolling, use
HorizontalScrollView.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
ScrollView can have only one child control, so we can make a
container (Linear, relative, Table Layouts) the child of the
ScrollView and put all the controls inside this child.</span></span></span></span></span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg28oRtdJXfrQfrpbOo13fsyX9iXXUEHN7bwi6J0stvyAJXz30hbaPi5j4J-4nPoFLCT23t5yWWZG7EEqW0k5LMm8v6xbFPMn-w3lffVEbmn4guQzOrzcioGCzVD6Y3t1IbiA4CPDfgfVnh/s1600/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg28oRtdJXfrQfrpbOo13fsyX9iXXUEHN7bwi6J0stvyAJXz30hbaPi5j4J-4nPoFLCT23t5yWWZG7EEqW0k5LMm8v6xbFPMn-w3lffVEbmn4guQzOrzcioGCzVD6Y3t1IbiA4CPDfgfVnh/s320/9.png" width="245" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> [Horizontal
And Vertical ScrollView]</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.75cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> <span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><b>a.
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>HorizontalScrollView
</b></u></span></span></span></span></span>
</div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">HorizontalScrollView
only supports horizontal scrolling. For vertical scrolling, use
either ScrollView or ListView. </span></span></span></span></span></span></span>
</div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"><HorizontalScrollView</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">android:id="@+id/listview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> android:background="#ddd"
></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
<LinearLayout</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
android:orientation="horizontal" ></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> <span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
</LinearLayout></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"></HorizontalScrollView></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.5cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> <span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><b>b.
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>VerticalScrollView</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">By
default Scrollview is VerticalScrollView.</span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[11]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>View</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">A
View occupies a rectangular area on the screen and is responsible
for drawing and event handling. </span></span></span></span></span></span></span>
</div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">View
is the base class for widgets, which are used to create interactive
UI components (buttons, text fields, etc.).</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
ViewGroup subclass is the base class for layouts, which are
invisible containers that hold other Views (or other ViewGroups) and
define their layout properties.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">views
in a window are arranged in a single tree. </span></span></span></span></span></span></span>
</div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">Add
views either from code or by specifying a tree of views in one or
more XML layout files. There are many specialized subclasses of
views that act as controls or are capable of displaying text,
images, or other content. </span></span></span></span></span></span></span>
</div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><b>[12]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>ListView</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">ListView
is a view group that displays a list of scrollable items. The list
items are automatically inserted to the list using an Adapter .</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUU7MMEiFa8xRpRCP5bCcFKW-KHzN0e5ttaiSbouGQ_5edkqqVW1E_jam4jSj2saqBT41_2mFPa8qWhDzDuoClCJsVk6-qWNEBIbCwtr2HFVPhAKquPTi7kTj42DjJ2kcZoC3NKONFNCVP/s1600/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUU7MMEiFa8xRpRCP5bCcFKW-KHzN0e5ttaiSbouGQ_5edkqqVW1E_jam4jSj2saqBT41_2mFPa8qWhDzDuoClCJsVk6-qWNEBIbCwtr2HFVPhAKquPTi7kTj42DjJ2kcZoC3NKONFNCVP/s320/10.png" width="320" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
</ul>
<div align="CENTER" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.98cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
adapter is assigned to the ListView via the setAdapter method on the
ListView object.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">An
adapter extend the BaseAdapter class. Android provides some standard
adapters; the most important are ArrayAdapter and CursorAdapter.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">ArrayAdapter
can handle data based on Arrays or java.util.List.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">SimpleCursorAdapter
can handle database related data.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">ArrayAdapter
uses the toString() method of the data input object to determine the
String which should be displayed.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
ArrayAdapter class allows to remove all elements in its underlying
data structure with the clear() method call. You can then add new
elements via the add() method or a Collection via the addAll()
method.</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[13]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>SeekBar</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">A
SeekBar is an extension of ProgressBar that adds a draggable thumb.
The user can touch the thumb and drag left or right to set the
current progress level or use the arrow keys. Placing focusable
widgets to the left or right of a SeekBar is discouraged.</span></span></span></span></span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7UYv4aSN62ZtXfZeyilgYYfoNh6Hc1NrlSnjKgIEjrHJqZPlUhPSA9O01RCpSW0BQ1-SjkVJoZ5yjtMwXgUSL2gthqV9wk9fIQ7_jQhJH8pcHyadYTQeNyqvCyiqpVPHIxwGXlN-kxlPm/s1600/11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="189" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7UYv4aSN62ZtXfZeyilgYYfoNh6Hc1NrlSnjKgIEjrHJqZPlUhPSA9O01RCpSW0BQ1-SjkVJoZ5yjtMwXgUSL2gthqV9wk9fIQ7_jQhJH8pcHyadYTQeNyqvCyiqpVPHIxwGXlN-kxlPm/s320/11.png" width="320" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
seekbar has three states: drag start, changing and drag ended. </span></span></span></span></span></span></span>
</div>
</li>
</ul>
<div align="CENTER" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.98cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> </span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[14]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>ProgressBar</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Visual
indicator of progress to the user representing how far the operation
has progressed; the application can change the amount of progress
(modifying the length of the bar) as it moves forward.</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2IgmYI-WFbRtu-XyeJL7PB2G_dKQqpJV0z8czFPe2qVyg8z1JWE7RjPJxUIsH7Z_bt1rMue_5BoZ-y8v9hLYoHEG6-XryjHfF_r3ibai-jyjCIJD0bHaWlVhtwadZW-mjLSSuDxuAZ6wy/s1600/12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="116" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2IgmYI-WFbRtu-XyeJL7PB2G_dKQqpJV0z8czFPe2qVyg8z1JWE7RjPJxUIsH7Z_bt1rMue_5BoZ-y8v9hLYoHEG6-XryjHfF_r3ibai-jyjCIJD0bHaWlVhtwadZW-mjLSSuDxuAZ6wy/s320/12.png" width="320" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">There
is also a secondary progress displayable on a progress bar which is
useful for displaying intermediate progress, such as the buffer
level during a streaming playback progress bar.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">In
indeterminate mode, the progress bar shows a cyclic animation
without an indication of progress. This mode is used by applications
when the length of the task is unknown.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">The
indeterminate progress bar can be either a spinning wheel or a
horizontal bar.</span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.37cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> <ProgressBar</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.37cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> <span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@android:style/Widget.ProgressBar.Small"
android:layout_marginRight="5dp" /> </span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.64cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[15]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>RatingBar</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">A
RatingBar is an extension of SeekBar and ProgressBar that shows a
rating in stars.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
user can touch/drag or use arrow keys to set the rating when using
the default size RatingBar.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
number of stars set (via setNumStars(int) or in an XML layout) will
be shown when the layout width is set to wrap content (if another
layout width is set, the results may be unpredictable).</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ3B9ox6zLdBa95_4Nrl69P7jOgWkpcpne8AbjOSsVzNxhwsjAgnn59XA6s0meJ7-IsyFDzqNGaZje6ND_fV7aoWhIiAvat809I-spSPzrDl1joFyr54Z0gpR4qaKcraROxohZCxKSSHh6/s1600/13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="136" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ3B9ox6zLdBa95_4Nrl69P7jOgWkpcpne8AbjOSsVzNxhwsjAgnn59XA6s0meJ7-IsyFDzqNGaZje6ND_fV7aoWhIiAvat809I-spSPzrDl1joFyr54Z0gpR4qaKcraROxohZCxKSSHh6/s320/13.png" width="320" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.64cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: teal;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"><</span></span></span></span></span></span><span style="color: #3f7f7f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">RatingBar</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:id</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"@+id/home_ratingBar1"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_width</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"fill_parent"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_height</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"wrap_content"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_marginLeft</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"100dp"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_marginTop</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"60dp"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:stepSize</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"0.84"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:rating</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"2.5"</span></span></i></span></span></span><span style="color: teal;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">/></span></span></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">In
this case, the rating bar contains 4 stars, each increase 1.0 value,
so, it contains the minimum of 1.0 (1 star) and maximum value of 4.0
(4 stars). In addition, it made the 2nd star (2.0) selected by
default.</span></span></span></span></span></span></span></div>
</li>
</ul>
<div align="CENTER" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.64cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[16]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>ToggleButton</b></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">A
toggle button allows the user to change a setting between two
states.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">Add
a basic toggle button to your layout with the ToggleButton object. </span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">Android
4.0 (API level 14) introduces another kind of toggle button called a
switch that provides a slider control, which you can add with a
Switch object.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
ToggleButton and Switch controls are subclasses of CompoundButton .</span></span></span></span></span></span></span></div>
</li>
</ul>
<div align="CENTER" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">[Toggle
Button]</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<div align="CENTER" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Switches
(in Android 4.0+)</span></span></span></span></span></span></span></div>
<div align="CENTER" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAkLodW0mDCnQ4nKbvwax7PoRZMLt71y_xkyqx14afZQICrYqE67iUcXk8GslZENscctoafqlZOHqBozjh6Kb0fBSbQR89cuo6Xci4ll8_TLk1tP3hMhwBkSmWOZBTk5lwWL4tBXrziYQm/s1600/14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAkLodW0mDCnQ4nKbvwax7PoRZMLt71y_xkyqx14afZQICrYqE67iUcXk8GslZENscctoafqlZOHqBozjh6Kb0fBSbQR89cuo6Xci4ll8_TLk1tP3hMhwBkSmWOZBTk5lwWL4tBXrziYQm/s320/14.png" width="320" /></a></span></div>
<div align="CENTER" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> <ToggleButton
</span></span></span></span></span></span></span>
</div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
android:id="@+id/togglebutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOn="Vibrate on"
android:textOff="Vibrate off"
android:onClick="onToggleClicked"/></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[17]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>TextView</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Displays
text to the user .</span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: teal;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"><</span></span></span></span></span></span><span style="color: #3f7f7f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">TextView</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span></span>
</div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
</span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:id</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"@+id/home_txtv_142bpm"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_height</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"wrap_content"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_width</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"wrap_content"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:text</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"</span></span></i></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en-US"><i><span style="text-decoration: none;"><span style="font-weight: normal;">This
is textview</span></span></i></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_marginTop</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"150dp"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_marginLeft</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"120dp"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:textColor</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"#FFD700"</span></span></i></span></span></span><span style="color: teal;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">/></span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[18]</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>
EditText View</b></u></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: teal;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"><</span></span></span></span></span></span><span style="color: #3f7f7f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">EditText</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
</span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:id</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"@+id/second_edttxt"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_width</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"fill_parent"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_height</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"wrap_content"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:hint</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"@string/edttxt"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:inputType</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"number"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: teal;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">/></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[19]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>Spinner</b></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span></span>
</div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">A
view that displays one child at a time and lets the user pick among
them.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">In
the default state, a spinner shows its currently selected value.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Touching
the spinner displays a dropdown menu with all other available
values, from which the user can select a new one.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">The
items in the Spinner come from the Adapter associated with this
view.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">if
the available choices for your spinner are pre-determined, you can
provide them with a string array defined in a string resource file:</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikyHiD4uUUP5oVnXz0hKdARv5ySmQScIzQrJGV0GhVJe775-v8LCjQ2oV6lQJZLAeB-yoSZVPD7QxszZlVC7z49DCD40pDX3_wFv2oAGBSHCFShrIFL7199rEmzO13ROS2ZRXxY5tuQInq/s1600/15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikyHiD4uUUP5oVnXz0hKdARv5ySmQScIzQrJGV0GhVJe775-v8LCjQ2oV6lQJZLAeB-yoSZVPD7QxszZlVC7z49DCD40pDX3_wFv2oAGBSHCFShrIFL7199rEmzO13ROS2ZRXxY5tuQInq/s320/15.png" width="252" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> <?xml
version="1.0" encoding="utf-8"?></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> <resources></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> <string-array
name="planets_array"></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> <item>Mercury</item></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> <item>Venus</item></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> <span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
<item>Uranus</item></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> <item>Neptune</item></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> <span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
</string-array></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</resources> </span></span></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">to
supply the spinner with the array using an instance of ArrayAdapter:</span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.48cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> Spinner
spinner = (Spinner) findViewById(R.id.spinner);</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.48cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> //
Create an ArrayAdapter using the string array and a default
spinner layout</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.48cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> ArrayAdapter<CharSequence>
adapter
=ArrayAdapter. createFromResource(this,R.array.planets_array,
android.R.layout.simple_spinner_item);</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.48cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> //
Specify the layout to use when the list of choices appears</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.48cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> adapter.setDropDownViewResource (android.R.layout.simple_spinner_dropdown_item);</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.48cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> //
Apply the adapter to the spinner</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.48cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> spinner.setAdapter(adapter);</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[20]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>Video
View</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Use
for displays a video file.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
VideoView class can load images from various sources (such as
resources or content providers), takes care of computing its
measurement from the video so that it can be used in any layout
manager, and provides various display options such as scaling and
tinting.</span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[21]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>Dialog</b></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">A
dialog is a small window that prompts the user to make a decision or
enter additional information.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">A
dialog does not fill the screen and is normally used for modal
events that require users to take an action before they can proceed.</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9aOs-bCR6MaBKvpUJt5UHSnnqC5pfVRRUDyhRGcvjU68tEuKGf0xwVT_2DkU2TfitwLkXk6Rebc2aY1hMkspUgMWLRQOjf8YGMea-nVBIZ1EYFJN__D3DYjm31BDBJ_MLWa_jSJmYqksu/s1600/16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9aOs-bCR6MaBKvpUJt5UHSnnqC5pfVRRUDyhRGcvjU68tEuKGf0xwVT_2DkU2TfitwLkXk6Rebc2aY1hMkspUgMWLRQOjf8YGMea-nVBIZ1EYFJN__D3DYjm31BDBJ_MLWa_jSJmYqksu/s320/16.png" width="320" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">AlertDialog</span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
:- A dialog that can show a title, up to three
buttons, a list of selectable items, or a custom layout.</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">DatePickerDialog</span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
:- A dialog that allows the user to select a date </span></span></span></span></span></span></span>
</div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><span style="font-weight: normal;">TimePickerDialog</span></u></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
:- A dialog that allows the user to select a Time</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[22]</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>
DatePickerDialog</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Android
provides controls for the user to pick a date as ready-to-use
dialogs. </span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">Each
picker provides controls for selecting each part of the date (month,
day, year). </span></span></span></span></span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIa4bJriLdWanm_7PPuloTwKbB0Oe6uhu-t8pcJwdKnJvmHyueOk7xTa43y5C2lJrUG756TdDa88Z-AMcY5drDE-nx_qZMDhdpicMLjyUHxAE400sUhKfxmAMpDaP2jPLP0-2MlnnLDkPR/s1600/18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIa4bJriLdWanm_7PPuloTwKbB0Oe6uhu-t8pcJwdKnJvmHyueOk7xTa43y5C2lJrUG756TdDa88Z-AMcY5drDE-nx_qZMDhdpicMLjyUHxAE400sUhKfxmAMpDaP2jPLP0-2MlnnLDkPR/s1600/18.png" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> </span></span></span></span></span></span>
</span></div>
</li>
</ul>
<div align="CENTER" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 1.5cm; text-indent: -1.27cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[23]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>TimePickerDialog</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Android
provides controls for the user to pick a time as ready-to-use
dialogs. </span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Each
picker provides controls for selecting each part of the time (hour,
minute, AM/PM)</span></span></span></span></span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh02QDklBDe2Ufgx2i7AT9NsLdRlwqmpHX4hRO5UoA0HKbG4LmAzUBHl7YxkU-975J9n-QXJO_Hzg4qiYpVhNvM21PcrrocaDkohtW5keECgxTiWQqKz3Xl8etbCW6whoVWA0fYXnJ-h98u/s1600/19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh02QDklBDe2Ufgx2i7AT9NsLdRlwqmpHX4hRO5UoA0HKbG4LmAzUBHl7YxkU-975J9n-QXJO_Hzg4qiYpVhNvM21PcrrocaDkohtW5keECgxTiWQqKz3Xl8etbCW6whoVWA0fYXnJ-h98u/s320/19.png" width="320" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[24]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>AlertDialog</b></u></span></span></span></span></span></div>
<ul style="text-align: left;"><ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">A
subclass of Dialog that can display one, two or three buttons. </span></span></span></span></span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4jBPGD9vUc2NERlw33bAjjRhyHy4isc_RvzpcabFqDCBBpQaglQoJyHN7BsG9IeqmazDwNJnSQjp4nPqXj8n69P7402Y1G1jWc7qylpoOonMmtPR5P4zoE_ekljfm2l3QB1Iw745Iz2HU/s1600/20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="148" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4jBPGD9vUc2NERlw33bAjjRhyHy4isc_RvzpcabFqDCBBpQaglQoJyHN7BsG9IeqmazDwNJnSQjp4nPqXj8n69P7402Y1G1jWc7qylpoOonMmtPR5P4zoE_ekljfm2l3QB1Iw745Iz2HU/s320/20.png" width="320" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
</ul>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[25]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>Gallery</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">This
class was deprecated in API level 16.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">A
view that shows items in a center-locked, horizontally scrolling
list.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
default values for the Gallery assume you will be using
Theme_galleryItemBackground as the background for each View given to
the Gallery from the Adapter.</span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[26]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>PassWordField</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">you
can use “android.widget.EditText“, with
inputType="textPassword" to render a password component.</span></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b> </b></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: teal;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"><</span></span></span></span></span></span><span style="color: #3f7f7f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">EditText</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
</span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:id</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"@+id/</span></span></i></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en-US"><i><span style="text-decoration: none;"><span style="font-weight: normal;">txt_password</span></span></i></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_width</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"fill_parent"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:layout_height</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">=</span></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: x-small;"><span lang="en"><i><span style="text-decoration: none;"><span style="font-weight: normal;">"wrap_content"</span></span></i></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">android:hint</span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">="Enter
password"</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span></span><span style="color: black;"><span style="font-size: x-small;"><span lang="en-US"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: #7f007f;"><span style="font-size: small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>android:inputType</b></span></span></span></span></span><span style="color: black;"><span style="font-size: small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>=</b></span></span></span></span></span><span style="color: #2a00ff;"><span style="font-size: small;"><span lang="en"><i><span style="text-decoration: none;"><b>"number"</b></span></i></span></span></span><span style="color: black;"><span style="font-size: small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>
</b></span></span></span></span></span><span style="color: teal;"><span style="font-size: x-small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">/></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[27]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>AddressField</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">A
class representing an Address, i.e, a set of Strings describing a
location. The addres format is a simplified version of xAL
(eXtensible Address Language) .</span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[28]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>RadioButton</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Radio
buttons allow the user to select one option from a set.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">A
radio button is a two-states button that can be either checked or
unchecked. </span></span></span></span></span></span></span>
</div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">When
the radio button is unchecked, the user can press or click it to
check it.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Radio
buttons are normally used together in a RadioGroup. When several
radio buttons live inside a radio group, checking one radio button
unchecks all the others.</span></span></span></span></span></span></span></div>
</li>
</ul>
<div align="CENTER" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiQfvakCWT82cT-4_jgYp7CLBRAzbnk1vzi3UlQ5j9JbicVCmVdrGfafRnGuw41hjUyJOBSIiMR9383AhgCENt6dvq9jEIzL5ex7FfJ4ZZpgLylizrhBN621WgumuR9LIX2dV-LRwenEy-/s1600/21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiQfvakCWT82cT-4_jgYp7CLBRAzbnk1vzi3UlQ5j9JbicVCmVdrGfafRnGuw41hjUyJOBSIiMR9383AhgCENt6dvq9jEIzL5ex7FfJ4ZZpgLylizrhBN621WgumuR9LIX2dV-LRwenEy-/s1600/21.png" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
</div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> <RadioGroup</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> android:id="@+id/radioSex"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<RadioButton</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
android:id="@+id/radioMale"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/radio_male"
android:checked="true" /></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
<RadioButton</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
android:id="@+id/radioFemale"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/radio_female" /></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> <span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
</RadioGroup> </span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[29]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>CheckBox</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">A
checkbox is a specific type of two-states button that can be either
checked or unchecked.</span></span></span></span></span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsK2LXrTlR4-8tgsdFSzA3iDvDyzaL8_SgtpkHTaFlhgWVfubukxhsI2_VHFIMgHf4nXGCxYlh-y0GOxvD7_mt3HdXOFwIbyg6vTuRiQhXCpZhnYiw6b-N9uUaAkpo3uk-jYipXGJfcRMD/s1600/22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsK2LXrTlR4-8tgsdFSzA3iDvDyzaL8_SgtpkHTaFlhgWVfubukxhsI2_VHFIMgHf4nXGCxYlh-y0GOxvD7_mt3HdXOFwIbyg6vTuRiQhXCpZhnYiw6b-N9uUaAkpo3uk-jYipXGJfcRMD/s1600/22.png" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
<CheckBox</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> <span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
android:id="@+id/chkAndroid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/chk_android"
android:checked="true" /></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[30]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>GridLayout</b></u></span></span></span></span></span></div>
<ul>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
grid is composed of a set of infinitely thin lines that separate the
viewing area into cells.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">grid
lines are referenced by grid indices.</span></span></span></span></span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgheLehgkHqIz-LAXR_A14jGMcbvULuN1u0tDpkOudVyxJwXzVP0kQRHFXtx_nbjNe9E7MQjgdwlT6JQIQq31cn_tBjT1noLrUkE9F3lSjNUXgdqhs688rpQaJeU5QezdyJ7OynaIhSEi7u/s1600/23.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgheLehgkHqIz-LAXR_A14jGMcbvULuN1u0tDpkOudVyxJwXzVP0kQRHFXtx_nbjNe9E7MQjgdwlT6JQIQq31cn_tBjT1noLrUkE9F3lSjNUXgdqhs688rpQaJeU5QezdyJ7OynaIhSEi7u/s1600/23.png" /></a></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">A
grid with N columns has N + 1 grid indices that run from 0 through N
inclusive. Regardless of how GridLayout is configured, grid index 0
is fixed to the leading edge of the container and grid index N is
fixed to its trailing edge.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Children
occupy one or more contiguous cells, as defined by their rowSpec and
columnSpec layout parameters. </span></span></span></span></span></span></span>
</div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Each
spec defines the set of rows or columns that are to be occupied; and
how children should be aligned within the resulting group of cells. </span></span></span></span></span></span></span>
</div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">If
a child does not specify the row and column,GridLayout assigns cell
locations automatically using its: orientation, rowCount and
columnCount properties.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">Space
between children may be specified either by using instances of the
dedicated Space view or by setting the leftMargin, topMargin,
rightMargin and bottomMargin layout parameters. When the
useDefaultMargins property is set, default margins around children
are automatically allocated.</span></span></span></span></span></span></span></div>
</li>
<li><div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">GridLayout's
distribution of excess space is based on priority rather than
weight.</span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> <?xml
version="1.0" encoding="utf-8"?></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> <GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnCount="4"</span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
android:rowCount="4" </span></span></span></span></span></span></span>
</div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> android:orientation="horizontal"
></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> <span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
<TextView android:text=" R 1, C 1 " /></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> <TextView
android:text=" R 1, C 2 " /></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> <TextView
android:text=" R 1, C 3 " /></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> <TextView
android:text=" R 2, C 1 " /></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> <TextView
android:text=" R 2, C 2 " /></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> <span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
<TextView android:text=" R 2, C 3 " /></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> <span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
<TextView android:text=" R 3, C 1 " /></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;"> <span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
<TextView android:text=" R 3, C 2 " /></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> <TextView
android:text=" R 3, C 3 " /></span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> </GridLayout></span></span></span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><b>[31]
</b></span></span></span></span></span><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><u><b>Sliding
Drawer</b></u></span></span></span></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 0.64cm; text-indent: -0.64cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<ul>
<li><div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">SlidingDrawer
hides content out of the screen and allows the user to drag a handle
to bring the content on screen. </span></span></span></span></span></span></span>
</div>
</li>
<li><div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">SlidingDrawer
can be used vertically or horizontally. </span></span></span></span></span></span></span>
</div>
</li>
<li><div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">A
special widget composed of two children views: the handle, that the
users drags, and the content, attached to the handle and dragged
with it.</span></span></span></span></span></span></span></div>
</li>
<li><div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">The
size of the SlidingDrawer defines how much space the content will
occupy once slid out so SlidingDrawer should usually use
match_parent for both its dimensions.</span></span></span></span></span></span></span></div>
</li>
</ul>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
<SlidingDrawer</span></span></span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
android:id="@+id/drawer"</span></span></span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> android:layout_width="match_parent"</span></span></span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> android:layout_height="match_parent"</span></span></span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
android:handle="@+id/handle"</span></span></span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
android:content="@+id/content"></span></span></span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;">
<ImageView</span></span></span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> android:id="@id/handle"</span></span></span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> android:layout_width="88dip"</span></span></span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="text-decoration: none;">
<span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="font-weight: normal;"> android:layout_height="44dip"
/></span></span></span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</SlidingDrawer </span></span></span></span></span></span></span></div>
<div style="margin-bottom: 0cm; margin-left: 0.64cm; text-indent: -0.64cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="margin-bottom: 0cm; margin-left: 0.64cm; text-indent: -0.64cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span><span style="color: black;"><span style="font-size: small;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<div lang="en" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div align="CENTER" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div align="CENTER" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<div align="CENTER" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.23cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.48cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><span style="font-size: medium;"><span lang="en"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="font-weight: normal;"> </span></span></span></span></span></span></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div align="CENTER" style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.62cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm; margin-left: 0.64cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0.35cm;">
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com1tag:blogger.com,1999:blog-6618938227440490497.post-91813842478654943232013-02-15T05:55:00.000-08:002014-07-10T01:16:44.342-07:00Convert Pixel To Density Pixel<div dir="ltr" style="text-align: left;" trbidi="on"><h2 style="text-align: center;">How to convert pixel in desity pixel</h2><div><br />in android we need to pass <b>"dp" </b>as parameter of width and height at design time right?<br />at run time we want to pass value but that will be pass as a <b>"pixel" </b>so that we want to convert that pixel in to density pixel and here is the code to convert pixel in to density pixel.<br /><br /><br /></div><div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">int</span></b><span style="font-family: Consolas; font-size: 10pt;"> pading = 15;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"><br /></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">final</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">float</span></b><span style="font-family: Consolas; font-size: 10pt;"> SCALE = Activity_Home.</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">this</span></b><span style="font-family: Consolas; font-size: 10pt;">.getResources().getDisplayMetrics().</span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">density</span><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal"><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"><br /></span></div><div class="MsoNormal"><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">pading = (</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 115%;">int</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">)(pading * SCALE + 0.5f);</span><o:p></o:p><br /><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"><br /></span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"><br /></span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"><br /></span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"><br /></span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">form this code we will get <b>15dp </b>padding to given view.</span><br /><span style="font-family: Consolas; line-height: 115%;"><br /></span><div style="text-align: left;"><span style="font-family: Consolas;"><span style="line-height: 14px;"><b>mdpi: 1dp = 1px</b></span></span><span style="font-family: Consolas; line-height: 14px;"><b>ldpi: 1dp = 0.75px</b></span><span style="font-family: Consolas; line-height: 14px;"><b>hdpi: 1dp = 1.5px</b></span><span style="font-family: Consolas; line-height: 14px;"><b>xhdpi: 1dp = 2px</b></span></div></div></div></div>NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com0tag:blogger.com,1999:blog-6618938227440490497.post-90006254776214356242013-01-24T09:53:00.000-08:002013-01-24T22:09:14.657-08:00How To publish android application in market.<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: center;">
Process of publish an application in the android market (Google-Play).</h2>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="0" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="0" Name="Hyperlink"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="0" Name="Normal (Web)"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]-->
</div>
<div class="MsoNormal" style="line-height: 150%;">
<span style="color: black; font-family: "Times New Roman","serif";">Android Market:</span></div>
<div class="MsoNormal" style="line-height: 150%;">
<span style="color: black; font-family: "Times New Roman","serif";"><span style="mso-tab-count: 1;"> </span></span><span style="font-family: "Times New Roman","serif";"><a href="https://play.google.com/store">https://play.google.com/store</a><span style="color: black;"></span></span></div>
<div class="MsoNormal" style="line-height: 150%;">
<span style="color: black; font-family: "Times New Roman","serif";">Android Market now called Google Play is a digital-distribution
multimedia-content service from Google which includes an online store for
music, movies, books, and Android applications and games, as well as a cloud
media player.</span></div>
<div class="MsoNormal" style="line-height: 150%;">
<span style="color: black; font-family: "Times New Roman","serif";">For publishing the application in the market we need to check the
following points:</span></div>
<div class="MsoListParagraph" style="line-height: 150%; margin-left: .25in; mso-list: l0 level1 lfo1; tab-stops: list .25in; text-indent: -.25in;">
<span style="color: black; font-family: Symbol; font-size: 10.0pt; line-height: 150%; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><b style="mso-bidi-font-weight: normal;"><span style="color: black; font-family: "Times New Roman","serif";">Getting application
ready</span></b></div>
<div class="MsoListParagraph" style="line-height: 150%; margin-left: 1.0in; mso-list: l0 level2 lfo1; tab-stops: list 0in; text-indent: -.25in;">
<span style="color: black; font-family: "Times New Roman","serif"; mso-fareast-font-family: "Times New Roman";"><span style="mso-list: Ignore;">a.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span style="color: black; font-family: "Times New Roman","serif";">Request necessary android permission</span></div>
<div class="MsoListParagraph" style="line-height: 150%; margin-left: 1.0in; mso-list: l0 level2 lfo1; tab-stops: list 0in; text-indent: -.25in;">
<span style="color: black; font-family: "Times New Roman","serif"; mso-fareast-font-family: "Times New Roman";"><span style="mso-list: Ignore;">b.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span style="color: black; font-family: "Times New Roman","serif";">Specify a name and icon</span></div>
<div class="MsoListParagraph" style="line-height: 150%; margin-left: 1.0in; mso-list: l0 level2 lfo1; tab-stops: list 0in; text-indent: -.25in;">
<span style="color: black; font-family: "Times New Roman","serif"; mso-fareast-font-family: "Times New Roman";"><span style="mso-list: Ignore;">c.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span style="color: black; font-family: "Times New Roman","serif";">Configure<span style="mso-spacerun: yes;"> </span>version manifest
data</span></div>
<div class="MsoListParagraph" style="line-height: 150%; margin-left: 1.0in; mso-list: l0 level2 lfo1; tab-stops: list 0in; text-indent: -.25in;">
<span style="color: black; font-family: "Times New Roman","serif"; mso-fareast-font-family: "Times New Roman";"><span style="mso-list: Ignore;">d.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span style="color: black; font-family: "Times New Roman","serif";">Set compatibility option</span></div>
<div class="MsoListParagraph" style="line-height: 150%; margin-left: 1.0in; mso-list: l0 level2 lfo1; tab-stops: list 0in; text-indent: -.25in;">
<span style="color: black; font-family: "Times New Roman","serif"; mso-fareast-font-family: "Times New Roman";"><span style="mso-list: Ignore;">e.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span style="color: black; font-family: "Times New Roman","serif";">Cleanup file and removing logging</span></div>
<div class="MsoListParagraph" style="line-height: 150%; margin-left: 1.0in; mso-list: l0 level2 lfo1; tab-stops: list 0in; text-indent: -.25in;">
<span style="color: black; font-family: "Times New Roman","serif"; mso-fareast-font-family: "Times New Roman";"><span style="mso-list: Ignore;">f.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span style="color: black; font-family: "Times New Roman","serif";">Sign in and zip align the application</span></div>
<div class="MsoListParagraph" style="line-height: 150%; margin-left: .25in; mso-list: l0 level1 lfo1; tab-stops: list .25in; text-indent: -.25in;">
<span style="color: black; font-family: Symbol; font-size: 10.0pt; line-height: 150%; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><b style="mso-bidi-font-weight: normal;"><span style="color: black; font-family: "Times New Roman","serif";">Becoming a market
publisher</span></b></div>
<div class="MsoListParagraph" style="line-height: 150%; margin-left: 1.0in; mso-list: l0 level2 lfo1; tab-stops: list 0in; text-indent: -.25in;">
<span style="color: black; font-family: "Times New Roman","serif"; mso-fareast-font-family: "Times New Roman";"><span style="mso-list: Ignore;">a.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span style="color: black; font-family: "Times New Roman","serif";">Register as a publisher and setup your profile</span></div>
<div class="MsoListParagraph" style="line-height: 150%; margin-left: 1.0in; mso-list: l0 level2 lfo1; tab-stops: list 0in; text-indent: -.25in;">
<span style="font-family: "Times New Roman","serif"; mso-fareast-font-family: "Times New Roman";"><span style="mso-list: Ignore;">b.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span style="font-family: "Times New Roman","serif";">Read
and agree to the Android Market Developer Distribution Agreement.</span></div>
<div class="MsoListParagraph" style="line-height: 150%; margin-left: 1.0in; mso-list: l0 level2 lfo1; tab-stops: list 0in; text-indent: -.25in;">
<span style="font-family: "Times New Roman","serif"; mso-fareast-font-family: "Times New Roman";"><span style="mso-list: Ignore;">c.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span style="font-family: "Times New Roman","serif";">Pay
a registration fee of $25 USD via Google Checkout.</span></div>
<div style="line-height: 150%; margin-left: .5in;">
To publish applications on the
Android Market, you must be a registered developer. Head over to <b style="mso-bidi-font-weight: normal;">http://market.android.com/publish</b> and
sign in with your Google account. Next, fill out all the required information
along with your real phone number, which Google will use to contact you in the
event of an emergency or a problem with any of your Android applications. If
you can’t decide on a developer name, don’t worry. Just use your real name for
now – you can always change that later via your profile page.</div>
<div style="line-height: 150%; margin-left: .5in;">
You should read the <b style="mso-bidi-font-weight: normal;"><span style="mso-ansi-language: #00FF; mso-bidi-language: #00FF; mso-fareast-language: #00FF;">Android Market Developer
Distribution Agreement</span></b> carefully, as you are required to accept the
terms and you will be legally bound to them upon paying the registration fee.</div>
<div style="line-height: 150%; margin-left: .5in;">
Click the Google Checkout button
and pay the one-time registration fee and you’re done!</div>
<div style="line-height: 150%; margin-left: .5in;">
<br /></div>
<div style="line-height: 150%; margin-left: .5in;">
<br /></div>
<div style="line-height: 150%; margin-left: .25in; mso-list: l0 level1 lfo1; tab-stops: list .25in; text-indent: -.25in;">
<span style="font-family: Symbol; font-size: 10.0pt; line-height: 150%; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><b style="mso-bidi-font-weight: normal;">Uploading
an application</b></div>
<span style="font-family: "Liberation Serif","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Arial Unicode MS"; mso-bidi-language: HI; mso-fareast-font-family: "Arial Unicode MS"; mso-fareast-language: HI; mso-font-kerning: .5pt; mso-hansi-font-family: "Liberation Serif";">Login to your publisher
account and click “Upload an Application”. Fill in all of the form data and
include screenshots if you can and provide a precise, short and well-formatted
description. You can also choose whether or not you want to release it as a
free or paid app – though you need to be a registered Google Checkout Merchant
to do the latter and it’s currently only available in a handful of countries.
Lastly, click “Publish.” </span><br />
<div style="text-align: left;">
</div>
</div>
<pre class="default prettyprint prettyprinted"><code> </code><code><span class="atn"> </span></code></pre>
<pre class="default prettyprint prettyprinted"><code><span class="tag"> </span></code></pre>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag">Our new android application for EGreeting.Have a look to it.</span></code></b></pre>
<pre class="default prettyprint prettyprinted"><code><span class="tag"> </span></code><b><code><span class="tag"><a href="https://play.google.com/store/apps/details?id=com.valentine.birthday.christmas.ecard.greetings" target="_blank">The Greetings Android Application</a> </span></code></b></pre>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag">
</span></code></b></pre>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag"><u>Download:-</u></span></code></b></pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwt4P4Wrgb5Q4gXAR__58of3fElMjU3XzP1Y0sEmPHzIID86kzFQuK7Mph7VW0J6Pz2ERBQAtw3bXUa_Xx5a2rBIpKfTLCdjYsnf9vnlSUrzeiQ1pJ9OB75DCOHllXwMKYZDupS8hMJiHM/s1600/download.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwt4P4Wrgb5Q4gXAR__58of3fElMjU3XzP1Y0sEmPHzIID86kzFQuK7Mph7VW0J6Pz2ERBQAtw3bXUa_Xx5a2rBIpKfTLCdjYsnf9vnlSUrzeiQ1pJ9OB75DCOHllXwMKYZDupS8hMJiHM/s200/download.png" height="200" width="200" /></a></div>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag"><u>
</u></span></code></b></pre>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag"> </span></code></b></pre>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag">
</span></code></b></pre>
<pre class="default prettyprint prettyprinted"><code><span class="tag">
</span></code></pre>
<br />
NovaRadix Android Application Development Team<br />
<a href="http://www.novaradix.com/" target="_blank"><b>NovaRadix Technology</b></a><br />
WWW.NOVARADIX.COM<br />
<br />
<br />
<pre class="default prettyprint prettyprinted"><code><span class="tag"> </span></code></pre>
</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com0tag:blogger.com,1999:blog-6618938227440490497.post-60163795070618461722013-01-24T09:49:00.000-08:002013-01-24T21:26:31.238-08:00Check Internet Connection in Android<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">boolean</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>isOnline() {</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> NetworkInfo netInfo = cm.getActiveNetworkInfo();</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">if</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>(netInfo !=<span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">null</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>&& netInfo.isConnectedOrConnecting()</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> && cm.getActiveNetworkInfo().isAvailable()</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> && cm.getActiveNetworkInfo().isConnected()) {</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">return</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">true</span></b><span style="font-family: Consolas; font-size: 10pt;">;</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">return</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">false</span></b><span style="font-family: Consolas; font-size: 10pt;">;</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span></div>
</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<b><span style="font-size: large;">there another method you want to use </span></b></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">static</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">boolean</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>haveNetworkConnection(</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">final</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>Context context) {</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">boolean</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>haveConnectedWifi =<span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">false</span></b><span style="font-family: Consolas; font-size: 10pt;">;</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">boolean</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>haveConnectedMobile =<span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">false</span></b><span style="font-family: Consolas; font-size: 10pt;">;</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">final</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>ConnectivityManager cm = (ConnectivityManager) context</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> .getSystemService(Context.CONNECTIVITY_SERVICE);</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">if</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>(cm !=<span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">null</span></b><span style="font-family: Consolas; font-size: 10pt;">) {</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">final</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>NetworkInfo[] netInfo = cm.getAllNetworkInfo();</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">for</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>(</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">final</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>NetworkInfo netInfoCheck : netInfo) {</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">if</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>(netInfoCheck.getTypeName().equalsIgnoreCase(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"WIFI"</span><span style="font-family: Consolas; font-size: 10pt;">)) {</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">if</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>(netInfoCheck.isConnected()) {</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> haveConnectedWifi =<span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">true</span></b><span style="font-family: Consolas; font-size: 10pt;">;</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">if</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>(netInfoCheck.getTypeName().equalsIgnoreCase(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"MOBILE"</span><span style="font-family: Consolas; font-size: 10pt;">)) {</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">if</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>(netInfoCheck.isConnected()) {</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> haveConnectedMobile =<span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">true</span></b><span style="font-family: Consolas; font-size: 10pt;">;</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">return</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>haveConnectedWifi || haveConnectedMobile;</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span></div>
</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 18px;"><br /></span><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 18px;">=============================================================</span></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">if</span></b><span style="font-family: Consolas; font-size: 10pt;"><span class="Apple-converted-space"> </span>(haveNetworkConnection(Activity.</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">this</span></b><span style="font-family: Consolas; font-size: 10pt;">)</span><span style="font-family: Consolas; font-size: 10pt;">)</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> {</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">//Conneced</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">else</span></b></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> {</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0.0001pt; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt;"> <span class="Apple-converted-space"> </span></span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">//No Connected</span></div>
</div>
<div class="MsoNormal" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 14px;"> }</span></div>
</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<b>Note:-<span class="Apple-converted-space"> </span></b>you also give User Permission</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /></div>
</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com0tag:blogger.com,1999:blog-6618938227440490497.post-7866673250694443172013-01-24T09:41:00.000-08:002013-01-24T21:19:11.933-08:00Convert String in to base64 in Android<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
</style>
<br />
<br />
<h2 style="text-align: center;">
Convert String in to base64 in Android</h2>
<br />
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]-->
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">byte</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt;">[] data;</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>String
str = </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"xyzstring"</span><span style="color: black; font-family: Consolas; font-size: 10.0pt;">;</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">try</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt;"> {</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span>data
= str.getBytes(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"UTF-8"</span><span style="color: black; font-family: Consolas; font-size: 10.0pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span>String
base64 = Base64.encodeToString(data, Base64.DEFAULT);</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span>Log.i(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"Base 64
"</span><span style="color: black; font-family: Consolas; font-size: 10.0pt;">,
base64);</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>}
</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">catch</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt;"> (UnsupportedEncodingException
e) {</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span>e.printStackTrace();</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>}</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
</style>
<![endif]--><br />
<div align="LEFT" style="margin-bottom: 0cm;">
<br /></div>
<br />
Base 64 of "xyzstring" is “eHl6c3RyaW5n”<br />
<div align="LEFT" style="margin-bottom: 0cm;">
<br /></div>
<div align="LEFT" style="margin-bottom: 0cm;">
<code><b>--------------------------------------------------------------------------------</b></code></div>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag">Our new android application for EGreeting.Have a look to it.</span></code></b></pre>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag"><a href="https://play.google.com/store/apps/details?id=com.valentine.birthday.christmas.ecard.greetings" target="_blank">The Greetings Android Application</a> </span></code></b></pre>
<img alt="QRCode" src="http://qrfree.kaywa.com/?l=1&s=8&d=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.valentine.birthday.christmas.ecard.greetings" height="100" width="100" /><b><code><span class="tag"></span></code></b><br />
<pre class="default prettyprint prettyprinted"><b><code><span class="tag">
</span></code></b></pre>
<pre class="default prettyprint prettyprinted">NovaRadix Android Application Development Team
<b>NovaRadix Technology</b>
<a href="http://www.novaradix.com/">WWW.NOVARADIX.COM</a></pre>
<div align="LEFT" style="margin-bottom: 0cm;">
<br /></div>
</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com2tag:blogger.com,1999:blog-6618938227440490497.post-19068352260966966192013-01-22T20:09:00.002-08:002013-01-24T21:20:59.944-08:00SharedPreference example in Android<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: center;">
SharedPreference example in Android</h2>
<br />
Application shared preferences allows you to save and retrieve data in key, value pair. <br />
Initialization of SharedPreference in Android:.<br />
<br />
Application shared preferences can be fetched using <a href="http://developer.android.com/reference/android/content/Context.html#getSharedPreferences%28java.lang.String,%20int%29">getSharedPreferences()</a> method.The following code can be used to get application shared preferences.<br />
<br />
<div style="margin-bottom: 0cm;">
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> SharedPreferences
pref = getApplicationContext().getSharedPreferences(</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"> </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt; line-height: 115%;">"any_prefname"</span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">, </span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; line-height: 115%;">MODE_PRIVATE</span></i><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">);</span><o:p></o:p></div>
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<code class="western">Available mode
for shared preference:</code></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<ul>
<li><div style="margin-bottom: 0cm;">
<code class="western"><a href="http://developer.android.com/reference/android/content/Context.html#MODE_WORLD_READABLE"><span style="color: black;"><span style="font-family: DejaVu Sans Mono, monospace;"><span style="font-size: x-small;"><span style="text-decoration: none;"><span style="font-weight: normal;">MODE_WORLD_READABLE</span></span></span></span></span></a></code></div>
</li>
<li><code class="western"><a href="http://developer.android.com/reference/android/content/Context.html#MODE_WORLD_WRITEABLE"><span style="color: black;"><span style="font-family: DejaVu Sans Mono, monospace;"><span style="font-size: x-small;"><span style="text-decoration: none;"><span style="font-weight: normal;">MODE_WORLD_WRITEABLE</span></span></span></span></span></a></code><span style="color: black;"><span style="font-family: DejaVu Sans Mono, monospace;"><span style="font-size: x-small;"><span style="text-decoration: none;"><span style="font-weight: normal;">
</span></span></span></span></span>
<br />
</li>
<li><code class="western"><a href="http://developer.android.com/reference/android/content/Context.html#MODE_PRIVATE"><span style="color: black;"><span style="font-family: DejaVu Sans Mono, monospace;"><span style="font-size: x-small;"><span style="text-decoration: none;"><span style="font-weight: normal;"><span style="background: transparent;">MODE_PRIVATE</span></span></span></span></span></span></a></code><br />
</li>
</ul>
To edit sharedpreference value, we need editor to edit and save
the changes in shared preferences.
<br />
<br />
<br />
<div style="margin-bottom: 0cm;">
<code class="western"> Editor editor =
pref.edit();</code></div>
<div style="margin-bottom: 0cm;">
<code class="western">and to save data
commit() is used.</code></div>
<div style="margin-bottom: 0cm;">
<code class="western"> Editor.commit();</code></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<code class="western">You can save data
into shared preferences using editor. All the primitive data types
like booleans, floats, ints, longs, and strings are supported. Call
</code><b>editor.commit()</b><code class="western"> in
order to save changes to shared preferences.</code></div>
<div style="margin-bottom: 0cm;">
</div>
<div style="margin-bottom: 0cm;">
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> editor.putBoolean(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"key_name"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">true</span></b><span style="font-family: Consolas; font-size: 10pt;">); </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// Storing boolean
- true/false</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> editor.putString(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"key_name"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"string
value"</span><span style="font-family: Consolas; font-size: 10pt;">); </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// Storing string</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> editor.putInt(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"key_name"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"int
value"</span><span style="font-family: Consolas; font-size: 10pt;">); </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// Storing integer</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> editor.putFloat(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"key_name"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"float
value"</span><span style="font-family: Consolas; font-size: 10pt;">); </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// Storing float</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"> editor.putLong(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt; line-height: 115%;">"key_name"</span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt; line-height: 115%;">"long
value"</span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">); </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt; line-height: 115%;">// Storing long</span><o:p></o:p></div>
</div>
<div style="margin-bottom: 0cm;">
<span class="Apple-tab-span" style="white-space: pre;"> </span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"> editor.commit();
</span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt; line-height: 115%;">// commit changes</span><br />
<div class="MsoNormal">
<o:p></o:p></div>
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<code class="western">Get data from
Shared Preference:</code></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<code class="western">Data can be
retrived from saved preferences by calling <a href="http://developer.android.com/reference/android/content/SharedPreferences.html#getString%28java.lang.String,%20java.lang.String%29" target="_blank">getString()</a>
(For string) method.for boolean getBoolean() Remember this method
should be called on Shared Preferences not on Editor.</code></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<code class="western">// returns stored
preference value</code></div>
<div style="margin-bottom: 0cm;">
<code class="western">// If value is
not present return second param value - In this case null</code></div>
<div style="margin-bottom: 0cm;">
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> pref.getString(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"key_name"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">null</span></b><span style="font-family: Consolas; font-size: 10pt;">); </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// getting String</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> pref.getInt(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"key_name"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">null</span></b><span style="font-family: Consolas; font-size: 10pt;">); </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// getting Integer</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> pref.getFloat(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"key_name"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">null</span></b><span style="font-family: Consolas; font-size: 10pt;">); </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// getting Float</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> pref.getLong(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"key_name"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">null</span></b><span style="font-family: Consolas; font-size: 10pt;">); </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// getting Long</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"> pref.getBoolean(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt; line-height: 115%;">"key_name"</span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 115%;">null</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">); </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt; line-height: 115%;">//
getting boolean</span><o:p></o:p></div>
</div>
<div style="margin-bottom: 0cm;">
</div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<code class="western">Delete data from
shared preference and delete sharedpreference:</code></div>
<div style="margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<code class="western">To delete data
from shared preferences we can use </code><b>remove(“key_name”)</b><code class="western">.If
we want to delete all the data, call </code><b>clear()</b></div>
<br />
<br />
<div dir="LTR" id="highlighter_364484">
<table cellpadding="0" cellspacing="0" style="width: 468px;">
<colgroup><col width="468"></col>
</colgroup><tbody>
<tr>
<td style="border: none; padding: 0cm;" width="468"><code class="western">editor.remove("student_name");//will delete student_</code><code class="western">name</code><br />
<code class="western">editor.commit(); </code>
<br />
<br />
<br /></td>
</tr>
</tbody></table>
</div>
Following will clear all the data from shared preferences<br />
<div dir="LTR" id="highlighter_200448">
<table cellpadding="0" cellspacing="0" style="width: 331px;">
<colgroup><col width="331"></col>
</colgroup><tbody>
<tr>
<td style="border: none; padding: 0cm;" width="331"><code class="western">editor.clear();</code><br />
<code class="western">editor.commit(); </code>
</td>
</tr>
</tbody></table>
</div>
<br />
<br />
<pre class="default prettyprint prettyprinted"><code><span class="tag"></span></code></pre>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag">Our new android application for EGreeting.Have a look to it.</span></code></b></pre>
<pre class="default prettyprint prettyprinted"><code><span class="tag"> </span></code><b><code><span class="tag"><a href="https://play.google.com/store/apps/details?id=com.valentine.birthday.christmas.ecard.greetings" target="_blank">The Greetings Android Application</a> </span></code></b></pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcrC5I057t3OzNZaYrUaVSFU7NWXwA0n_9L1juDFP-GD23S4rSCzVlxkzYpxSVOuMbUtyNUvsU4xrYuv_eCXrzAPWJRjuf3xVeiSfNqB9U7i2_dzhuTk-xkBv_fdqKHgiqEUNw8gtj-i_r/s1600/qrfree.kaywa.com.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcrC5I057t3OzNZaYrUaVSFU7NWXwA0n_9L1juDFP-GD23S4rSCzVlxkzYpxSVOuMbUtyNUvsU4xrYuv_eCXrzAPWJRjuf3xVeiSfNqB9U7i2_dzhuTk-xkBv_fdqKHgiqEUNw8gtj-i_r/s200/qrfree.kaywa.com.png" height="100" width="100" /></a></div>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag">
</span></code></b></pre>
<pre class="default prettyprint prettyprinted">NovaRadix Android Application Development Team
<b>NovaRadix Technology</b>
<a href="http://www.novaradix.com/">WWW.NOVARADIX.COM</a></pre>
<br />
<br /></div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com4tag:blogger.com,1999:blog-6618938227440490497.post-39814682877134441862013-01-18T04:25:00.000-08:002014-07-10T01:16:44.353-07:00Get Display Size in Android<div dir="ltr" style="text-align: left;" trbidi="on"><h2 style="text-align: center;">Get Display Size in Android</h2><br />Hello Friends,<br /><br />now a days android device are come with different resolution and different screen size and it very difficult to design android application for that design dynamically layout we need to get display size for that,<br />hear is code for get display size of screen in android<br /><br /><br /><br /><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="background-color: silver; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 10pt;">DisplayMetrics</span><span style="font-family: Consolas; font-size: 10pt;"> metrics = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">this</span></b><span style="font-family: Consolas; font-size: 10pt;">.getResources().getDisplayMetrics();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">int</span></b><span style="font-family: Consolas; font-size: 10pt;"> width = metrics.</span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">widthPixels</span><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal"><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 115%;">int</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">height = metrics.</span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; line-height: 115%;">heightPixels</span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">;</span><o:p></o:p><br /><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"><br /></span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"><br /></span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"><br /></span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"><br /></span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">we get device Height and Width from this code</span></div></div>NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com0tag:blogger.com,1999:blog-6618938227440490497.post-56310958850365472342013-01-18T00:54:00.002-08:002013-01-24T21:22:30.832-08:00How to connect android device in Linux (Ubantu)<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 class="western">
Connect Android Device for Development in Linux (Ubuntu)</h2>
Connecting android device in ubuntu (Linux) guide.<br />
First of all you have to login with root user. If there is no root
login then enable root login using following steps:<br />
<b> Enable the root account in Ubuntu</b> ,<br />
Please follow below
steps<br />
<pre class="western"><span style="font-family: consolas, Courier New, courier, monospace;"><span style="font-size: x-small;">1 . To get started, Open terminal - press <b><span style="font-size: small;">Ctrl – Alt – T</span></b> </span></span></pre>
<pre class="western"><span style="font-family: consolas, Courier New, courier, monospace;"><span style="font-size: x-small;">on your keyboard to open Terminal. </span></span> </pre>
<pre class="western"><span style="font-family: consolas, Courier New, courier, monospace;"><span style="font-size: x-small;">2. When it opens, run the commands below to create a new root password.</span></span>
<span style="font-size: large;"><span style="font-family: consolas, Courier New, courier, monospace;">sudo passwd root</span></span>
<span style="font-family: consolas, Courier New, courier, monospace;"><span style="font-size: x-small;">It asks for new password for root login.</span></span>
<span style="font-family: consolas, Courier New, courier, monospace;"><span style="font-size: x-small;">3. copy and paste the commands below to enable manual or other login.</span></span>
<span style="font-family: consolas, Courier New, courier, monospace; font-size: small;">sudo sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf'</span>
<span style="font-family: consolas, Courier New, courier, monospace;"><span style="font-size: x-small;">Restart your computer and choose to login as root.</span></span>
</pre>
Log in as root and create this file:
<code class="western">/etc/udev/rules.d/51-android.rules</code>.<br />
<br />
Use this format to add each vendor to the file:<br />
<code class="western">SUBSYSTEM=="usb",
ATTR{idVendor}=="0bb4", MODE="0666",
GROUP="plugdev"</code><br />
<br />
<code class="western">List of vendor Ids :</code><br />
<code class="western"><a href="http://developer.android.com/tools/device.html#VendorIds">http://developer.android.com/tools/device.html#VendorIds</a></code><br />
<br />
<code class="western">In this example, the vendor ID is for HTC,
vendor id of HTC is “0bb4”. The MODE assignment specifies
read/write permissions, and GROUP defines which Unix group owns the
device node. </code>
<br />
<br />
<code class="western">You can add multiple device vendor id with
creating new line for each venor</code><br />
<code class="western">SUBSYSTEM=="usb",
ATTR{idVendor}=="0bb4", MODE="0666",
GROUP="plugdev"</code><br />
<br />
<code class="western">After , Save the file and run the following
command in terminal</code><br />
<br />
<code class="western">Now execute:<br />chmod a+r
/etc/udev/rules.d/51-android.rules</code><br />
<code class="western">Restart the eclipse and enjoy the usb
debugging in android with ubuntu.</code><br />
<br />
<pre class="default prettyprint prettyprinted"><b><code><span class="tag">Our new android application for EGreeting.Have a look to it.</span></code></b></pre>
<pre class="default prettyprint prettyprinted"><code><span class="tag"> </span></code><b><code><span class="tag"><a href="https://play.google.com/store/apps/details?id=com.valentine.birthday.christmas.ecard.greetings" target="_blank">The Greetings Android Application</a> </span></code></b></pre>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag">
</span></code></b></pre>
<br />
NovaRadix Android Application Development Team<br />
<b>NovaRadix Technology</b><br />
WWW.NOVARADIX.COM</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com2tag:blogger.com,1999:blog-6618938227440490497.post-91159238886172506422013-01-17T02:33:00.002-08:002013-01-24T21:23:41.963-08:00Dynamically Relative Layout at Runtime in android<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="color: #660000; text-align: left;">
Relative Layout at Runtime in android. </h3>
<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span> relParent = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>(HomeScreen.</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">this</span></b><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams
rlparent = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams(</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams.FILL_PARENT,</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams.FILL_PARENT);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> relParent.setLayoutParams(rlparent);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span> relTop = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>(HomeScreen.</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">this</span></b><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams
rlpTop = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams(</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams.FILL_PARENT,</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">WRAP_CONTENT</span></i><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> rlpTop.addRule(<span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">ALIGN_PARENT_TOP</span></i><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams
rlpBottom = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams(</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams.FILL_PARENT,</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">WRAP_CONTENT</span></i><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> rlpBottom.addRule(<span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">ALIGN_PARENT_BOTTOM</span></i><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> relTop.setLayoutParams(rlpTop);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> relBottom.setLayoutParams(rlpBottom);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> TextView
txtTitle = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;"> TextView(HomeScreen.</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">this</span></b><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams
relParam = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams(</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">WRAP_CONTENT</span></i><span style="font-family: Consolas; font-size: 10pt;">,</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.LayoutParams.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">WRAP_CONTENT</span></i><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> relParam.addRule(<span style="background: silver; mso-highlight: silver;">RelativeLayout</span>.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">CENTER_IN_PARENT</span></i><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> txtTitle.setText(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"HomeScreen"</span><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> txtTitle.setLayoutParams(relParam);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> txtTitle.setTextColor(Color.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">BLUE</span></i><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> txtTitle.setTextSize(18);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> relTop.addView(txtTitle);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> relParent.addView(relTop);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> relParent.addView(relBottom);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"> setContentView(relParent);</span><o:p></o:p></div>
<br />
<br />
It does not require any layout.xml file becuase all gui is using code.<br />
In Relative Layout , we use RelativeLayout.LayoutParams same way <br />
In Linear Layout , we use LinearLayout.LayoutParams.<br />
<br />
<code></code><b><code><span class="tag">Our new android application for EGreeting.Have a look to it.</span></code></b><code><span class="tag"> </span></code><br />
<h4 class="default prettyprint prettyprinted" style="text-align: left;">
<code><span class="tag"> </span></code><b><code><span class="tag"><a href="https://play.google.com/store/apps/details?id=com.valentine.birthday.christmas.ecard.greetings" target="_blank">The Greetings Android Application</a> </span></code></b></h4>
<pre class="default prettyprint prettyprinted"><code><span class="tag">
</span></code></pre>
<br />
NovaRadix Android Application Development Team<br />
<b>NovaRadix Technology</b><br />
WWW.NOVARADIX.COM<br />
<br /></div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com1tag:blogger.com,1999:blog-6618938227440490497.post-58391075506514569422013-01-17T01:52:00.000-08:002013-01-24T21:25:40.778-08:00GradientDrawable in Android<div dir="ltr" style="text-align: left;" trbidi="on">
<div itemprop="articleBody">
A Drawable with a color gradient for buttons, backgrounds, etc.
</div>
It can be defined in an XML file with the <code><shape></code> element. For more
information, see the guide to <a href="http://developer.android.com/guide/topics/resources/drawable-resource.html">Drawable Resources</a>.<br />
<br />
<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><?</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">xml</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">version</span>=<i><span style="color: #2a00ff;">"1.0"</span></i><span style="color: #7f007f;">encoding</span>=<i><span style="color: #2a00ff;">"utf-8"</span></i><span style="color: teal;">?></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">gradient</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <u><span style="color: #7f007f;">android:angle</span>=<i><span style="color: #2a00ff;">"-90"</span></i></u><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <u><span style="color: #7f007f;">android:endColor</span>=<i><span style="color: #2a00ff;">"#A71C1C"</span></i></u><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <u><span style="color: #7f007f;">android:startColor</span>=<i><span style="color: #2a00ff;">"#7c0000"</span></i></u><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 10.0pt; line-height: 115%;"> <u><span style="color: #7f007f;">android:type</span>=<i><span style="color: #2a00ff;">"radial"</span></i></u>
<span style="color: teal;">/></span></span><o:p></o:p></div>
<br />
<br />
<br />
Gradient is used in shape and it looks like this.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwEx6bcKWWX8vVKiH99OkLuDRMsIbCBMSoPZXuq6KE7ejHxa-X3vgsPmOJV7jETahSxgXVpv9v9Rqf7he8hPqnINdIi3EHJmc-Wj7ZTPp_U_4wgv_fIV3V3XX50bZaZnfc2kYgxOcFCxpW/s1600/glossyButton_halfGradient-60.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwEx6bcKWWX8vVKiH99OkLuDRMsIbCBMSoPZXuq6KE7ejHxa-X3vgsPmOJV7jETahSxgXVpv9v9Rqf7he8hPqnINdIi3EHJmc-Wj7ZTPp_U_4wgv_fIV3V3XX50bZaZnfc2kYgxOcFCxpW/s1600/glossyButton_halfGradient-60.jpg" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgROhQ45hfCZUOz8nrE0ZmotivudPuT1zi4JdbkIKtBMRHJVkty_BJZvpjXLR-H0Ydmpbx0iYEpLlAppLSoLC1-AIHxR4p-5209kTwvJ9yoMeeZ2zK7wUSXMaFCghrNzeNsQ8E0Kl8RCLM1/s1600/buttonGradient.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgROhQ45hfCZUOz8nrE0ZmotivudPuT1zi4JdbkIKtBMRHJVkty_BJZvpjXLR-H0Ydmpbx0iYEpLlAppLSoLC1-AIHxR4p-5209kTwvJ9yoMeeZ2zK7wUSXMaFCghrNzeNsQ8E0Kl8RCLM1/s1600/buttonGradient.jpg" /></a></div>
<pre class="default prettyprint prettyprinted"><code>
</code></pre>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><?</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">xml</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">version</span>=<i><span style="color: #2a00ff;">"1.0"</span></i><span style="color: #7f007f;">encoding</span>=<i><span style="color: #2a00ff;">"utf-8"</span></i><span style="color: teal;">?></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">shape</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">xmlns:android</span>=<i><span style="color: #2a00ff;">"http://schemas.android.com/apk/res/android"</span></i>
<span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">
</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">gradient</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:angle</span>=<i><span style="color: #2a00ff;">"90"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:endColor</span>=<i><span style="color: #2a00ff;">"#A71C1C"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:startColor</span>=<i><span style="color: #2a00ff;">"#7c0000"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<pre class="default prettyprint prettyprinted"><code><span class="pun"><span style="color: teal; font-family: Consolas; font-size: 10pt; line-height: 115%;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt; line-height: 115%;">shape</span><span style="color: teal; font-family: Consolas; font-size: 10pt; line-height: 115%;">></span> </span></code></pre>
<pre class="default prettyprint prettyprinted"><code><span class="pun">
</span></code></pre>
<pre class="default prettyprint prettyprinted"><code><span class="tag">another example of shape drawable: </span></code></pre>
<pre class="default prettyprint prettyprinted"><code><span class="tag"> </span></code></pre>
<div class="line number1 index0 alt2">
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><?</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">xml</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">version</span>=<i><span style="color: #2a00ff;">"1.0"</span></i>
<span style="color: #7f007f;">encoding</span>=<i><span style="color: #2a00ff;">"UTF-8"</span></i><span style="color: teal;">?></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">shape</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">xmlns:android</span>=<i><span style="color: #2a00ff;">"http://schemas.android.com/apk/res/android"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:shape</span>=<i><span style="color: #2a00ff;">"rectangle"</span></i> <span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">
</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">stroke</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:width</span>=<i><span style="color: #2a00ff;">"2dp"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:color</span>=<i><span style="color: #2a00ff;">"#FFFFFFFF"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">
</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">gradient</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:angle</span>=<i><span style="color: #2a00ff;">"225"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:endColor</span>=<i><span style="color: #2a00ff;">"#DD2ECCFA"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:startColor</span>=<i><span style="color: #2a00ff;">"#DD000000"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">
</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">corners</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:bottomLeftRadius</span>=<i><span style="color: #2a00ff;">"7dp"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:bottomRightRadius</span>=<i><span style="color: #2a00ff;">"7dp"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:topLeftRadius</span>=<i><span style="color: #2a00ff;">"7dp"</span></i><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:topRightRadius</span>=<i><span style="color: #2a00ff;">"7dp"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt; line-height: 115%;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt; line-height: 115%;">shape</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt; line-height: 115%;">></span><o:p></o:p></div>
</div>
<h3 style="text-align: left;">
Attributes Name and its meaning for gradient drawable in android :</h3>
<h3 style="text-align: left;">
android:type</h3>
There are 3 types of gradients, the default and the one for this question is "<b>linear</b>". The other 2 are "<b>radial</b>" and "<b>sweep</b>".<br />
<h3 style="text-align: left;">
android:angle</h3>
Counter-clockwise rotation of the gradient, where 0 is | start color --> end color | (horizontally).<br />
<h3 style="text-align: left;">
android:startColor</h3>
Color the gradient starts from, start is defined by the rotation.<br />
<h3 style="text-align: left;">
android:endColor</h3>
Color the gradient ends with, end is defined by the rotation.<br />
<h3 style="text-align: left;">
android:centerColor</h3>
There can also be a color in between the start and end color, if desired.<br />
<br />
We can use gradient in selector also.<br />
<br />
<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10pt;"><?</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">xml</span><span style="font-family: Consolas; font-size: 10pt;"> <span style="color: #7f007f;">version</span>=<i><span style="color: #2a00ff;">"1.0"</span></i>
<span style="color: #7f007f;">encoding</span>=<i><span style="color: #2a00ff;">"utf-8"</span></i><span style="color: teal;">?></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">selector</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">xmlns:android</span>=<i><span style="color: #2a00ff;">"http://schemas.android.com/apk/res/android"</span></i><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">
</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">item</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:state_pressed</span>=<i><span style="color: #2a00ff;">"true"</span></i><span style="color: teal;">><</span><span style="color: #3f7f7f;">shape</span><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">gradient</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:angle</span>=<i><span style="color: #2a00ff;">"270"</span></i>
<span style="color: #7f007f;">android:endColor</span>=<i><span style="color: #2a00ff;">"@color/button_pressed" </span></i><span style="color: #7f007f;">android:startColor</span>=<i><span style="color: #2a00ff;">"@color/button_pressed"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">stroke</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:width</span>=<i><span style="color: #2a00ff;">"3dp"</span></i>
<span style="color: #7f007f;">android:color</span>=<i><span style="color: #2a00ff;">"@color/button_pressed"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">corners</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:radius</span>=<i><span style="color: #2a00ff;">"3dp"</span></i>
<span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">padding</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:bottom</span>=<i><span style="color: #2a00ff;">"5dp"</span></i>
<span style="color: #7f007f;">android:left</span>=<i><span style="color: #2a00ff;">"5dp"</span></i> <span style="color: #7f007f;">android:right</span>=<i><span style="color: #2a00ff;">"5dp"</span></i>
<span style="color: #7f007f;">android:top</span>=<i><span style="color: #2a00ff;">"5dp"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">
</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">shape</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">item</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">
</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">item</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:state_focused</span>=<i><span style="color: #2a00ff;">"true"</span></i><span style="color: teal;">><</span><span style="color: #3f7f7f;">shape</span><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">gradient</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:angle</span>=<i><span style="color: #2a00ff;">"270"</span></i>
<span style="color: #7f007f;">android:endColor</span>=<i><span style="color: #2a00ff;">"@color/info_normal"</span></i> <span style="color: #7f007f;">android:startColor</span>=<i><span style="color: #2a00ff;">"@color/info_normal"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">stroke</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:width</span>=<i><span style="color: #2a00ff;">"3dp"</span></i>
<span style="color: #7f007f;">android:color</span>=<i><span style="color: #2a00ff;">"@color/info_normal"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">corners</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:radius</span>=<i><span style="color: #2a00ff;">"3dp"</span></i>
<span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">padding</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:bottom</span>=<i><span style="color: #2a00ff;">"5dp"</span></i>
<span style="color: #7f007f;">android:left</span>=<i><span style="color: #2a00ff;">"5dp"</span></i> <span style="color: #7f007f;">android:right</span>=<i><span style="color: #2a00ff;">"5dp"</span></i>
<span style="color: #7f007f;">android:top</span>=<i><span style="color: #2a00ff;">"5dp"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">
</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">shape</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">item</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">
</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">item</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">shape</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">gradient</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:angle</span>=<i><span style="color: #2a00ff;">"270"</span></i>
<span style="color: #7f007f;">android:endColor</span>=<i><span style="color: #2a00ff;">"@color/info_normal"</span></i> <span style="color: #7f007f;">android:startColor</span>=<i><span style="color: #2a00ff;">"@color/info_normal"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">stroke</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:width</span>=<i><span style="color: #2a00ff;">"3dp"</span></i>
<span style="color: #7f007f;">android:color</span>=<i><span style="color: #2a00ff;">"@color/info_normal"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">corners</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:radius</span>=<i><span style="color: #2a00ff;">"3dp"</span></i>
<span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">padding</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:bottom</span>=<i><span style="color: #2a00ff;">"5dp"</span></i>
<span style="color: #7f007f;">android:left</span>=<i><span style="color: #2a00ff;">"5dp"</span></i> <span style="color: #7f007f;">android:right</span>=<i><span style="color: #2a00ff;">"5dp"</span></i>
<span style="color: #7f007f;">android:top</span>=<i><span style="color: #2a00ff;">"5dp"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">
</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">shape</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">item</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal">
<span style="color: teal; font-family: Consolas; font-size: 10pt; line-height: 115%;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt; line-height: 115%;">selector</span><span style="color: teal; font-family: Consolas; font-size: 10pt; line-height: 115%;">></span><o:p></o:p></div>
<div class="MsoNormal">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt; line-height: 115%;"><br /></span></div>
<br />
<br />
<pre class="default prettyprint prettyprinted"><code><span class="tag">One more thing is useful for shape called shape type"</span></code></pre>
<pre class="default prettyprint prettyprinted"><code><span class="pln"></span><span class="atn">there are four types of shape available in android.</span></code></pre>
<pre class="default prettyprint prettyprinted"><code><span class="atn"> </span></code></pre>
<table><tbody>
<tr><td><span style="font-size: large;"><b><code>rectangle</code></b></span></td>
<td>A rectangle that fills the containing View. This is the default shape.</td><td></td><td></td><td></td><td></td></tr>
<tr><td><b><code><span style="font-size: large;">oval</span></code></b></td>
<td>An oval shape that fits the dimensions of the containing View.</td></tr>
<tr><td><code><b><span style="font-size: large;">line</span></b></code></td>
<td>A horizontal line that spans the width of the containing View. This
shape requires the <code><stroke></code> element to define the width of the
line.</td></tr>
<tr><td><code><span style="font-size: large;"><b>ring</b></span></code></td>
<td>A ring shape.</td></tr>
</tbody></table>
<pre class="default prettyprint prettyprinted"><code> </code><code><span class="atn"> </span></code></pre>
<pre class="default prettyprint prettyprinted"><code><span class="tag"> </span></code></pre>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag">Our new android application for EGreeting.Have a look to it.</span></code></b></pre>
<pre class="default prettyprint prettyprinted"><code><span class="tag"> </span></code><b><code><span class="tag"><a href="https://play.google.com/store/apps/details?id=com.valentine.birthday.christmas.ecard.greetings" target="_blank">The Greetings Android Application</a> </span></code></b></pre>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag">
</span></code></b></pre>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag"><u>Download:-</u></span></code></b></pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwt4P4Wrgb5Q4gXAR__58of3fElMjU3XzP1Y0sEmPHzIID86kzFQuK7Mph7VW0J6Pz2ERBQAtw3bXUa_Xx5a2rBIpKfTLCdjYsnf9vnlSUrzeiQ1pJ9OB75DCOHllXwMKYZDupS8hMJiHM/s1600/download.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwt4P4Wrgb5Q4gXAR__58of3fElMjU3XzP1Y0sEmPHzIID86kzFQuK7Mph7VW0J6Pz2ERBQAtw3bXUa_Xx5a2rBIpKfTLCdjYsnf9vnlSUrzeiQ1pJ9OB75DCOHllXwMKYZDupS8hMJiHM/s200/download.png" height="200" width="200" /></a></div>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag"><u>
</u></span></code></b></pre>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag"> </span></code></b></pre>
<pre class="default prettyprint prettyprinted"><b><code><span class="tag">
</span></code></b></pre>
<pre class="default prettyprint prettyprinted"><code><span class="tag">
</span></code></pre>
<br />
NovaRadix Android Application Development Team<br />
<b>NovaRadix Technology</b><br />
WWW.NOVARADIX.COM<br />
<br />
<br />
<pre class="default prettyprint prettyprinted"><code><span class="tag"> </span></code></pre>
</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com1tag:blogger.com,1999:blog-6618938227440490497.post-30802882333016946392013-01-17T01:26:00.002-08:002013-01-24T21:27:48.984-08:00Hide Status Bar / Title Bar in Android Activity<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 itemprop="name" style="text-align: left;">
<a class="question-hyperlink" href="http://stackoverflow.com/questions/2591036/how-to-hide-the-title-bar-for-an-activity-in-xml-with-existing-custom-theme">How to hide the title bar for an Activity in XML with existing custom theme</a></h2>
<div itemprop="name" style="text-align: left;">
If you want to hide the title bar from android activity then use following code in oncreate method of activity.</div>
<div itemprop="name" style="text-align: left;">
<br /></div>
<div itemprop="name" style="text-align: left;">
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #646464; font-family: Consolas; font-size: 10.0pt;">@</span><span style="font-family: Consolas; font-size: 10pt;">Override</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">protected</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> <u>onCreate(</u>Bundle
<u>savedInstanceState)</u> {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">super</span></b><span style="font-family: Consolas; font-size: 10pt;">.onCreate(savedInstanceState);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> requestWindowFeature(<u>Window</u>.FEATURE_NO_TITLE);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">this</span></b><span style="font-family: Consolas; font-size: 10pt;">.getWindow().setFlags(<u>WindowManager</u>.LayoutParams.FLAG_FULLSCREEN,</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <u>WindowManager</u>.LayoutParams.FLAG_FULLSCREEN);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> setContentView(R.layout.<u>temp</u>);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">} </span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
</div>
<pre class="default prettyprint prettyprinted"><code><span class="typ"> </span></code></pre>
<pre class="default prettyprint prettyprinted"><code><span class="typ"> </span></code></pre>
NovaRadix Android Application Development Team<br />
<b>NovaRadix Technology</b><br />
WWW.NOVARADIX.COM<br />
<h1 itemprop="name">
</h1>
<h1 itemprop="name">
</h1>
</div>
NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com1tag:blogger.com,1999:blog-6618938227440490497.post-53060803991821970972013-01-08T05:52:00.000-08:002014-07-10T01:16:44.415-07:00Drag,Move ImageView in Android<div dir="ltr" style="text-align: left;" trbidi="on"><br />Hello Friends Here is Code for image drag and move<br /><br />move image view in android anywhere in device screen for that here some code for that move image view using single touch,<br />drag image view in android<br /><br /><b>java Code </b><br /><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;"><br /></span></b><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;">android.app.Activity;</span><br /><br /><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;"> android.os.Bundle;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;">android.view.MotionEvent;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;"> android.view.View;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;">android.widget.ImageView;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;"> android.widget.LinearLayout.LayoutParams;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br /></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">class</span></b><span style="font-family: Consolas; font-size: 10pt;"> MainActivity </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">extends</span></b><span style="font-family: Consolas; font-size: 10pt;"> Activity {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br /></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">int</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">windowwidth</span><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">int</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">windowheight</span><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br /></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">private</span></b><span style="font-family: Consolas; font-size: 10pt;"> LayoutParams </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">layoutParams</span><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br /></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10.0pt;">@Override</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> onCreate(Bundle savedInstanceState) {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">super</span></b><span style="font-family: Consolas; font-size: 10pt;">.onCreate(savedInstanceState);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> setContentView(R.layout.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">activity_main</span></i><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br /></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">windowwidth</span><span style="font-family: Consolas; font-size: 10pt;"> = getWindowManager().getDefaultDisplay().getWidth();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">windowheight</span><span style="font-family: Consolas; font-size: 10pt;"> = getWindowManager().getDefaultDisplay().getHeight();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">final</span></b><span style="font-family: Consolas; font-size: 10pt;"> ImageView img = (ImageView) findViewById(R.id.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">imageView1</span></i><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br /></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> img.setOnTouchListener(</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;">View.OnTouchListener() {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br /></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10.0pt;">@Override</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">boolean</span></b><span style="font-family: Consolas; font-size: 10pt;"> onTouch(View v, MotionEvent event) {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> LayoutParams layoutParams = (LayoutParams) img</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> .getLayoutParams();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">switch</span></b><span style="font-family: Consolas; font-size: 10pt;"> (event.getAction()) {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">case</span></b><span style="font-family: Consolas; font-size: 10pt;"> MotionEvent.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">ACTION_DOWN</span></i><span style="font-family: Consolas; font-size: 10pt;">:</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">break</span></b><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">case</span></b><span style="font-family: Consolas; font-size: 10pt;"> MotionEvent.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">ACTION_MOVE</span></i><span style="font-family: Consolas; font-size: 10pt;">:</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">int</span></b><span style="font-family: Consolas; font-size: 10pt;"> x_cord = (</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">int</span></b><span style="font-family: Consolas; font-size: 10pt;">) event.getRawX();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">int</span></b><span style="font-family: Consolas; font-size: 10pt;"> y_cord = (</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">int</span></b><span style="font-family: Consolas; font-size: 10pt;">) event.getRawY();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br /></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">if</span></b><span style="font-family: Consolas; font-size: 10pt;"> (x_cord > </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">windowwidth</span><span style="font-family: Consolas; font-size: 10pt;">) {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> x_cord = </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">windowwidth</span><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">if</span></b><span style="font-family: Consolas; font-size: 10pt;"> (y_cord > </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">windowheight</span><span style="font-family: Consolas; font-size: 10pt;">) {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> y_cord = </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">windowheight</span><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br /></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> layoutParams.</span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">leftMargin</span><span style="font-family: Consolas; font-size: 10pt;"> = x_cord - 25;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> layoutParams.</span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">topMargin</span><span style="font-family: Consolas; font-size: 10pt;"> = y_cord - 75;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br /></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> img.setLayoutParams(layoutParams);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">break</span></b><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">default</span></b><span style="font-family: Consolas; font-size: 10pt;">:</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">break</span></b><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">return</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">true</span></b><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> });</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal"><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">}</span><o:p></o:p></div><br /><br /><br />========================================================<br /><b>layout.xml</b><br /><br /><br /><br /><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">LinearLayout</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">xmlns:android</span>=<i><span style="color: #2a00ff;">"http://schemas.android.com/apk/res/android"</span></i><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">xmlns:tools</span>=<i><span style="color: #2a00ff;">"http://schemas.android.com/tools"</span></i><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:layout_width</span>=<i><span style="color: #2a00ff;">"match_parent"</span></i><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:layout_height</span>=<i><span style="color: #2a00ff;">"match_parent"</span></i><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: teal;">></span><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br /></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">ImageView</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:id</span>=<i><span style="color: #2a00ff;">"@+id/imageView1"</span></i><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:layout_width</span>=<i><span style="color: #2a00ff;">"wrap_content"</span></i><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:layout_height</span>=<i><span style="color: #2a00ff;">"wrap_content"</span></i><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:src</span>=<i><span style="color: #2a00ff;">"@drawable/ball"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br /></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">ImageView</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:id</span>=<i><span style="color: #2a00ff;">"@+id/imageView2"</span></i><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:layout_width</span>=<i><span style="color: #2a00ff;">"wrap_content"</span></i><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:layout_height</span>=<i><span style="color: #2a00ff;">"wrap_content"</span></i><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">android:src</span>=<i><span style="color: #2a00ff;">"@drawable/space_icon"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br /></div><div class="MsoNormal"><span style="color: teal; font-family: Consolas; font-size: 10.0pt; line-height: 115%;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt; line-height: 115%;">LinearLayout</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt; line-height: 115%;">></span><o:p></o:p></div><br /><br /><div><br /></div><div>thanks Enjoy...!</div></div>NovaRadix Technologyhttp://www.blogger.com/profile/15597835712302856065noreply@blogger.com6