会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
程序猿
首页
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
10
11
···
20
下一页
2021年2月26日
Android中Handler使用postDelayed方法不生效
摘要: 需在主线程中操作 方法1(推荐): new Handler(Looper.getMainLooper()).postDelayed(new Runnable() { @Override public void run() { doSomething(); } },2000); 方法2: runOnU
阅读全文
posted @ 2021-02-26 20:07 乱炖er
阅读(1395)
评论(0)
推荐(0)
2021年2月21日
android.view.WindowLeaked: Activity com.activity.LoginActivity has leaked window DecorView@9a11182[] that was originally added here
摘要: 错误原因: 因为activity中的Dialog、PopupWindow不能脱离activity而单独存在。当Dialog、PopupWindow正在显示的时候而它们依附的activity却destroy了,就会出现WindowLeaked异常。 解决方案: 在activity的 onDestroy
阅读全文
posted @ 2021-02-21 11:38 乱炖er
阅读(2080)
评论(0)
推荐(0)
2021年2月19日
Default interface methods are only supported starting with Android N (--min-api 24): void androidx.lifecycle.DefaultLifecycleObserver.onCreate(androidx.lifecycle.LifecycleOwner)
摘要: android { compileSdkVersion 29 buildToolsVersion "29.0.3" defaultConfig { applicationId "com.abc" minSdkVersion 21 targetSdkVersion 29 versionCode 1 v
阅读全文
posted @ 2021-02-19 18:31 乱炖er
阅读(549)
评论(0)
推荐(0)
2021年2月6日
WARNING in log: (OperationalError('(pymysql.err.OperationalError) (2006, "MySQL server has gone away (BrokenPipeError(32, \'Broken pipe\'))")',),)
摘要: 超过8小时数据库未有连接会报该错 处理方案: 进入mysql,查询当前的连接超市时间 mysql> show global variables like '%timeout'; + + + | Variable_name | Value | + + + | connect_timeout | 10
阅读全文
posted @ 2021-02-06 12:20 乱炖er
阅读(362)
评论(0)
推荐(0)
2021年1月30日
EditText设置不可编辑,可以复制功能(最简单)
摘要: 首先设置不可编辑状态,基本上就是 android:editable="false" 但是我们会发现它已经被废弃了,虽然现在还可以用,但是已经不推荐了,不过我们可以用代码完成此功能。 editText.setKeyListener(null); 下面实现长按可复制功能,找到EditText的类,发现它
阅读全文
posted @ 2021-01-30 22:17 乱炖er
阅读(1221)
评论(0)
推荐(0)
2021年1月27日
linux遍历删除文件或文件夹
摘要: 遍历删除当前目录下指定名称的文件夹(-type d 来指定是删除文件) find . -name '*abc' -type d -print -exec rm -rf {} \; 遍历删除当前目录下指定名称的文件(-type f 来指定是删除文件) find . -name '*.log' -typ
阅读全文
posted @ 2021-01-27 13:07 乱炖er
阅读(1855)
评论(0)
推荐(0)
2021年1月26日
pycharm运行flask时指定端口
摘要: if __name__ == '__main__': app.run(debug=True, port=5050) 进行配置
阅读全文
posted @ 2021-01-26 20:45 乱炖er
阅读(472)
评论(0)
推荐(0)
2021年1月20日
Android LiveData
摘要: livedata基于其特性,当有一个全局的view时,一个activity在多次onCreate,会多次observe 需要手动处理 如果能用本地广播,还是用本地广播
阅读全文
posted @ 2021-01-20 21:24 乱炖er
阅读(148)
评论(0)
推荐(0)
2021年1月10日
sqlalchemy错误:sqlalchemy.orm.exc.DetachedInstanceError
摘要: 使用sqlchemy报错。 sqlalchemy.orm.exc.DetachedInstanceError: Instance <User at 0x809ab1f> is not bound to a Session; attribute refresh operation cannot pro
阅读全文
posted @ 2021-01-10 16:54 乱炖er
阅读(1512)
评论(0)
推荐(0)
2020年12月21日
android adapter.notifyDataSetChanged() 页面没有更新的原因
摘要: 使用 adapter.notifyDataSetChanged() 时,必须保证传进 Adapter 的数据 List 是同一个 List,而不能是其他对象,否则无法更新 listview。 如果adapter的数据源需要重新赋值,可先调用 list.clear(),清除所有数据,再将新数据添加到原
阅读全文
posted @ 2020-12-21 23:13 乱炖er
阅读(516)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
10
11
···
20
下一页