首先创建一个项目,删除默认的布局
添加一个线性布局,设置背景图片
width=-2
height=-2
orientation=vertical
background=@bg.png
在线性布局添加一个文本控件,设置一下属性
这里需要自己运行慢慢调试
width=-2
height=-2
text=文本2
typeface=@face.ttf
layout_marginTop=40dp
layout_marginLeft=30dp
layout_marginRight=60dp
textColor=#ff000000
textSize=10sp
添加一个文件命名为contents,写入文章内容
接下来在载入完毕事件写这个
//隐藏状态栏
uycl(true)
t()
{
//读取文章内容
fr("@contents.txt",txt)
ufnsui()
{
//修改文本控件的text
us(2,"text",txt)
}
}
最后运行就ok了
举报 0