解说社区

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1631|回复: 19

看各位讨论lua讨论的停火我也来趁此机会凑凑热闹。分享检访QQ消息列表布局。

[复制链接]
发表于 2020-4-21 13:07:05 来自手机 | 显示全部楼层 |阅读模式
[[各位好。
我是谁呢?大家不必知道。
我要干嘛呢?大家已经知道了。
这几天本人闲着没事儿研究了一下布局,结果竟然写出了一个检访QQ消息列表布局,在这里来分享分享。
注意,本人视力不太好,颜色这方面没有下功夫去弄,但是控件的位置我都是尽量能弄好就弄好,但是有些控件我实在摸不到在哪儿,于是就没有搞上去。
再注意,我这个布局里面有一些用的是中文函数,大家如果想用的话,请把它替换掉。
最后注意,消息列表,布局我是写好了,但是里面没有加上消息,要加消息的话可以用,addview加。
废话一大堆,接下来是正文。里面的控件ID和各变量等的名称在代码最后会有标注。
{
  LinearLayout;--线性布局
Orientation='vertical';--布局方向
layout_width='fill';--布局宽度
layout_height='fill';--布局高度
background='';--布局背景颜色(或图片路径)
{
LinearLayout;--线性布局
Orientation='horizontal';--布局方向
layout_width='fill';--布局宽度
layout_height='5%h';--布局高度
background='';--布局背景颜色(或图片路径)
{
TextView;--文本控件
layout_width='25%w';--文本宽度
layout_height='fill';--文本高度
Gravity='center';--对齐方式
textColor='#000000';--文本颜色

textSize='20sp';--文本大小
text="返回消息 99条未读";
onClick=function()
退出页面()
end
};
{
TextView;--文本控件
layout_width='55%w';--文本宽度
layout_height='fill';--文本高度
Gravity='center';--对齐方式
textColor='#000000';--文本颜色

textSize='20sp';--文本大小
text=name;
onClick=function()
end
};
{
TextView;--文本控件
layout_width='10%w';--文本宽度
layout_height='fill';--文本高度
Gravity='center';--对齐方式
textColor='#000000';--文本颜色

textSize='20sp';--文本大小
text=state;
onClick=function()
end
};
{
Button;--按钮控件

textSize='20sp';--文本大小
textColor='#000000';--文本颜色
layout_width='fill';--按钮宽度
layout_height='fill';--按钮高度
BackgroundColor='';--按钮背景颜色
text=button;
onClick=function()
print"好好聊天不行吗?别乱点"
end
};
};
{
LinearLayout;--线性布局
Orientation='vertical';--布局方向
layout_width='fill';--布局宽度
layout_height='65%h';--布局高度
background='';--布局背景颜色(或图片路径)
{
ScrollView;--竖向滚动
layout_width='fill';--布局宽度
layout_height='fill';--布局高度
id="scrollview";
--布局请写在这里
{
LinearLayout;--线性布局
Orientation='vertical';--布局方向
layout_width='fill';--布局宽度
layout_height='fill';--布局高度
background='';--布局背景颜色(或图片路径)
id="msgls"
};
};
};
{
LinearLayout;--线性布局
Orientation='horizontal';--布局方向
layout_width='fill';--布局宽度
layout_height='25%h';--布局高度
background='';--布局背景颜色(或图片路径)
{
EditText;--编辑框控件
--singleLine=true;--设置单行输入
layout_width='90%w';--编辑框宽度
layout_height='fill';--编辑框高度
textSize='20sp';--文本大小
textColor='#000000';--输入文本的颜色
--Hint='';--编辑框为空时提示的文本
HintTextColor='#000000';--编辑框内容为空的时候显示文本的颜色
id="emsg"
};
{
Button;--按钮控件

textSize='20sp';--文本大小
textColor='#000000';--文本颜色
layout_width='fill';--按钮宽度
layout_height='wrap';--按钮高度
BackgroundColor='';--按钮背景颜色
text="发送";
id="send"
};
};
{
LinearLayout;--线性布局
Orientation='horizontal';--布局方向
layout_width='fill';--布局宽度
layout_height='fill';--布局高度
background='';--布局背景颜色(或图片路径)
{
Button;--按钮控件

textSize='20sp';--文本大小
textColor='#000000';--文本颜色
layout_width='16.67%w';--按钮宽度
layout_height='fill';--按钮高度
BackgroundColor='';--按钮背景颜色
text="语音";
id="voice"
};
{
Button;--按钮控件

textSize='20sp';--文本大小
textColor='#000000';--文本颜色
layout_width='16.67%w';--按钮宽度
layout_height='fill';--按钮高度
BackgroundColor='';--按钮背景颜色
text="照片";
id="photo"
};
{
Button;--按钮控件

textSize='20sp';--文本大小
textColor='#000000';--文本颜色
layout_width='16.67%w';--按钮宽度
layout_height='fill';--按钮高度
BackgroundColor='';--按钮背景颜色
text="短视频录制及拍照";
id="record"
};
{
Button;--按钮控件

textSize='20sp';--文本大小
textColor='#000000';--文本颜色
layout_width='16.67%w';--按钮宽度
layout_height='fill';--按钮高度
BackgroundColor='';--按钮背景颜色
text="红包";
id="redbag"
};
{
Button;--按钮控件

textSize='20sp';--文本大小
textColor='#000000';--文本颜色
layout_width='16.67%w';--按钮宽度
layout_height='fill';--按钮高度
BackgroundColor='';--按钮背景颜色
text="表情";
id="emg"
};
{
Button;--按钮控件

textSize='20sp';--文本大小
textColor='#000000';--文本颜色
layout_width='fill';--按钮宽度
layout_height='fill';--按钮高度
BackgroundColor='';--按钮背景颜色
text="更多";
id="more"
};
};
};
--[[名称说明
name聊天对象的名称
state聊天对象的在线状态
button右上角按钮的名称
msgls聊天记录布局
emsg消息输入框
send发送按钮
voice语音按钮
photo照片按钮
record短视频录制及拍照按钮
redbag红包按钮
emg表情按钮
more更多按钮]]]]



  来自解说社区客户端
