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

北京sem网站电商的推广方式

北京sem网站,电商的推广方式,书店网站模板下载,北京网络公司网站一、Text fieids 允许用户在 UI 中输入文本#xff0c;TextInputLayout TextInputEditText。 在 Text fieids 没出来(我不知道)前#xff0c;想实现这个功能就需要自己自定义控件来实现这个功能。 几年前做个上面这种样式(filled 填充型)。需要多个控件组合 动画才能实现TextInputLayout TextInputEditText。 在 Text fieids 没出来(我不知道)前想实现这个功能就需要自己自定义控件来实现这个功能。 几年前做个上面这种样式(filled 填充型)。需要多个控件组合 动画才能实现而且需要处理的逻辑也很多。 了解到 Text fieids 那么你仅需 TextInputLayout TextInputEditText 即可实现之前的 UI 效果是不是美滋滋一起来研究一下现在用不上指不定啥时候就用上了。 「代码上一波特别简单」 ?xml version1.0 encodingutf-8? LinearLayout xmlns:androidhttp://schemas.android.com/apk/res/androidxmlns:apphttp://schemas.android.com/apk/res-autoandroid:layout_widthmatch_parentandroid:layout_heightmatch_parentandroid:orientationverticalandroid:padding16dpcom.google.android.material.textfield.TextInputLayoutstylestyle/Widget.MaterialComponents.TextInputLayout.FilledBoxandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:layout_margin8dpandroid:hint请输入用户名com.google.android.material.textfield.TextInputEditTextandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:backgroundandroid:color/transparentandroid:inputTypephone //com.google.android.material.textfield.TextInputLayoutcom.google.android.material.textfield.TextInputLayoutandroid:idid/text_inputandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:layout_margin8dpandroid:hint请输入密码app:counterEnabledtrueapp:counterMaxLength10app:errorEnabledtrueapp:passwordToggleEnabledtrueapp:passwordToggleTintModemultiplycom.google.android.material.textfield.TextInputEditTextandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:backgroundandroid:color/transparentandroid:inputTypetextPassword //com.google.android.material.textfield.TextInputLayoutcom.google.android.material.textfield.TextInputLayoutstylestyle/Widget.MaterialComponents.TextInputLayout.OutlinedBoxandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:layout_margin8dpandroid:hint请输入用户名com.google.android.material.textfield.TextInputEditTextandroid:layout_widthmatch_parentandroid:layout_heightwrap_content //com.google.android.material.textfield.TextInputLayoutcom.google.android.material.textfield.TextInputLayoutstylestyle/Widget.MaterialComponents.TextInputLayout.OutlinedBoxandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:layout_margin8dpandroid:hint请输入密码com.google.android.material.textfield.TextInputEditTextandroid:layout_widthmatch_parentandroid:layout_heightwrap_content //com.google.android.material.textfield.TextInputLayout/LinearLayout1.1 特性 确保文本字段看起来具有交互性 两种类型填充型(filled)和轮廓型(outlined)默认填充型 文本字段的状态空白、有输入、错误等应该一目了然 保持标签和错误消息简短且易于采取行动 文本字段通常出现在表单和对话框中 1.2 TextInputLayout 继承 LinearLayout 包装 TextInputEditText、EditText 或子类的布局以便在用户输入文本时隐藏提示时显示浮动标签。 package com.google.android.material.textfield; public class TextInputLayout extends LinearLayout { }显示错误文字(图标) setErrorEnabled(boolean) setError(CharSequence) setErrorIconDrawable 显示帮助文本setHelperTextEnabled(boolean) setHelperText(CharSequence) setPlaceholderText(CharSequence) 显示占位符文本 显示字符计数器setCounterEnabled(boolean) setCounterMaxLength(int) 密码可见性/清除文本 setEndIconMode(int) 后缀文本setSuffixText 前缀文本setPrefixText binding.textInput!!.suffixText  /100binding.textInput!!.prefixText  进度还有不少用到了可以自己研究研究常用的大概就这么些这些也可以在xml中直接设置。 错误提示(样式文案)是在 TextInputLayout 中设置而不是 TextInputEditText 。 二、填充型(filled) 图片摘自官网 容器(TextInputLayout) 前导图标(可选)例如密码的小锁子图标 标签文本(空态) 标签文本(已输入内容) 尾随图标 (可选) 光标 输入内容 提示文字 (可选) 底部横线 (未选中) 底部横线 (enabled选中) 支持的功能比较全如果自己写这么一个控件还是比较复杂的需要隐藏显示控件处理各种状态修改文字颜色。现在有这么个控件直接使用真香。 com.google.android.material.textfield.TextInputLayoutandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:layout_margin8dpandroid:hint请输入用户名com.google.android.material.textfield.TextInputEditTextandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:backgroundandroid:color/transparentandroid:inputTypephone //com.google.android.material.textfield.TextInputLayoutcom.google.android.material.textfield.TextInputLayoutandroid:idid/text_inputandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:layout_margin8dpandroid:hint请输入密码app:counterEnabledtrueapp:counterMaxLength10app:errorEnabledtrueapp:passwordToggleEnabledtrueapp:passwordToggleTintModemultiplycom.google.android.material.textfield.TextInputEditTextandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:backgroundandroid:color/transparentandroid:inputTypetextPassword //com.google.android.material.textfield.TextInputLayout 三、轮廓型(outlined) 支持的点跟上面填充型(filled)差不多可以借鉴一下。 com.google.android.material.textfield.TextInputLayoutstylestyle/Widget.MaterialComponents.TextInputLayout.OutlinedBoxandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:layout_margin8dpandroid:hint请输入用户名com.google.android.material.textfield.TextInputEditTextandroid:layout_widthmatch_parentandroid:layout_heightwrap_content //com.google.android.material.textfield.TextInputLayoutcom.google.android.material.textfield.TextInputLayoutstylestyle/Widget.MaterialComponents.TextInputLayout.OutlinedBoxandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:layout_margin8dpandroid:hint请输入密码com.google.android.material.textfield.TextInputEditTextandroid:layout_widthmatch_parentandroid:layout_heightwrap_content //com.google.android.material.textfield.TextInputLayout
http://www.yutouwan.com/news/83309/

