Animation on a view doesn't 'stick' in reality

by fg1921 » Fri, 10 Apr 2009 07:38:05 GMT

Sponsored Links

I'm using a TranslateAnimation to slide a ViewGroup in and out of
screen. However after the animation slides the view out, the
transparent view is still 'clickable' in the same place. I used
setFillAfter to TRUE thinking that the animation would 'stick' but I
can't seem to get the view out of my 'face'.

Any way to do this without setting up an animation completion handler
and then hide the view explicitly?

Animation on a view doesn't 'stick' in reality

by fg1921 » Fri, 10 Apr 2009 08:21:16 GMT


Thanks Romain - I did this (and the completion listener) neither of
these work. Basically the 'AbsoluteLayout' ViewGroup slides out of the
screen but then when you tap on the are where that view once was, the
old buttons apparently still get tapped (eventhough completely
invisible). If I've 'translated' a view, shouldn't it stay where it is
and not get the kind of focus/clicks it's getting right now? I tried
setEnabled(false), setVisibility(View.GONE) -- nothing seems to work.
The 'invisible' view still gets touch events and buttons are being
pressed from the view that got slid away.

Am I doing something wrong?

Sponsored Links

Animation on a view doesn't 'stick' in reality

by fg1921 » Fri, 10 Apr 2009 08:33:39 GMT

 Okay I've figured it out. I would personally consider this a bug but
not sure if this is how it's meant to be.

Basically in onAnimationEnd I had to loop over all children inside the
viewgroup (and children of children) and set their visibility to GONE/
INVISIBLE and the buttons stopped getting touch events after animation
ended. And then onAnimationStart I had to set their visibility back to

Shouldn't setting visibility/focusability/enabled state etc on the
parent ViewGroup apply these down to its children as well (especially
the visibility part). Since the parent view became invisible, which is
fine, but the children view didn't (well internally) and thus were
intercepting Touch events eventhough the view as a whole was not

Other Threads

1. Problems reading in the android browser

Hi everyone,

I'm not sure where to post this, but im sure someone reading this will
know where to foreward it...

Today I wanted to read some developer docs while on the go, so I took
out my G1 dev phone, (Firmware 1.0) and surfed over to

Sadly, the page is nearly unusable on the phone:
1. Line wrapping does not work, so I have to scroll horizontally all
the time
2. The fixed header uses too much screenspace.
2a. Because the header is repositioned only after I'm finished with
scrolling, I often scroll to some interesting part of the text, and as
soon as I release my finger, the text is overlapped by the header.
3. The size of the page is calculated incorrectly, so the page is
truncated. Sometimes only a single line is missing, but sometimes
about 50 lines of text are missing. The amount of truncated lines
depends on weather I'm in landscape mode or portrait mode.

I've just tested it on my emulator (Firmware 1.0, too) and while the
fixed header was not fixed there (resolving issue 2 and 2a) all the
other problems occured as well.

I never had problem vieweing any website on the G1, so I'm pretty much
surprised that a google website about android is the first one to

with best regards,
Brian Schimmel


2. Opening for Google Android Developer with Mobile app Development MNC in Bangalore

Salaam developers,
              I wanted to introduce to you guys about a niche
opportunity to work on the Android Platform for one of our MNC clients
who are into mobile application development. Following is the JD and
some information about out Client

Position: Sr. Software Engineer
Exp: 3-8
Location: Bangalore
CTC: Not a concern for the right candidate

Tech Skills:

Hands on experience on  the Android Platform (must)
Working knowledge of XHTML (must)

About Client:

      Found in the year 2000, our client enables mobile content and
applications for Mobile Network Operators (MNOs), Mobile Virtual
Network Operators (MVNOs), Content Providers and Enterprises.

      Our clients products and services assist its customers to create,
launch, manage, and monetize mobile content and applications across
multiple mobile devices and networks (3G & 4G).

      Our Client has office in US and India and serves a variety of global
customers including Fortune 500 Companies Alltel, AOL, Disney Mobile,
ESPN Mobile, Reliance Infocomm, TV Guide, Verizon Wireless, and Xerox

If this opportunity e{*filter*}s you, update me with your latest CV to or call me at 080 - 40609618 for more information
on the same..

Looking forward to hear from you guys soon..

Cheers Developers!!


3. Debugging Android Native C Applications with gdb

4. Cupcake timeline fixed

5. Problem accessing Google Weather API

6. accessing Gdata

7. visual performance analyser (vpa-rcp-6.3.0-linux-x86)