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. Why does setTextFilterEnabled(true) not work?

Hi all,
    I want to design a ListView with auto filter fuction, that is,
when the user press a key all the items who matches this key will be
filtered and form a new list.
I selected the method setTextFilterEnabled(true) to implement my
function, but it didn't work in fact.
Could anyone tell me where my mistacke exists?
Thank you in advance!

Here is my code:

package com.example.android.apis.view;

import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;


/**
 * A list view example where the
 * data for the list comes from an array of strings.
 */
public class List1 extends ListActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Use an existing ListAdapter that will map an array
        // of strings to TextViews
        setListAdapter(new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_1, mStrings));
      getListView().setTextFilterEnabled(true);
    }

    private String[] mStrings = {
            "Action", "Adventure", "Animation", "Children", "Comedy",
"Documentary", "Drama",
        "Foreign", "History", "Independent", "Romance", "Sci-Fi",
"Television", "Thriller"


}

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

2. maps api and 1.5

Sorry guys, originally i posted to discussion which is the wrong
place.....



I'm migrating over an application from 1.1 to 1.5 and it uses the
Google maps. I got through most of the class path issues resolved I
think but when launching the application I get the following message.

04-18 13:19:11.598: WARN/dalvikvm(816): Class resolved by unexpected
DEX: Lnet/company/android/OrgMapActivity;(0x43732af0):0x192310 ref
[Lcom/google/android/maps/MapActivity;] Lcom/google/android/maps/
MapActivity;(0x43732af0):0x188228
04-18 13:19:11.598: WARN/dalvikvm(816): Unable to resolve superclass
of Lnet/company/android/OrgMapActivity; (106)
04-18 13:19:11.608: WARN/dalvikvm(816): Link of class 'Lnet/company/
android/OrgMapActivity;' failed

So it looks like the error is Unable to resolve superclass  which I
think is caused by not having
<uses-library android:name="com.google.android.maps" />
in the androidmanifest.

In my case, this line is in there. Is there a new uses-library for
1.5? Docs say that it's ok. Or specific classpath settings since the
maps.jar has been moved out? I'm not getting compilation errors, just
runtime.

I tried moving the maps.jar into the assets directory and that did not
work either.

Some other trace is below.
Thanks in advance!
Wayne McFadden

04-18 13:43:59.710: WARN/dalvikvm(776): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
04-18 13:43:59.710: ERROR/AndroidRuntime(776): Uncaught handler:
thread main exiting due to uncaught exception
04-18 13:43:59.979: ERROR/AndroidRuntime(776):
java.lang.ExceptionInInitializerError
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
java.lang.Class.newInstanceImpl(Native Method)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
java.lang.Class.newInstance(Class.java:1472)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
android.app.Instrumentation.newActivity(Instrumentation.java:1097)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2186)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
android.os.Handler.dispatchMessage(Handler.java:99)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
android.os.Looper.loop(Looper.java:123)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
java.lang.reflect.Method.invokeNative(Native Method)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
java.lang.reflect.Method.invoke(Method.java:521)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
dalvik.system.NativeStart.main(Native Method)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): Caused by:
java.lang.NoClassDefFoundError: net.company.android.OrgMapActivity
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
net.company.android.MainActivity.<clinit>(MainActivity.java:23)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     ... 15 more
04-18 13:43:59.979: ERROR/AndroidRuntime(776): Caused by:
java.lang.IllegalAccessError: cross-loader access from pre-verified
class
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
dalvik.system.DexFile.defineClass(Native Method)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
dalvik.system.DexFile.loadClass(DexFile.java:193)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
java.lang.ClassLoader.loadClass(ClassLoader.java:573)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     at
java.lang.ClassLoader.loadClass(ClassLoader.java:532)
04-18 13:43:59.979: ERROR/AndroidRuntime(776):     ... 16 more


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

3. Samsung Galaxy with customized system image

4. Log in debug only?

5. Button into a Tab error of xml

6. animated gif over all other elements on the desktop screen.

7. UEvent in linux kernel