Tips and tricks from an Android developer

Funny errors you find.

Sometimes you’ll see android messages in the logcat that are confusing, amusing, interesting, and sometimes even downright funny. I decided to keep a running list of them here. 3-14-11 Watch the watchdog 03-14 13:43:14.630: DEBUG/WifiWatchdogService(178): (android.server.ServerThread) rga@350 (00:1a:1e:84:d7:e0) does not require the watchdog      

A simple java socket client

This is part two of my example of communicating between android and a pc over usb. This shows a simple java client based on this oracle tutorial and I use it to test communication between android and the PC. Here’s the code: package com.rga.vzw; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintStream; import java.net.Socket; import

Read More

fillBefore and fillAfter attributes don’t work for LayoutAnimations

When you create layoutAnimations and you set the fillBefore or fillAfter in the animation sets referenced by the layoutAnimation the xml attributes of dont work. You have to set them through code. //doesn’t work! You have to set through code: LayoutAnimationController layoutAnim = AnimationUtils .loadLayoutAnimation(this, R.anim.landingpage_right_anim_out); Animation anim = layouAnim.getAnimation(); anim.setFillEnabled(true); anim.setFillBefore(true); anim.setFillAfter(true);