Мне нужно использовать видео в качестве фона. Сначала я поместил видеофайл в выпадающую папку и назвал фон LinearLayout
в main.xml. Но во время работы приложения я увидел только черный экран. Затем я попытался использовать VideoView
и назвал его следующим:
<VideoView
android:id="@+id/video"
android:layout_width="320px"
android:layout_height="240px"
android:layout_gravity="center"
android:background="@raw/hp"/>
В моем файле активности я назвал его следующим фрагментом кода:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
VideoView video=(VideoView) findViewById(R.id.video);
video.start();
}
Но я все равно не получаю видеофайл. Моим основным предложением является использование пузырькового видео в качестве фона и наложение на него двух кнопок пузырьков и предоставление пользователю ощущения, как экран с видом на воду. Может кто-нибудь мне помочь?
Также видеофайл, который я хочу использовать из папки res. Не с SD-карты или с любой внешней папки.