相关文章:

  • 阿里云网站商城建设wordpress 首页打不开
  • 动易论坛官方网站阿里云域名注册及备案
  • 免费建站模板哪个好wordpress 爆破
  • 十堰网站优化湛江百度网站快速排名
  • 可以在线做试卷的网站医院信息化建设会议安排网站
  • 围场网站建设网络公司是做什么的?
  • 手机网站seo网站建设 ipc备案
  • 新网站外链怎么做国外做储物的网站
  • 重庆网站建设索q479185700自己想做个网站
  • 小米路由器mini做网站响应式网站怎么做
  • 网站服务器免费吗最近七天的新闻大事
  • 网站建设横幅标语网站空间租用哪个好
  • 新的网站后台不显示网站栏目软文500字范文
  • 微信网站建设知识上海共有多少家企业
  • wordpress页面可视编辑wordpress seo自定义
  • 网站上传权限芜湖公司做网站
  • 庆阳网站设计报价网站设计能出来什么
  • 张家港高端网站建设16素材网
  • 广东企业备案 网站建设方案书口碑好的移动网站建设
  • 折再返怎么 做网站网站建设工作的作用
  • seo百度网站排名研究中心关键词首页优化移动端网站宽度做多大
  • 国外免费搭建网站源码wordpress 主题 her
  • 快速建设企业网站vs网站开发建表怎么肩啊
  • 灵璧哪有做网站的建站工具介绍
  • dw旅游网站模板超级优化大师
  • 做网站好还是做app好广州网站优化公司
  • 自己做网站需要做啥青岛市黄岛区建设局网站
  • 怎么弄公司网站搜狗指数官网
  • 爱射影院网站建设中杭州营销型网站建设
  • 企业网站建站技术网站内容管理系统怎么用