How can I play a custom animation between 2 activity?

by Dianne Hackborn » Thu, 12 Mar 2009 02:10:55 GMT


Sponsored Links
 Transition animations are not enabled by default in current Android.  You
must have turned it on somehow in your emulator.






-- 
Dianne Hackborn
Android framework engineer
hack...@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. Soft keyboard in Fullscreen/extract mode

When Android is in portrait mode and the soft keyboard IME is shown,
my app is resized properly.  When in landscape mode, the soft keyboard
IME is always in fullscreen/extract mode, and even though I can see
the top portion of my app, it doesn't resize my app.  I couldn't find
any way to make the IME not come up in fullscreen mode.  So instead, I
detect this condition, and manually resize my app.  This works, but
unfortunately, to make this work well, I need to know the height of
the IME, or the portion of my app that remains visible.  But it seems
there is no way to get this information, and the soft keyboard IME's
height varies on different devices.  As a hack, I put in options for
the user to be able to adjust these parameters, and set the defaults
for the G1.  I can live with this for now, but is there a more
appropriate way to handle this?

In addition, even in portrait mode, if the status bar is hidden, the
IME also does not resize my app.  This clearly seems like a bug to me.

Any suggestions?

Thanks,
Howard
--~--~---------~--~----~------------~-------~--~----~

2. Change Tab Background <selector>

Hi guys,

a simple question: how to change the TabBackground in the different
states (not the icon!) ?

my files:

tabindicator.xml

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="false"
      android:state_selected="false"
      android:state_pressed="false"
      android:drawable="@drawable/tab_focus"/>
<item android:state_focused="false"
      android:state_selected="true"
      android:state_pressed="false"
      android:drawable="@drawable/tab_focus"/>
<item android:state_focused="true"
      android:state_selected="false"
      android:state_pressed="false"
      android:drawable="@drawable/tab_focus"/>
<item android:state_focused="true"
      android:state_selected="true"
      android:state_pressed="false"
      android:drawable="@drawable/tab_focus"/>
<item android:state_pressed="true"
      android:drawable="@drawable/tab_press"/>
</selector>

where should i call the xml file above???

i tried it in the TabWidget as src, but it doesn't work:

<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:src="@layout/tabindicator"> // look here
        </TabWidget>
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
        </FrameLayout>
    </LinearLayout>
</TabHost>

So i tried to use a own theme:

<?xml version="1.0" encoding="utf-8"?>
<resources>
        <style name="tab" parent="android:Theme.Light">
                <item name="android:tabWidgetStyle">@style/tabindicatorstyle</
item>
        </style>
        <style name="tabindicatorstyle" parent="@android:style/
Widget.TabWidget">
                <item name="android:???">@layout/tabindicator</item>
        </style>
</resources>

but i don't know, which resource i should use instead of "???"...

can anyone help me?

many thanks in advancde!

king regards!

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

3. How to debug crash on rotate

4. Still no paid apps in Android Market for Belgium

5. Solution suggestions

6. Still no paid apps in Android Market for Belgium

7. WebView Catch 22 - Same Window, Except For New Domain]