与ImageView的在RelativeLayout的重复图片 [英] Repeat Image in with ImageView in RelativeLayout

查看:389
本文介绍了与ImageView的在RelativeLayout的重复图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想与的ImageView 重复图像与 RelativeLayout的。它可以是可以使用位图xml和使用TILEMODE 重复 RelativeLayout的,因为我所看到的东西在互联网上,他们都处理的LinearLayout

I want to repeat the image with ImageView with in RelativeLayout. Can it be possible to use the Bitmap xml and use tilemode "repeat" with RelativeLayout, because what I have seen things on Internet they all dealing with LinearLayout.

任何帮助或提示将受到热烈的欢迎。

Any help or tip will be warmly welcomed.

推荐答案

在创建名为后台XML文件中的绘制对象文件夹

Create an XML file named background in Drawable folder

background.xml

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

在您的相对布局添加上面的XML作为背景

In your Relative Layout add the above XML as background

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background" />

这篇关于与ImageView的在RelativeLayout的重复图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