会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
lei.li
android 开发相关分享
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
10
下一页
2021年11月5日
线程同步synchronized
摘要: 实现同步机制有两个方法: 1、同步代码块: synchronized(同一个数据){} 同一个数据:就是N条线程同时访问一个数据。 2、同步方法: public synchronized 数据返回类型方法名(){} 线程通讯: 当 使用synchronized 来修饰某个共享资源时(分同步代码块和同
阅读全文
posted @ 2021-11-05 16:06 adam.li
阅读(84)
评论(0)
推荐(0)
2021年10月27日
bind service client不引用aidl
摘要: bind service client不引用aidl创建单独的aidl仓库,在该仓库添加aidl文件,IService.aidl,定义可供client连接的aidl类添加aidl文件 IClientListener.aidl,定义可供client接收消息的aidl类1.在aidl仓库创建 MyMan
阅读全文
posted @ 2021-10-27 08:52 adam.li
阅读(88)
评论(0)
推荐(0)
2021年9月8日
as中应用引用其他moudle目录的方法
摘要: as中应用引用其他moudle的方法1.在settings.gradle文件中include ':modulename'project(":modulename").projectDir = file("../../modulename里面一层目录(比如app)")2.implementation
阅读全文
posted @ 2021-09-08 15:10 adam.li
阅读(231)
评论(0)
推荐(0)
2021年6月9日
AS模拟器联网方法
摘要: 1、adb shell settings put global http_proxy 19.12.32.11:83 2、修改模拟器dns:adb setprop net.dns1 电脑dns地址先查询dns执行命令:ipconfig -all,找到如下信息, DNS Servers . . . .
阅读全文
posted @ 2021-06-09 11:15 adam.li
阅读(364)
评论(0)
推荐(0)
2021年4月6日
ConstraintLayout 布局和动画使用
摘要: 一、百分比布局使用Guideline <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com
阅读全文
posted @ 2021-04-06 15:30 adam.li
阅读(324)
评论(0)
推荐(0)
2020年12月18日
RecyclerView 分页滑动,设置可以滑动下一页,下一个item作为起点方法
摘要: mStartSnapHelper.attachToRecyclerView(mRecyclerViewMovie);mStartSnapHelper.setPageListener(this);mRecyclerViewMovie.setLayoutManager(mVLinearLayoutMan
阅读全文
posted @ 2020-12-18 11:23 adam.li
阅读(382)
评论(0)
推荐(0)
2020年11月24日
Glide 加载图片 到动态ImageView
摘要: Glide.with(mContext) .asBitmap() .load(imageUrl) .apply(options) //.into(mImageView); .into(mTarget);下面在获取到下载图片尺寸信息后,基于图片宽高比,设置imageview宽高,给imageview
阅读全文
posted @ 2020-11-24 14:18 adam.li
阅读(505)
评论(0)
推荐(0)
2020年7月31日
一个例子了解 HandlerThread,Looper,ThreadLocal,Handler,MessageQueue,Message的关系
摘要: 我们经常会用到 HandlerThread 在线程中执行Runnable方法,调用代码如下, private HandlerThread mHandlerThread = new HandlerThread("MainActivity");mHandlerThread.start(); mWorkH
阅读全文
posted @ 2020-07-31 10:20 adam.li
阅读(231)
评论(0)
推荐(0)
2020年7月23日
android TabLayout 相关
摘要: 1. TabLayout 设置 指示条 颜色、高度,字体颜色大小等 <android.support.design.widget.TabLayout android:id="@+id/tab_layout" android:layout_width="wrap_content" android:la
阅读全文
posted @ 2020-07-23 17:14 adam.li
阅读(179)
评论(0)
推荐(0)
2020年7月22日
屏幕相关
摘要: public Point getScreenSize(Context context) { Point point = new Point(); WindowManager windowManager = (WindowManager) context.getSystemService( Conte
阅读全文
posted @ 2020-07-22 13:25 adam.li
阅读(141)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
10
下一页
公告