So you have finally succeeded in creating an animation transition in Android from one Activity to the next. But then, you noticed that when that happens, there is a short blackout of a black background then displaying the animation of the next Activity you want to display.

Problem then is, how do you hold the first Activity intact so the second Activity will animate and overlap the first Activity? I have sifted through numerous forums and I have found no solution to that programmatically. If you have a solution, do feel free to post a comment here.

The workaround hack I found is to create a dummy animation XML file with a delay attribute in it so that the first Activity will stay still while the second Activity does its animated transition.

The android:duration attribute is the delay that I was talking about earlier. This value is in milliseconds so the value 2000 means 2 seconds and using this will make the first Activity stay still for 2 seconds. You can change it to any value you want.

A title bar can have its advantages. However, there are times when you may want to have it removed because it is not important and takes extra space. You could be better off using it for bigger buttons or others.

I am sure when you searched the forums, this line of code commonly comes up.

True. This works. However, try running your app and you will notice that when your app starts, the title bar actually appears for a few milliseconds then disappears when your Activity gets called.

The only way for the title bar to be removed is by placing an attribute in the activity tag of your manifest file.

That should do the trick.

If you manage to successfully incorporate GreenDroid into your project, integrate the ActionBar in your activity and see that the title bar and home icon are both blank, no worries. It really is just blank. You need to supply values so they would appear.

I thought at first that for the ActionBar title, the default is the application name but that is not the case since no matter how I tried to tweak the code, they were always blank.

To set the ActionBar‘s title programmatically, do this:

Related Posts Plugin for WordPress, Blogger...