机器人的EditText的背景 [英] android EditText's background
问题描述
我想设置为我的EditText 背景。
I would like to set to my EditText background .
唔...我不知道,甚至如何解释....
当有大量的文本垂直滚动使...
我需要滚动的背景,当用户滚动文本(现在我有,当用户滚动文本的背景是固定的,所以文字变得由背景的线条交叉)
Hm ... I don't know even how to explain .... When there is a lot of text vertical scroll enables ... I need to 'scroll' the background when user scrolls the text (Now I have that when user scrolls the text background is fixed, so text became crossed by lines of background)
你有什么想法?
推荐答案
创建这样一个XML格式的绘制的线条为mybackground.xml,其中@绘制/分配器将与线之间的prefered空间的线条图像
Create a drawable in xml like this for lines as mybackground.xml, where @drawable/divider will be your line image with the prefered space between lines
<bitmap android="http://schemas.android.com/apk/res/android"
android:src="@drawable/divider"
android:tileMode="repeat"
android:dither="true"
/>
和设置的EditText控件的下列属性来调整
and set the following attributes in EditText control to adjust the
android:background="@drawable/mybackground"
android:lineSpacingExtra="Your Value"
android:lineSpacingMultiplier="Your Value"
这篇关于机器人的EditText的背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!