ビュー フリッパーを使用して、2 つのビュー間の遷移をアニメーション化しようとしています。デフォルトでは、ViewFlipper は Out アニメーションを In アニメーションの上に Z オーダーで配置するようです。着信アニメーションを発信アニメーションの上に表示する方法はありますか?
ありがとう
ビュー フリッパーを使用して、2 つのビュー間の遷移をアニメーション化しようとしています。デフォルトでは、ViewFlipper は Out アニメーションを In アニメーションの上に Z オーダーで配置するようです。着信アニメーションを発信アニメーションの上に表示する方法はありますか?
ありがとう
この機能はAndroidランチャーにあります。Androidはオープンソースであるため、コピーして操作するだけです。
DragableSpaceと呼ばれるこのコードを取ります:http ://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>
詳細については、次の質問を確認してください:Androidホーム画面の開発