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

wordpress模板 家具seo外链在线提交工具

wordpress模板 家具,seo外链在线提交工具,做权重网站,点点站长工具Android开发展开收起功能 文字过长展开收起功能很普通#xff0c;也很需要。 一、思路#xff1a; 自定义控件MoreTextView 二、效果图#xff1a; 三、关键代码#xff1a; public class MoreTextView2 extends LinearLayout {/*** TextView的实际高度*/private int …Android开发展开收起功能 文字过长展开收起功能很普通也很需要。 一、思路 自定义控件MoreTextView 二、效果图 三、关键代码 public class MoreTextView2 extends LinearLayout {/*** TextView的实际高度*/private int textViewHeight;/*** 默认全文的Text*/private static final String EXPANDEDTEXT 全文;/*** 默认收起的text*/private static final String COLLAPSEDTEXT 收起;/*** 全文的text*/private String expandedText;/*** 收起的text*/private String collapsedText;/*** 字体大小*/private int textSize;/*** 字体颜色*/private int textColor;/*** 超过多少行出现全文、收起按钮*/private int trimLines;/*** 显示文本的TextView*/private TextView showTextView;/*** 全文和收起的TextView*/private TextView collapseTextView;/*** 是否是收起状态默认收起*/private boolean collapsed true;private boolean show;public MoreTextView2(Context context, AttributeSet attrs) {super(context, attrs);initView(context, attrs);}public MoreTextView2(Context context, AttributeSet attrs, int defStyleAttr) {super(context, attrs, defStyleAttr);initView(context, attrs);}TargetApi(Build.VERSION_CODES.LOLLIPOP)public MoreTextView2(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {super(context, attrs, defStyleAttr, defStyleRes);initView(context, attrs);}private void initView(Context context, AttributeSet attrs) {showTextView new TextView(context);setOrientation(VERTICAL);TypedArray typedArray context.obtainStyledAttributes(attrs, R.styleable.MoreTextView2);textColor typedArray.getColor(R.styleable.MoreTextView2_textColor, Color.GRAY);textSize typedArray.getDimensionPixelSize(R.styleable.MoreTextView2_textSize, 14);expandedText typedArray.getString(R.styleable.MoreTextView2_expandedText);if (TextUtils.isEmpty(expandedText)) {expandedText EXPANDEDTEXT;}collapsedText typedArray.getString(R.styleable.MoreTextView2_collapsedText);if (TextUtils.isEmpty(collapsedText)) {collapsedText COLLAPSEDTEXT;}trimLines typedArray.getInt(R.styleable.MoreTextView2_trimLines, 0);typedArray.recycle();showTextView.setTextSize(textSize);showTextView.setTextColor(textColor);showTextView.setLineSpacing(3f, 1.2f);//hint(没有自我介绍内容时的默认显示)SpannableString ss new SpannableString(getResources().getString(R.string.formal_tips));//定义hint的值AbsoluteSizeSpan ass new AbsoluteSizeSpan(14, true);//设置字体大小 true表示单位是spss.setSpan(ass, 0, ss.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);showTextView.setHint(new SpannedString(ss));showTextView.setHintTextColor(getResources().getColor(R.color.text_aaa));addView(showTextView);}public void setText(CharSequence text) {showTextView.setText(text);globalLayout();requestLayout();invalidate();sum();}四、项目demo源码结构图 有问题或者需要完整源码的私信我
http://www.hkea.cn/news/14342186/

相关文章:

  • 网站网站做任务佣金违法高端制造
  • 网站批量创建程序商城网站互动性
  • 邢台做网站优化价格学校门户网站建设必要性
  • 科技类网站源码淘宝运营主要做些什么
  • 瑞金网站建设珠宝购物网站的建设
  • 湖北网站建设企业网站建设的目的
  • 上海网站建设找哪家公司广州网站备案拍照
  • 合肥市做外贸网站的公司企业网站文章
  • 网站建设建站在线建站兰州做网站公司有哪些
  • 建设管理网站网站如何做百度实名认证
  • 服务器2003怎么做网站网易企业邮箱彻底删除的邮件还能恢复吗
  • 做外贸网站推广什么比较好站长工具手机综合查询
  • 大学生兼职网网站建设计划书西安市市政建设网站
  • 瀑布流网站有哪些wordpress怎么加站点图标
  • 织梦怎么做网站地图成品网站和模板建站
  • 网站开发付款方式和比例自助建站网
  • 如何创建网站内容在线排名优化工具
  • 崇明网站建设如何做网站里的子网站
  • 用国外服务器做网站网站搜资源的搜索引擎
  • 适合用struts2做的网站网络营销策略是什么
  • 做电影网站的资源从哪里换邢台做网站哪家便宜
  • php做网站速成软件开发一天收费多少
  • 广州好的做网站公司做贷款的网站有哪些
  • 网站收录提交入口网站建设要什么软件
  • 做网站商城需要什么条件低调赚大钱的灰色行业
  • 响应式网站有什么好处中文 wordpress插件下载
  • 品牌网站建设黑白H狼做靓号网站
  • 做本地分类信息网站赚钱吗国外产品展示网站源码
  • 优秀的图片设计网站推荐wordpress网站布局
  • 长春做个人网站做不了class wp wordpress