会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
荣超
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
10
11
12
13
14
15
16
17
18
···
31
下一页
2020年8月24日
vue cli filter使用
摘要: 在src目录创建(main.js所在目录) filter目录 创建index.js 在main.js中 import 该js文件即可 (或者直接把定义的filter放到main.js 中 ,建议新建一个js文件,都放mian.js里面看起来东西太多了有点乱) 我这里定义一个 日期格式化过滤器 ,可以
阅读全文
posted @ 2020-08-24 11:08 荣超
阅读(512)
评论(0)
推荐(0)
2020年8月20日
android popupwindow 自定义视图
摘要: 宽高一定要设置否者设置宽高时,(popupwindow)需要注意高度要减去顶部状态栏的高度 (如果你的activity是全屏模式的话,可以不用处理)当然我们也可以自己设置高度 比如可以设置屏幕高度的一半或者其他 //获取顶部状态栏的高度val resourceId: Int = context.re
阅读全文
posted @ 2020-08-20 18:24 荣超
阅读(568)
评论(0)
推荐(0)
android 获取顶部状态栏的高度
摘要: val resourceId: Int = activity.resources.getIdentifier("status_bar_height", "dimen", "android") val statusBarHeight: Int = activity.resources.getDimen
阅读全文
posted @ 2020-08-20 18:07 荣超
阅读(4026)
评论(0)
推荐(1)
android 显示和隐藏输入法框
摘要: 显示输入法 val manager = context?.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager? manager?.showSoftInput(v, InputMethodManager.SHOW_I
阅读全文
posted @ 2020-08-20 16:01 荣超
阅读(762)
评论(0)
推荐(0)
2020年8月8日
android tablayout + recycleview 简单使用
摘要: //添加tab 并设置为已选中 tab_layout.addTab(tab_layout.newTab().setText("请选择"),0,true) //跳转到selectedPos位置,并让其置顶(只要有置顶的条件) (recycle_view.layoutManager as LinearL
阅读全文
posted @ 2020-08-08 09:40 荣超
阅读(1151)
评论(0)
推荐(0)
2020年8月7日
jetpack paging使用
摘要: 首先要重写 DataSource ItemKeyedDataSource 根据数据的最后一条数据的ID 得到下一页的数据 PageKeyedDataSource 这个是普通的分页(第一页,第二页) PositionalDataSource 按照索引位置加载数据 比如是索引0 一页显示20条数据 对应
阅读全文
posted @ 2020-08-07 15:51 荣超
阅读(437)
评论(0)
推荐(0)
2020年8月3日
android 自定义控件 属性配置
摘要: 需要在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 荣超
阅读(216)
评论(0)
推荐(0)
2020年7月31日
vueLazyload 图片懒加载
摘要: 安装 npm install vue-lazyload --save 在main.js全局引入 //使用默认配置 Vue.use(VueLazyload) // 自己配置参数 Vue.use(VueLazyload, { preLoad: 1.3, error: 'dist/error.png',
阅读全文
posted @ 2020-07-31 18:59 荣超
阅读(222)
评论(0)
推荐(0)
mysql 合并查询 UNION
摘要: 语法 SELECT expression1, expression2, ... expression_n FROM tables [WHERE conditions] UNION [ALL | DISTINCT] SELECT expression1, expression2, ... expres
阅读全文
posted @ 2020-07-31 10:15 荣超
阅读(1171)
评论(0)
推荐(0)
2020年7月30日
vue 使用vuedraggable 实现列表拖拽排序
摘要: 首先安装 npm install vuedraggable --save 页面使用时引入import Draggable from 'vuedraggable' export default { name: "draggable", components: { Draggable }, data()
阅读全文
posted @ 2020-07-30 18:16 荣超
阅读(1488)
评论(0)
推荐(0)
上一页
1
···
10
11
12
13
14
15
16
17
18
···
31
下一页
公告