我可以将android应用程序的背景设置为一组图像吗?

我可以将android应用程序的背景设置为一组图像吗?,android,android-layout,android-background,Android,Android Layout,Android Background,我需要帮助将我的应用程序背景设置为照片库。。。可能吗?如何做到这一点?您可以使用网格视图以列和行的方式显示图像。有关更多信息,您可以查看。您可以通过将id指定给父布局来完成此操作,然后在java中,您可以在执行某个操作后更改背景图像。您可以使用不对称的Gridview来获得有吸引力的画廊视图 您可以使用库是的,您可以通过创建包含图像的动画来使用库,然后我将此动画设置为背景 // Type casting the Image View ImageView view = (I

我需要帮助将我的应用程序背景设置为照片库。。。可能吗?如何做到这一点?

您可以使用网格视图以列和行的方式显示图像。有关更多信息,您可以查看。

您可以通过将
id
指定给父布局来完成此操作,然后在java中,您可以在执行某个操作后更改背景图像。

您可以使用不对称的Gridview来获得有吸引力的画廊视图


您可以使用库

是的,您可以通过创建包含图像的动画来使用库,然后我将此动画设置为背景

        // Type casting the Image View
    ImageView view = (ImageView) findViewById(R.id.imageView1);

    // Setting animation_list.xml as the background of the image view
    view.setBackgroundResource(R.anim.animation);

    // Type casting the Animation drawable
    AnimationDrawable frameAnimation = (AnimationDrawable) view.getBackground();
    frameAnimation.start();
动画xml示例:

    <?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false">
    <item android:drawable="@drawable/image_1" android:duration="3000" />
    <item android:drawable="@drawable/image_2" android:duration="3000" />
    <item android:drawable="@drawable/image_3" android:duration="3000" />   

</animation-list>


您到底想实现什么目标?您希望图像在背景或拼贴中以幻灯片形式显示,或者确切的用例是什么?您可以使用相对布局并在其中添加gridview,然后在gridview上方添加,viewsHope的其余部分会有所帮助。是的,您可以说喜欢幻灯片,我的意思是我想创建控件和其他东西……但是背景随着特定的图片不断变化@sayalepothetank you,我会试试@NayraAhmed(R.anim.animation)到底是什么“动画?它是包含xml中描述的图像的动画ID,每个图像持续显示3秒,然后下一个。。。检查此链接