Animate *actual* position of a View

by Lance Fetters » Mon, 16 Nov 2009 12:47:20 GMT


Sponsored Links
 I am attempting to port a simple "tap the moving target" iPhone game
to Android (1.6). The game animates the position of a button, moving
it to random locations, while the user tries to tap it.

With the iPhone, moving the button is rather simple:

  [UIView beginAnimations:nil context:nil];
  button.center = CGPointMake(x, y);
  [UIView commitAnimations];


I have attempted to duplicate this on Android using Animation/
TranslateAnimation, but have found that this only affects where the
image of the button appears, not the tap boundaries. In other words,
even though the button appears to be moving, it is not possible to tap
it.

Is there a way to animate the actual position of a View in Android? If
not, does anyone have any suggestions on the "Android-way" of making
such a game?

--



Other Threads

1. Sony Ericsson EDK for Timescape

Hi Android Developers,

The development kit for Sony Ericsson Timescape extensions (the EDK)
is now available for download at http://developer.sonyericsson.com/edk
.

Regarding the installation: Finally are the relevant links on the site
working properly - and the EDK can now be installed using the proper
Android SDK Manager.

Go ahead and download the documentation and the rest of the kit and
try it out.

Questions regarding this EDK or Timescape application as such can be
sent to this thread.

Please note that the EDK is applicable for 2011 products.

Kind regards
  /Johan

-- 

2. Time.class in Android an locales...

Hi,

In one of my activities i am implementing my DatePicker using the
Time.class. Since according to the api
The Time class is a faster replacement for the java.util.Calendar and
java.util.GregorianCalendar classes.

http://developer.android.com/reference/android/text/format/Time.html

I have managed to set my applications locale programatically by
extending Application
and setting  Locale.setDefault(locale); The datepicker dialog are in
my activity are now showing up in my preferred locale.

However if a try and format it.....

Time mytime = new Time();
mytime.format(%x);

The formatted text is always my systems locale i.e Greek,Spanish
etc...
I see that upon format() method... it calls

         final Locale locale = Locale.getDefault();
         final Resources r = Resources.getSystem();


Is there any way to fix this...

Thanks in advance

-- 

3. What exactly is the obtainBuffer in an AudioTrack?

4. Is there any porting guide?

5. Tlg info settingan 3 three di samsung gt-i5500

6. Sqlite Database in the APK

7. Help me please