一个Android屏幕有三种类型的互动程序

一个Android屏幕有三种类型的互动程序,android,Android,我想使用三种重复的瓷砖作为一个Android屏幕的背景。以下是我想要达到的最终结果 可以在Android中完成吗?在drawable文件夹中创建一个xml,并使用以下代码 <?xml version="1.0" encoding="utf-8"?> <bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/YOUR_IMAGE androi

我想使用三种重复的瓷砖作为一个Android屏幕的背景。以下是我想要达到的最终结果


可以在Android中完成吗?

在drawable文件夹中创建一个xml,并使用以下代码

<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/YOUR_IMAGE
    android:antialias="true"
    android:dither="false"
    android:filter="false"  
    android:gravity="fill" 
    android:tileMode="repeat" />   


在主布局内创建三个布局即可完成设计

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".SplashActivity" >

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_weight="4"
        android:background="@drawable/woodentile" >


    </RelativeLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0sp"
        android:layout_weight="1"
        android:background="@drawable/woodenshadowtile" >
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0sp"
        android:layout_weight="1"
        android:background="@drawable/papertile" >
    </LinearLayout>

</LinearLayout>

在drawable文件夹中需要三个位图文件。我将以woodentile.xml为例

<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:dither="true"
    android:src="@drawable/inno_luck_wood_pattern_background"
    android:tileMode="repeat" >

</bitmap>


就这样。这样做会产生我想要创建的设计。

是的,但您必须进行布局。答案是:是的,您可以。虽然我只能看到两块“瓷砖”(木头和混凝土)。其余的是图标或背景。有一个阴影落在木瓦上。不管怎样,如果你能告诉我在哪里可以阅读关于如何做的教程,我将非常感激。