当前位置: 首页 > news >正文

古田路9号设计网站在线制作图片拼图

古田路9号设计网站,在线制作图片拼图,中科诚建建设工程有限公司网站,镇平县两学一做网站最近需要用到微信的标签功能(如下图所示)。该功能可以添加已有标签#xff0c;也可以自定义标签。也可以删除已编辑菜单。研究了一番。发现还是挺有意思的#xff0c;模拟实现相关功能。该功能使用类似FlowLayout的功能。Flowlayout为一个开源软件(https://github.com/ApmeM/…最近需要用到微信的标签功能(如下图所示)。该功能可以添加已有标签也可以自定义标签。也可以删除已编辑菜单。研究了一番。发现还是挺有意思的模拟实现相关功能。该功能使用类似FlowLayout的功能。Flowlayout为一个开源软件(https://github.com/ApmeM/android-flowlayout)功能为自动换行的布局类型import android.content.Context;import android.util.AttributeSet;import android.view.View;import android.view.ViewGroup;/**** author RAW*/public class FlowLayout extends ViewGroup {private final static int PAD_H 2, PAD_V 2; // Space between child views.private int mHeight;public FlowLayout(Context context) {super(context);}public FlowLayout(Context context, AttributeSet attrs) {super(context, attrs);}Overrideprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {assert (MeasureSpec.getMode(widthMeasureSpec) ! MeasureSpec.UNSPECIFIED);final int width MeasureSpec.getSize(widthMeasureSpec) - getPaddingLeft() - getPaddingRight();int height MeasureSpec.getSize(heightMeasureSpec) - getPaddingTop() - getPaddingBottom();final int count getChildCount();int xpos getPaddingLeft();int ypos getPaddingTop();int childHeightMeasureSpec;if(MeasureSpec.getMode(heightMeasureSpec) MeasureSpec.AT_MOST)childHeightMeasureSpec MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST);elsechildHeightMeasureSpec MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);mHeight 0;for(int i 0; i count; i) {final View child getChildAt(i);if(child.getVisibility() ! GONE) {child.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST), childHeightMeasureSpec);final int childw child.getMeasuredWidth();mHeight Math.max(mHeight, child.getMeasuredHeight() PAD_V);if(xpos childw width) {xpos getPaddingLeft();ypos mHeight;}xpos childw PAD_H;}}if(MeasureSpec.getMode(heightMeasureSpec) MeasureSpec.UNSPECIFIED) {height ypos mHeight;} else if(MeasureSpec.getMode(heightMeasureSpec) MeasureSpec.AT_MOST) {if(ypos mHeight height) {height ypos mHeight;}}height 5; // Fudge to avoid clipping bottom of last row.setMeasuredDimension(width, height);} // end onMeasure()Overrideprotected void onLayout(boolean changed, int l, int t, int r, int b) {final int width r - l;int xpos getPaddingLeft();int ypos getPaddingTop();for(int i 0; i getChildCount(); i) {final View child getChildAt(i);if(child.getVisibility() ! GONE) {final int childw child.getMeasuredWidth();final int childh child.getMeasuredHeight();if(xpos childw width) {xpos getPaddingLeft();ypos mHeight;}child.layout(xpos, ypos, xpos childw, ypos childh);xpos childw PAD_H;}}} // end onLayout()}以上所述是小编给大家介绍的android模仿微信收藏文件的标签处理功能希望对大家有所帮助如果大家有任何疑问请给我留言小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持
http://www.pierceye.com/news/696425/

相关文章:

  • 网站建设制作要学什么软件福建省城乡建设厅网站
  • 网站遇到攻击时应该怎么做网络广告推广平台
  • 老牌网站建深圳市建设工程服务交易中心
  • 网页界面设计布局青岛百度关键词优化
  • 彩票网站APP建设seo为什么不景气了
  • ps做网站标签wordpress 角色和权限管理
  • 网站建设情况报告范文微网站可以做成域名访问
  • 增城网站公司电话西安高端网站建设首选
  • 信息流广告素材网站零基础学做网站
  • 北京服饰网站建设实训百度搜索引擎的总结
  • 营销型网站建设的一般过程包括哪些环节?体育视频网站建设
  • 门户网网站seo怎么做电子商务平台怎么注册
  • 凡科网站插件代码阿里云网站备案后
  • 网站用什么系统好用免费网站建设找哪家
  • 网站到期续费吗网站开发是培训
  • 别人帮做的网站怎么修改怎么做产品推广和宣传
  • 国内返利网站怎么做php建设网站工具
  • 网站设计教程文档创业商机网农村
  • 宁夏交通建设质监局官方网站免费注册二级域名的网站
  • 网站门户设计网站建设有没有做的必要
  • 建模师的就业前景整站优化工具
  • 微信公众号怎么做链接网站网站404 原因
  • 安卓手机做服务器网站网站设计时多页面切换时什么控件
  • 长沙正规网站建设价格网站推广怎么发外链
  • 专业版装修用什么网站做导航条深圳网站制作易捷网络
  • 哪个公司建设网站好手机网站维护费
  • 中山高端网站建设wordpress调用分类文章列表
  • 营销网站的专业性诊断评价和优化做视频网站需要什么资质
  • 河南广告制作公司网站西班牙语网站设计公司哪家好
  • 做业务一般要注册哪些网站wordpress prepare