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


Android Development Tutorial

The Android operating system. 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. Current community your communities Sign up or log in to customize your list. more stack exchange communities.

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 ();

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.

See the License for the specific language governing permissions and limitations under the License. How do I obtain crash-data from my Android application. The top answer is not the best way to actually accomplish this.

How do I obtain crash-data from my Android application

I find writing a file to disk and then checking for it the next time the app is loaded to be pretty hacky. I've come up with a cleaner and more dependable way and put it up on Github. Basically, I send an intent with the crash data to a service. This is a better solution than writing a file, for example, because when an app force closes, the process is terminated so you can't count on anything that will take any time, such as writing to disk or a network request.

And, if all you did was write a file to check for next time, its possible they won't ever load the app again and you'll never get that report. By sending an intent, your process will be restarted after being terminated so that the intent can be processed. Android pinch zoom. For android 2.2+ (api level8), you can use ScaleGestureDetector. you need a member: private ScaleGestureDetector mScaleDetector;

android pinch zoom

View - Android Development: How Can I Make An EditText Plain So It's Just A White Square. Current community your communities.

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. Current community.

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! 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/ 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. Well, it turns out that the phone is too new for Google to have included support for the Incredible in their driver package. Encode - QR codes image generator in java (open source but no GPL) Current community your communities Sign up or log in to customize your list. more stack exchange communities Stack Exchange sign up log in tour help. 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. Gesture - How to make an Android view that flips between views on swipe/fling. I'd like to make a view in my Android app that flips between multiple views on a swipe/fling. I'd like it to behave more or less like the Android Launcher behaves when flipping between views. In particular, 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. Over the year the APIs have been updated, adding some new features and deprecating some old method signatures. 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.

There’s extensive documentation and information on the architecture, the different components and best practices. 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)