08 2020 档案

摘要:在src目录创建(main.js所在目录) filter目录 创建index.js 在main.js中 import 该js文件即可 (或者直接把定义的filter放到main.js 中 ,建议新建一个js文件,都放mian.js里面看起来东西太多了有点乱) 我这里定义一个 日期格式化过滤器 ,可以 阅读全文
posted @ 2020-08-24 11:08 荣超 阅读(503) 评论(0) 推荐(0) 编辑
摘要:宽高一定要设置否者设置宽高时,(popupwindow)需要注意高度要减去顶部状态栏的高度 (如果你的activity是全屏模式的话,可以不用处理)当然我们也可以自己设置高度 比如可以设置屏幕高度的一半或者其他 //获取顶部状态栏的高度val resourceId: Int = context.re 阅读全文
posted @ 2020-08-20 18:24 荣超 阅读(549) 评论(0) 推荐(0) 编辑
摘要:val resourceId: Int = activity.resources.getIdentifier("status_bar_height", "dimen", "android") val statusBarHeight: Int = activity.resources.getDimen 阅读全文
posted @ 2020-08-20 18:07 荣超 阅读(4011) 评论(0) 推荐(1) 编辑
摘要:显示输入法 val manager = context?.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager? manager?.showSoftInput(v, InputMethodManager.SHOW_I 阅读全文
posted @ 2020-08-20 16:01 荣超 阅读(745) 评论(0) 推荐(0) 编辑
摘要://添加tab 并设置为已选中 tab_layout.addTab(tab_layout.newTab().setText("请选择"),0,true) //跳转到selectedPos位置,并让其置顶(只要有置顶的条件) (recycle_view.layoutManager as LinearL 阅读全文
posted @ 2020-08-08 09:40 荣超 阅读(1119) 评论(0) 推荐(0) 编辑
摘要:首先要重写 DataSource ItemKeyedDataSource 根据数据的最后一条数据的ID 得到下一页的数据 PageKeyedDataSource 这个是普通的分页(第一页,第二页) PositionalDataSource 按照索引位置加载数据 比如是索引0 一页显示20条数据 对应 阅读全文
posted @ 2020-08-07 15:51 荣超 阅读(425) 评论(0) 推荐(0) 编辑
摘要:需要在res/value/下常见attrs.xml 文件 <?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="MyView"> <attr name="bgColor" format="color" 阅读全文
posted @ 2020-08-03 10:43 荣超 阅读(210) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示