- 博客(18)
- 问答 (1)
- 收藏
- 关注
原创 微信手机号授权解密失败问题现象和解决方法: getPhoneNumber
微信手机号授权解密失败问题现象和解决方法: getPhoneNumber
2022-06-09 16:13:28 8121 1
原创 Gradle 升级后,编译失败或打开APP crash
由于升级极光推送最新版, 必须对Gradle插件以及版本升级(最低3.6),不升级呢,华为渠道又release包失败,但是升级后续附带很多问,先是升级kotlin 插件(报错提示)......然后这样那样问题, 编译后,classNotFoundException,style资源找不到, 主页activity的layout xml失败, 诸多原因在内,后来慢慢找原因,最后再升级realm 插件后解决了问题,classpath "io.realm:realm-grad...
2022-05-16 18:38:54 470
转载 box-sizing 属性, 布局不同计算宽度
盒子的四个组成区域相对应,每个盒子有四个边界:内容边界 Content edge、内边距边界 Padding Edge、边框边界 Border Edge、外边框边界 Margin Edge。标准盒模型 box-sizing: content-box content-box: width = content width; height = content heightIE盒模型 box-sizing: border-box border-box: width = border + paddin
2021-04-08 18:02:43 198
原创 uni-app @tap 失效
item-menu 自定义组件, <item-menu :param="serviceTel" @tap="makeCall()"/> tap事件在小程序正常,但是H5和原生点击无效 <view @tap="makeCall()"> <item-menu :param="serviceTel" /> </view>再包裹一层view 即可解决记录一下,后面再看根源.....
2021-03-23 17:06:39 4441 1
原创 集成 Robust 一些点
插件,官网建议robust 插件放置application之后,但是始终有如下问题:Required: PROJECT. Found: EXTERNAL_LIBRARIES, PROJECT, SUB_PROJECTS, 后来发现是与realm-android冲突,现在顺序如下(不清楚是否有问题?):apply plugin: 'com.android.application'apply plugin: 'realm-android'//apply plugin: 'auto-patch-plu.
2020-09-22 17:45:37 354
原创 OkHttpUtils put 请求带JSON参数
try { JSONObject params = new JSONObject(); params.put("id", repairOrder.getId()); params.put("forwardId", transferReason.getId()); params.put("liableId", repairMaster.staffId); params.put("liableName", repairMaster.staffName); par.
2020-07-14 13:36:54 1524
原创 TextView 通过代码设置textview selector
记录一下:有时需要通过代码动态添加控件,如TextView 设置selector 中不同状态字体颜色getColorStateList():textview.setTextColor(getResources().getColorStateList(R.color.selector_tv_text_color_check));
2020-07-08 15:21:37 841
原创 /data/anr/traces.txt 下获取ANR日志, Permission deny 后可用adb bugreport
1, $adb shell cat /data/anr/traces.txt > ./traces.txt2, $adb bugreport PS:Permission deny $adb bugreport/data/user_de/0/com.android.shell/files/bugreports/bugreport-TAS-AN00-H...
2020-04-03 16:49:11 1284
原创 Retrofit post json 通过@Body 无法传递参数给后台
记录一下:Retrofit post json 通过@Body 无法传递参数给后方式一:-------------------------------------------------------@POST("xxxx/getBindHouseInfo")Observable<BaseResponse<EhecdHouse>> queryHouses(@Bod...
2020-02-17 11:09:26 2329
原创 Android webview 下载文件(文件名,扩展名)
Android webview 下载文件,有时候需要获取文件名,另外,有时候也需要知道扩展名。 如何获取扩展名呢,看看下面方法:protected String mDestFileDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) .getAbsolut...
2019-11-01 13:52:43 1174
转载 RecyclerView使用GridLayoutManager 通过ItemDecoration对item进行等分分隔
public class GridItemDecoration extends RecyclerView.ItemDecoration { protected int mSpace = 10; private boolean mIncludeEdge = true; public GridItemDecoration(int space) { this...
2019-07-01 17:34:13 4012
原创 RecyclerView 悬浮/粘性头部效果3种方式
总结下RecyclerView 悬浮/粘性头部实现的3种方式:1,xml布局中设定悬浮/粘性头部view,在RecyclerView滑动过程中动态修改其位置;参考:https://www.diycode.cc/topics/4082,ItemDecoration 实现(高耦合)参考:https://blog.csdn.net/qian520ao/article/details/76...
2019-05-22 18:09:18 2534 1
原创 The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDat
The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 1, found: 10000 Pager id: com.justbon.oa:id/vp_content Pag...
2018-11-30 10:06:24 472
原创 MediaCodec seekto()后解码播放视频,花屏?
通过 mVideoMediaExtractor.seekTo(mStartTimeStamp, MediaExtractor.SEEK_TO_CLOSEST_SYNC);之后解码通过SurfaceTexture播放视频,有些时候花屏,如下是本人解决方法:mVideoMediaExtractor.seekTo(mStartTimeStamp, MediaExtractor.SEEK_
2016-12-22 16:59:49 3352
原创 android videoview 播放有声音没有画面
android videoview 播放有声音没有画面 原因:1, 其父控件 android:layerType="software|hardware"有此设置, 那么会出现该问题, 如和解决呢 mVideoView.setZOrderOnTop(true); 可以解决但是此时若在videoview 上放其它控件,坏了,不行了,被遮住了。咋办?去掉andro
2016-06-24 16:03:23 6452 1
原创 View.setRotation() 结合 View.setTranslationX(),View.setTranslationX()
View.setRotation() 结合 View.setTranslationX(),View.setTranslationX()1, 手机平放, 左上角坐标(0, 0); 2, 比如LinerLayout 位于(0,0);NOTE:手机左转,那么使之LinerLayout显示正确,那么需要setRotation(90),即顺时针;如果LinerLayout
2016-01-15 18:10:56 2412
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人