2011-01-26 20 views
2

ビューフリッパーを使用して2つのビュー間のトランジションをアニメーションしようとしています。デフォルトでは、ViewFlipperはInアニメーションをZアニメーションの上に配置しているようです。着信アニメーションを発信アニメーション上に表示させる方法はありますか?Android ViewFlipper ZOrder

おかげ

答えて

0

あなたはAndroidのランチャーでこの機能を見つけることができます。 Androidはオープンソースなので、コピーして使用できます。

といいます。DragableSpacehttp://pastebin.com/CgK8TCQSです。あなたのアクティビティでは、呼び出し:

setContentView(R.layout.main); 

で:

<?xml version="1.0" encoding="utf-8"?> 
<de.android.projects.DragableSpace 
    xmlns:app="http://schemas.android.com/apk/res/de.android.projects" 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/space" 
    android:layout_width="fill_parent" android:layout_height="fill_parent" 
    app:default_screen="1"> 
    <include android:id="@+id/left" layout="@layout/left_screen" /> 
    <include android:id="@+id/center" layout="@layout/initial_screen" /> 
    <include android:id="@+id/right" layout="@layout/right_screen" /> 
</de.android.projects.DragableSpace> 

あなたはあなただけのXMLを使用して、アプリケーションのためのホームスクリーンを定義することができます見ることができると同様;)

は(初期の各ビューを定義し、右左のように は次のようになります:

<LinearLayout android:id="@+id/center" 
    android:layout_width="fill_parent" android:layout_height="fill_parent" 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" android:background="@color/orange"> 
    <Button android:text="Initial Screen" android:id="@+id/Button2" 
     android:layout_width="fill_parent" android:layout_height="wrap_content" 
     android:padding="10dp" android:layout_margin="10dp"> 
    </Button> 
</LinearLayout> 

詳細については、彼の質問:Developing an Android Homescreen

+0

私は似たような解決策を打ち出しました。私はFrameLayoutの周りに自分のオブジェクトを書き、レイヤーをより具体的に制御しました。ものは今うまくいくようです。 – Aaron