background preloader


Facebook Twitter

Android Development - Bounce Animation. In this brief post I’ll go over how to implement a bare bones bounce animation on some hard-coded text in an Android app.

Android Development - Bounce Animation

To achieve this effect, we will be using both a translate animation class and a bounce interpolator class, both provided by the Android SDK. [Edit:] Some readers wanted to see what this effect looked like, and I was thinking the same thing when I first published this. So below is a sample of what the effect looks. The Setup To demonstrate a simple bounce animation, we will capture any touch events and “bounce” some hard-coded text to the touched location with a horizontal offset of 100.

To start out, we’ll create our own View to work with, called BounceView. The touch event is where we will capture the location where we will insert our bounce animation. Capturing Touch Events In the touch event, we will save off the touched coordinates for use in the draw event. We have introduced two new class level variables to hold the coordinates. Drawing It The Final Result. Android Development Tutorial.


Android Development Tutorial

Using a Slide Transition with the Android ViewFlipper « Kevin Rohling's Blog. Github Repo If your app only has one View, your app is probably pretty boring.

Using a Slide Transition with the Android ViewFlipper « Kevin Rohling's Blog

However, if you’re building an interesting app you’ll probably have to switch between multiple Views, maybe go back and forth and have some nice animations. You could write your animations and manually do the transitioning yourself but once you get more than 2 or so Views that’s gonna get tough to keep up with (and messy!). Fortunately the ViewFlipper solves this problem quite nicely. Step 1. Let’s start all the way at the beginning, File -> New Android Project. How to see if wifi is connected in android. How to use HttpURLConnection POST data to web server? HttpComponents HttpClient Examples. HttpClient Tutorial. How do I obtain crash-data from my Android application. Android pinch zoom. View - Android Development: How Can I Make An EditText Plain So It's Just A White Square. Android - How to create EditText with rounded corners.

How to use Multi-touch in Android 2: Part 6, Implementing the Pinch Zoom Gesture. Welcome to the last installment in the Android multi-touch series!

How to use Multi-touch in Android 2: Part 6, Implementing the Pinch Zoom Gesture

The purpose of this series is to show you how to develop multi-touch programs for Android-based phones, tablets, and other devices. It was excerpted with permission from Hello, Android! (3rd edition), published by the Pragmatic Bookshelf. Over the course of this series we've been working on a simple image viewer that lets you move and zoom a picture on the screen with touch gestures. This part wraps up the example with the code that implements multi-touch pinch zooming. Implementing the Pinch Zoom Gesture The pinch zoom gesture is similar to the drag gesture, except it starts when the second finger is pressed to the screen (ACTION_POINTER_DOWN). From Touchv1/src/org/example/touch/ case MotionEvent.ACTION_POINTER_DOWN: oldDist = spacing(event); Log.d(TAG, "oldDist=" + oldDist); if (oldDist > 10f) { savedMatrix.set(matrix); midPoint(mid, event); mode = ZOOM; Log.d(TAG, "mode=ZOOM" ); } break; Midpoint of Two Points.

Installing HTC Incredible Android SDK Drivers. In order to debug on your new HTC Incredible smartphone on Windows 7, you need to install USB drivers from Google.

Installing HTC Incredible Android SDK Drivers

Well, it turns out that the phone is too new for Google to have included support for the Incredible in their driver package. Here is how I got it all working though. It may or may not work for you. 1.) Install the Android SDK and download the USB drivers into a folder inside your SDK as Google tells you to do. Encode - QR codes image generator in java (open source but no GPL) ScanningViaIntent - zxing - Simple scanning on Android, by calling Barcode Scanner via Intent - Multi-format 1D/2D barcode image processing library with clients for Android, Java. Zxing - Multi-format 1D/2D barcode image processing library with clients for Android, Java.

Android to iPhone. Android is an Open Source platform for mobile devices.

Android to iPhone

Gesture - How to make an Android view that flips between views on swipe/fling. Horizontal View Swiping with ViewPager. Posted by Rich “geekyouup” Hyndman, inspired by the fact that life just got that little bit easier Updated Dec 12 2012 It has been over a year since the ViewPager launched and in that time it’s been used by many developers to improve the user experience of their applications.

Horizontal View Swiping with ViewPager

Over the year the APIs have been updated, adding some new features and deprecating some old method signatures. Five methods in PagerAdapter have been deprecated in order to switch from using View in the method signature to using ViewGroup. This makes it more obvious what the parameter refers to, improves the readability of the code and removes the need to constantly cast the Views to ViewGroups. Some official ViewPager resources have also been added: A few ViewPager hints that are worth mentioning as they keep recurring are: Here’s to the next year of paging views. Android Tutorial: Creating and Using an SD Card in the Emulator - Streamhead. In a previous post, I mentioned how user-friendly Android is for developers.

Android Tutorial: Creating and Using an SD Card in the Emulator - Streamhead

There’s extensive documentation and information on the architecture, the different components and best practices. However, the documentation has a few blind spots. Many of the tools have little documentation and no usage examples. The information is there, it’s just hidden behind a few layers of Android theory. So I’m going to try and document a few of the basic things that you’ll probably need to know to start developing Android applications. The first issue I ran into was trying to load files into the Android emulator. NumberPicker. DateSlider 1.2 an alternative DatePicker for Android. Wheel UI contol. Have you ever seen the iPhone date time picker? Next is the corresponding Android control Poor design...

But, fortunately, there is an ability to create own UI controls. So I decided to implement this one. Actually, this time picker is a sample activity that uses my control called NumericWheel. Activity code: public class TimeActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.time_layout); NumericWheel hours = (NumericWheel) findViewById(; hours.setMaxValue(23); hours.setCaption("hour"); Android-wheel - Android Picker widget. Recipe iPhone-like wheel picker for selection (Recipe 883, Revision 3647)