Fragment animation as in Honeycomb Gmail app - how to do that?

by Scythe » Fri, 20 May 2011 00:14:57 GMT


Sponsored Links
 I'd like to achieve similar fragment behaviour as in the Honeycomb
Gmail app. So I have three fragment next to each other: A, B and C.
Initially, A and B is displayed, and when the user selects something
from B, it triggers an sliding-animation/fragment-transaction so that
B and C are visible. B showing the selected item, C showing the
desired content.

Any ideas how the Gmail app does this?

-- 



Re: Fragment animation as in Honeycomb Gmail app - how to do that?

by Ed Burnette » Fri, 20 May 2011 02:33:46 GMT


 There's probably using FragmentTransaction.setTransition() or
setCustomAnimations().




-- 


Sponsored Links


Other Threads

1. Camera preview - works on all devices apart from the Droid

Hey,

This is my code I use to display a preview from the camera on a
SurfaceView:

public void surfaceChanged(SurfaceHolder holder, int format, int w,
int h) {

        Camera.Parameters parameters = mCamera.getParameters();
        List<Size> cameraSizes =
CameraReflect.getSupportedPreviewSizes(parameters);
        if(cameraSizes != null && cameraSizes.size() > 0) {
                parameters.setPreviewSize(Math.max(cameraSizes.get(0).width,
cameraSizes.get(0).height), Math.min(cameraSizes.get(0).width,
cameraSizes.get(0).height));
        }
        else {
                parameters.setPreviewSize(Math.max(w, h), Math.min(w, h));
        }
        mCamera.setParameters(parameters);
        mCamera.startPreview();
}

It's pretty basic stuff; it uses reflection to determine if the
version of Android the user is running supports the
getSupportedPreviewSizes() method. If it does it obtains the width and
height and sets these as the preview size. If the version of Android
is older it will just set it as the width and height returned by the
SurfaceView.

However, it seems the Motorola Droid/Milestone doesn't like this code
and will instead show a blank screen instead of the camera preview.

Could someone kindly tell me where i'm going wrong?

Thanks

-- 

2. How to "brick" an Android phone?

I know this sounds evil, but I assure you my intentions are good.  I'm
working on a personal security app and I want the phone to appear to
be completely dead - no lights, no alerts, no screen activity, no
vibration, etc.

Would this most easily be accomplished by publishing high priority
intents to handle everything, then just not handling them?  I guess
I'm asking if this is a complex thing or whether there's a simple two-
line solution to this before I go down the rat hole of figuring out
the 32 different things I need to change to make this happen.

Thanks in advance!

Bret

-- 

3. Force no scaling on web page

4. Table being pushed outside window

5. ServerSocket issues

6. Global search button removes my dialog, any help to ignore phone's search button click?

7. Android on nokia platform