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

by Romain Guy » Fri, 10 Apr 2009 07:41:04 GMT


Sponsored Links
 > Any way to do this without setting up an animation completion handler

Yes and no. No because you still need to hide the view yourself. Yes
because you can just do this:

myView.startAnimation(myAnimation);
myView.setVisibility(View.INVISIBLE); // or GONE

Android will hide the View and run the animation but still draw the
View as long as the animation is running.

-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Custom Title Not Filling Whole Title Bar (help please)

I'm setting up an app to use a custom title so I can get the proper
logo into the title instead of just text, and to make it clean (since
the logo has a flat black background), I also want the whole title bar
to be black. My xml for the title is a framelayout to hold the logo
inside of a linearlayout to change the background color, and I'm
setting the title in OnCreate() as follows:

        protected void onCreate(Bundle savedInstanceState){
                super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
        setContentView(R.layout.main);
        getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
R.layout.title);
        }

With this setup, the old gray from the old title bar still exists
around the edge of my custom title. Appears to be on the order of 3-4
px on the bottom and 8-10 px on each side. Any ideas about how to get
the black background to cover the entire area?

Thanks

-Rick

--~--~---------~--~----~------------~-------~--~----~

2. JSONObject .getInt() method doesn't handle a null

part of the JSON String contents:
{ "aNumber":null }

o is a org.json.JSONObject below:
o.getInt("aNumber");

This results in an exception:
org.json.JSONException: JSONObject["aNumber"] is not a number.

I would guess getInt() should be returning a null. Looks like a bug to
me. What do you think?

--~--~---------~--~----~------------~-------~--~----~

3. Eclipse Plugin allows Spaces in String.xml, but generated invalid R.java

4. Gyroscope and Tricorder Sensors in Android

5. G1 Mobile - External 'FREEDOM' QWERTY collapseable bluetooth keyboard

6. Problem using UserTask and AsyncTask

7. onTouch with finger still on display