Search this blog

Handling animation life lycle events android

Now that you are happy with your animations, you just need to make
QuizSplashActivity transition to QuizMenuActivity when the animations
are complete. To do this, you create a new Intent control to launch the
QuizMenuActivity class and call the startActivity() method. You should also
call the finish() method of QuizSplashActivity because you do not want to keep
this activity on the stack (that is, you do not want the Back button to return to this

Of your animations, the fade_in2 animation takes the longest, at 5 seconds total.
This animation is therefore the one you want to trigger your transition upon. You do so by creating an AnimationListener object, which has callbacks for the animation life cycle events: start, end, and repeat. In this case, only the onAnimationEnd() method has an interesting implementation. Here is the code to create the AnimationListener and implement the onAnimationEnd() callback:
Animation fade2 = AnimationUtils.loadAnimation(this, R.anim.fade_in2);
fade2.setAnimationListener(new AnimationListener() {
public void onAnimationEnd(Animation animation) {
startActivity(new Intent(QuizSplashActivity.this,

Now if you run the Been There, Done That! application again, either on the emulator or on the handset, you see some nice animation on the splash screen. The user then transitions smoothly to the main menu screen, which is the next screen on your to-do list.
READ MORE » Handling animation life lycle events android

How to animate all views in a Layout android

In addition to applying animations to individual View controls, you can also apply
them to each child View control within a Layout (such as TableLayout and each
TableRow), using LayoutAnimationController.
To animate View controls in this fashion, you must load the animation, create
LayoutAnimationController, configure it as necessary, and then call the layout’s
setLayoutAnimation() method. For example, the following code loads the custom_anim animation, creates a LayoutAnimationController, and then applies it to each TableRow in the TableLayout control:
Animation spinin = AnimationUtils.loadAnimation(this, R.anim.custom_anim);
LayoutAnimationController controller =new LayoutAnimationController(spinin);
TableLayout table = (TableLayout) findViewById(;
for (int i = 0; i < table.getChildCount(); i++)
TableRow row = (TableRow) table.getChildAt(i);
There is no need to call any startAnimation() method in this case because
LayoutAnimationController handles that for you. Using this method, the animation is applied to each child view, but each starts at a different time. (The default is 50% of the duration of the animation—which, in this case, would be 1 second.) This gives you the nice effect of each ImageView spinning into existence in a cascading fashion.
Stopping LayoutAnimationController animations is no different from stopping
individual animations: You simply use the clearAnimation() method. The additional lines to do this in the existing onPause() method are shown here:
TableLayout table = (TableLayout) findViewById(;
for (int i = 0; i < table.getChildCount(); i++) {
TableRow row = (TableRow) table.getChildAt(i);
READ MORE » How to animate all views in a Layout android

How to animate Specific Views in android

Animations must be applied and managed programmatically. Remember, costly
operations, such as animations, should be stopped if the application is paused for
some reason. The animation can resume when the application comes back into theforeground.
Let’s start with a simplest case: applying the fade_in animation to your title
TextView control, called TextViewTopTitle. All you need to do is retrieve an
instance of your TextView control in the onCreate() method of the
QuizSplashActivity class, load the animation resource into an Animation object,
and call the startAnimation() method of the TextView control:
TextView logo1 = (TextView) findViewById(;
Animation fade1 = AnimationUtils.loadAnimation(this, R.anim.fade_in);

When an animation must be stopped—for instance, in the onPause() method of the activity—you simply call the clearAnimation() method. For instance, the following
onPause() method demonstrates this for the corner logos:
protected void onPause() {
// Stop the animation
TextView logo1 = (TextView) findViewById(;
TextView logo2 = (TextView) findViewById(;
// ... stop other animations

READ MORE » How to animate Specific Views in android

How to add animation resources in android

For your splash screen, you need to create three custom animations in XML and
save them to the /res/anim resource directory: fade_in.xml, fade_in2.xml, and
The first animation, fade_in.xml, simply fades its target from an alpha value of 0
(transparent) to an alpha value of 1 (opaque) over the course of 2500 milliseconds, or 2.5 seconds. There is no built-in animation editor in Eclipse. The XML for the fade_in.xml animation looks like this:

<?xml version=”1.0” encoding=”utf-8” ?>

You can apply this animation to the top TextView control with your title text.
Next, you create the fade_in2.xml animation. This animation does exactly the
same thing as the fade_in animation, except that you set the startOffset attribute
to 2500 milliseconds. This means that this animation will actually take 5 seconds
total: It waits 2.5 seconds and then fades in for 2.5 seconds. Because 5 seconds
is long enough to display the splash screen, you should plan to listen for fade_in2
to complete and then transition to the main menu screen.
Finally, you need some fun animation sequence for the TableLayout graphics. In
this case, your animation set contains multiple, simultaneous operations: a rotation, some scaling, and an alpha transition. As a result, the target View spins into existence.

The custom_anim.xml file looks like this:

<?xml version=”1.0” encoding=”utf-8” ?>
android:duration=”2000” />
android:duration=”2000” />

As you can see, the rotation operation takes 2 seconds to rotate from 0 to
360 degrees, pivoting around the center of the view. The alpha operation should
look familiar; it simply fades in over the same 2-second period. Finally, the scale
operation scales from 10% to 100% over the same 2-second period. This entire animation takes 2 seconds to complete.
After you have saved all three of your animation files, you can begin to apply the
animations to specific views.

READ MORE » How to add animation resources in android

How to work with animation in android

One great way to add zing to your splash screen would be to add some animation.The Android platform supports four types of graphics animation:

Animated GIF images—Animated GIFs are self-contained graphics files with
multiple frames.

Frame-by-frame animation—The Android SDK provides a similar mechanism
for frame-by-frame animation in which the developer supplies the individual graphic frames and transitions between them (see the AnimationDrawable class).

Tweened animation—Tweened animation is a simple and flexible method of
defining specific animation operations that can then be applied to any view
or layout.

OpenGL ES—Android’s OpenGL ES API provides advanced three-dimensional
drawing, animation, lighting, and texturing capabilities.
For your application, the tweened animation makes the most sense. Android provides tweening support for alpha (transparency), rotation, scaling, and translating (moving) animations. You can create sets of animation operations do be done simultaneously, in a timed sequence, and after a delay. Thus, tweened animation is a perfect choice for your splash screen.With tweened animation, you create an animation sequence, either programmatically or by creating animation resources in the /res/anim directory. Each animation sequence needs its own XML file, but the animation may be applied to any number of View controls.
READ MORE » How to work with animation in android

Microsoft gives manufacturers a taste of Mango

Microsoft announced this morning that the next version of the Windows Phone operating system, code-named Mango, has been delivered to manufacturers, which can begin testing it on their handsets.
The move is one of the final steps before the software arrives on new phones and is delivered to existing users as a software update.
"This marks the point in the development process where we hand code to our handset and mobile-operator partners to optimize Mango for their specific phone and network configurations," Terry Myerson, Microsoft's corporate vice president of engineering for Windows phone. "Here on the Windows Phone team, we now turn to preparing for the update process." 

Multitasking in Mango, coming to Windows Phone 7 users in the fall.
READ MORE » Microsoft gives manufacturers a taste of Mango

skype for android hacked and cracked to allow 3g calling

That Skype app for Android we thought was locked down to Wi-Fi only has just been cracked a few days after its release. The .apk is provided by xeudoxus over at Droid Forums, he tweaked it to get that pesky 3G block off, and apparently its working like a charm. So now all we need is an .apk that works on the Samsung Galaxy S.
READ MORE » skype for android hacked and cracked to allow 3g calling

Angry Birds v1.6.2 a game iPhone iPod Touch iPad

If you don’t know what Angry Birds game is, then you have been living in a cave! Angry Birds is simply the most spectacular, funny, intriguing game that will steal hundreds of hours from your spare time! It was first released for Apple iOS (iPad, iPod and iPhone) in December 2009 and became so famous that a computer version was released (it was released for almost all platforms indeed). With more than 100 million downloads across all platforms, Angry Birds is one of the most downloaded game on the Internet.

this is the beautiful snap of angry birds game
READ MORE » Angry Birds v1.6.2 a game iPhone iPod Touch iPad

Gmail Notifier Pro v2.7.2 Multilingual Read Nfo-PH

PH group have released updated version of Gmail Notifier Pro, desktop notifier for your gmail account(s), available as regular and portable edition.

Gmail Notifier Pro is a lightweight and easy to use program that allows you to verify multiple Google Gmail accounts for new mail and notify the user. It has a simple and comprehensive interface that will quickly guide you through all its features.

Some of it's features are as under:

  • Check multiple Gmail accounts for new mail – including Google Apps accounts
  • Display popup notifications and play sound to alert the user when a new mail arrives
  • Define themes and configure accounts individually
  • Complete overview of all unread mail in all your mail boxes
  • Support Atom and IMAP protocols
READ MORE » Gmail Notifier Pro v2.7.2 Multilingual Read Nfo-PH

How to design Layouts Using the Layout Resource Editor

You can design and preview layouts in Eclipse by using the layout resource editor
as shown in the below figure. If you click on the project file /res/layout/main.xml, you see a Layout tab, which shows you the preview of the layout. You can add and remove layout controls by using the Outline tab. You can set individual properties and attributes by using the Properties tab.

Like most other user interface designers, the layout resource editor works well for
basic layout design. However, the layout resource editor does not fully support all
View controls. For some of the more complex user interface controls, you might be
forced to edit the XML by hand. You might also lose the ability to preview your layout if you add any of these controls to your layout. In such a case, you can still view your layout by running your application in the emulator or on a handset.
Displaying an application correctly on a handset, rather than the Eclipse layout editor, should be a developer’s primary objective.

READ MORE » How to design Layouts Using the Layout Resource Editor