回复

使用道具 举报

 楼主| 发表于 2020-4-21 13:08:42 来自手机 | 显示全部楼层
如果有被过滤的字符可以联系我要txt版或者直接给aly文件。



  来自解说社区客户端
回复

使用道具 举报

 楼主| 发表于 2020-4-21 13:11:24 来自手机 | 显示全部楼层
本人刚学不久。一些ID和变量等的命名可能不太规范,各位谅解一下哈。



  来自解说社区客户端
回复

使用道具 举报

发表于 2020-4-21 13:15:21 来自手机 | 显示全部楼层
对我这个小白来说真的看不懂。



  来自解说社区客户端
回复

使用道具 举报

发表于 2020-4-21 14:03:12 来自手机 | 显示全部楼层
我需要一个lua文件,谢谢。



  来自解说社区客户端
回复

使用道具 举报

 楼主| 发表于 2020-4-21 14:06:36 来自手机 | 显示全部楼层
回复 5楼 zmy

我这只有aly文件。



  来自解说社区客户端
回复

使用道具 举报

发表于 2020-4-21 14:49:48 来自手机 | 显示全部楼层
回复 楼主问题真难写

谢谢楼主的分享,求包养



  来自解说社区客户端
回复

使用道具 举报

发表于 2020-4-21 16:25:48 来自手机 | 显示全部楼层
可以单独发一下代码吗?



  来自解说社区客户端
回复

使用道具 举报

发表于 2020-4-21 16:30:07 来自手机 | 显示全部楼层
同求



  来自解说社区客户端
回复

使用道具 举报

 楼主| 发表于 2020-4-21 17:49:21 来自手机 | 显示全部楼层
链接在




  来自解说社区客户端
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|解说社区

GMT+8, 2024-5-4 00:47 , Processed in 0.045475 second(s), 13 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表