アンドロイドホームページの背景を作りたいです。私はビデオファイルhp.mkvをドロウアブルフォルダにインポートしました。 main.xmlのファイルを呼び出します。以下は私のコードスニペットです:アプリをバックグラウンドで再生していますか?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/hp">
<Button android:id="@+id/next_button"
android:layout_width="200dp"
android:layout_height="200dp"
android:gravity="center"
android:layout_marginLeft="270dp"
android:layout_marginTop="180dp"
android:background="@drawable/button_background"/>
</RelativeLayout>
もう一度このように呼ばれる主なアクティビティファイル:setContentView(R.layout.main);
しかし、アプリケーションを実行している間、私はビデオファイルが来ると期待していたボタンの後ろに黒い画面が表示されるのを見ました。いずれにせよこの問題から脱出する方法を教えてもらえますか? Androidのアプリの背景に動画を使用する方法
しかし、画像ではなくアプリの画面の背景としてその動画を作成できるかどうか教えてください。実際に私のアプリケーションのボタンの後ろに水泡効果が必要ですか? – jyotiprakash
これを行うことができるはずです。 MediaPlayerの詳細については、http://developer.android.com/reference/android/media/MediaPlayer.htmlをご覧ください。 – inazaruk