Android

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 Next Steps. Android Development Tutorial.

1.1.

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. How to see if wifi is connected in android. How to use HttpURLConnection POST data to web server? Here is one sample. ... public static String excutePost(String targetURL, String urlParameters) { URL url; HttpURLConnection connection = null; try { //Create connection url = new URL(targetURL); connection = (HttpURLConnection)url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); connection.setRequestProperty("Content-Length", "" + Integer.toString(urlParameters.getBytes().length)); connection.setRequestProperty("Content-Language", "en-US"); connection.setUseCaches (false); connection.setDoInput(true); connection.setDoOutput(true); //Send request DataOutputStream wr = new DataOutputStream ( connection.getOutputStream ()); wr.writeBytes (urlParameters); wr.flush (); wr.close (); //Get Response InputStream is = connection.getInputStream(); BufferedReader rd = new BufferedReader(new InputStreamReader(is)); String line; StringBuffer response = new StringBuffer(); while((line = rd.readLine()) !

How to use HttpURLConnection POST data to web server?

HttpComponents HttpClient Examples. HttpClient Tutorial. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.

HttpClient Tutorial

See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 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).

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. 2.) Find the section labeled [Google.NTx86] . ; ;HTC Incredible %SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C9E %CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C9E&MI_01 Find the section [Google.NTamd64].

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. ZXing (pronounced "zebra crossing") is an open-source, multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. Our focus is on using the built-in camera on mobile phones to scan and decode barcodes on the device, without communicating with a server. Android to iPhone. Android is an Open Source platform for mobile devices.

Android to iPhone

Initiated by Google, Android has received much attention. 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. 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... Android-wheel - Android Picker widget. Recipe iPhone-like wheel picker for selection (Recipe 883, Revision 3647)