xml

Android animation basics

SDK Version: 
M3

In android there are 4 basic types of animations:

  • AlphaAnimation
  • RotateAnimation
  • ScaleAnimation
  • TranslateAnimation

This animations can be highly customized and combined, for example we can set the speed, delay, acceleration, duration of animations, then group them together in an AnimationSet.

Animations can be applyed as Layout animations to ViewGroups, to be triggered when the ViewGroup is created/displayed or applied to any view and be triggered by us any time.

The animations can be definex in XMl or by code. Defining in xml is mutch more clear, but you can not set animation parameters dinamically.

The animation XML files should be created in the res/anim folder and can be accessed using the R class, like R.anim.animation_name.

An animation defined in hyperspace_jump.xml can look like this:

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <set xmlns:android="http://schemas.android.com/apk/res/android">

Xml remote procedure calls on android

SDK Version: 
M3

Using web services on android phones, is pretty simple. For most popular services, there is a usable library available.
Here is a little snippet for using an android library, called android-xmlrpc.

Using ksoap2 for android, and parsing output data

SDK Version: 
M3

So the other day, I was asked to check out how we could use soap on Android, preferably with ksoap2 for android, and a public SOAP Web Service. For the latter the TopGoalScorers web service was chosen.

Syndicate content