Tag Archives: show

ProgressBar in ANDROID…..

By | February 28, 2011

Progress bars are our basic needs when we want to show something for a long time or some progress takes a long time and we want to show it’s progress. Keeping that in mind ANDROID also has built in progress views. There are basically two types of progress views in ANDROID. ProgressDialog.STYLE_SPINNER and ProgressDialog.STYLE_HORIZONTAL Take… Read More »

Hide and Show a Text Using jQuery – Example

By | February 26, 2011

With jQuery manipulation of HTML & CSS can be done very easily. Here we are going to show how to Hide a line of text using jQuery & Show it back also. Let’s code speak first…. <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#hideButton").click(function(){ $("p").hide(); }); $("#showButton").click(function(){ $("p").show(); }); }); </script> </head> <body> <p>Hey!… Read More »

How to create custom layout for your spinner in ANDROID? or Customizable spinner

By | February 20, 2011

This code helps you to customize the spinner in ANDROID. For that you have to create an XML file inside your layout folder as shown below and name it spinner.xml. You can give all properties that are available for TextView inside this which is going to be then applied for your spinner. Now I will… Read More »

Java Exception

By | February 19, 2011

Simple java program to show how exception works public class exception { public static void main(String[] args) { try { int a = 10; int b = 10/0; } catch(ArithmeticException e) { System.out.println(“Exception Caught ” + e); } } } The output will be like you expect Exception Caught java.lang.ArithmeticException: / by zero

Working with SQLite Database in ANDROID.

By | February 14, 2011

Below is a straight forward example of how to deal with SQLite database in ANDROID. Go ahead and copy and paste the following code to your java file. The example has one database and performs functions like insert delete and listing of values in a textView. In the XML file set up a TableLayout with… Read More »

Crop an Image in Adobe AIR or Flex.

By | February 7, 2011

Below code shows how to crop an image in Adobe AIR. Change the mx:WindowedApplication to mx: Application to run it as a FLEX Application. The code uses copyPixels to extract the desired part from the image file. The important line in the below code crops the image. cropBD.copyPixels(loadBD, new Rectangle(startPoint.x, startPoint.y, squareSize, squareSize),posPoint);

Pass a variable from one window to another in Adobe AIR?

By | February 6, 2011

We often need to access another window variable in the current window. The following example shows how to access a variable from one window in the next window. The logic is to create an object of next window in the current window and assign the value of variable in the current window itself so that… Read More »

How to Implement Box2D in Adobe AIR?

By | February 4, 2011

Everyone will be fascinated how flash games are built on the web that implements the real world physics. Well for your information there are a lot of physics engines available. One of them is the Box2D. Box2D was written in C++. Then it was converted to flash. So now I am going to show you… Read More »

Detect when the ANDROID Screen Goes Off ?

By | January 18, 2011

This is the main Java file that extends activity. Create a file named ScreenON_OFF_ACTIVITY.java and place the below code in it. This is the class that extends the Broadcast receiver class that receives the notifications. create a java file and name it ScreenReceiver.java and place the following code in it. This the class that updates… Read More »

How to Skin your Alert or ToolTip in Adobe Flex using actionScript?

By | December 26, 2010

The code below does this . Simply copy and paste the following code.. applicationComplete=”init()”> Alert { color : #124332; background-color: #ffffff; header-colors : #243322, #243322; header-height:19; drop-shadow-enabled: true; drop-shadow-color :#243322; corner-radius :10; border-style :solid; border-thickness: 1; border-color : #243322; footer-colors : #243322, #ffffff; title-style-name : “title”; } .myalertstyle { backgroundAlpha: 0.3; backgroundColor: black; borderAlpha: 0.3;… Read More »

Custom Toasts in ANDROID.

By | October 5, 2010

First, just show an image inside a toast: This method just displays a text toast: And this method displays a Toast that contains both an image and text: