Facebook recently announced a major update to the Facebook SDK for Android that makes it much simpler to manage login, publish to Open Graph, and measure the traffic you're getting from Facebook. The new SDK is also backwards compatible, so you can easily take advantage of new features like mobile app install ads without having to update a lot of code.
This article will walk you through the most important changes to the SDK, including:
1. Sessions and session management
2. Login view and fragment classes
3. API calls to Facebook
4. New native views for choosing friends or places
5. Mobile app install ads
Unfortunately in some cases we face troublesome limitations. Lest see them through an example:
We will create a simple animation that moves a buttom from the top left corner of the screen to the center when it is clicked, then remains there, and when clicked again it moves back to its original position
After you read the documentation http://developer.android.com/guide/topics/resources/animation-resource.h... it may seem easy to solve. We can define the animation realative to the parents size in percent (50%p), and the fillAfter attribute makes the button remain there, insted of jumping back to its original position. We can even define all of this in XML. So most of the problem seems to be solved with the few line of XML below:
In my previous article I showed how to create a simple class that handles the basic gesture events such as ACTION_DOWN, ACTION_MOVE, ACTION_POINTER_DOWN, ACTION_POINTER_UP, ACTION_UP. Combinations of these, you can implement all of touch gesture stuffs thats you need in your work with a touch screen phone.
Handling multitouch
Create a boolean member variable in your MultitouchView class that stores the actual multitouch event. Name it isMultiTouch.
In order to avoid out of memory errors, we must recycle the previous image when the user presses the button second times or after that, so the returned bitmap is stored as a member variable, so we still have a reference for it when it is needs to be recycled.
In this tutorial I'll present you a simple exception handler class for Android. The class can invoke and display exceptions and it can be upgraded very easy for your further needs.