![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
安卓
vily_luky
爱哭,爱笑,爱学习
展开
-
增量ID处理
业务需求:业务需求:1: IM的msgId2: 商城的orderId3: 挂号Id。原创 2023-02-08 11:52:23 · 302 阅读 · 0 评论 -
raddioButton 取消选择
添加点击事件和控制标志位 // 用来做RadioGroup取消选中 private int lastId=-1; private View.OnClickListener onRadioButtonClick=v -> { if(lastId!=v.getId()){ lastId=v.getId(); }else{ mRg_form_other.clearCheck(); .原创 2021-04-26 14:32:04 · 115 阅读 · 0 评论 -
冷启动 黑白屏优化
<style name="RecordTheme" parent="@style/Theme.MaterialComponents.Light"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="android:windowBackground"&g...原创 2021-04-14 17:04:29 · 68 阅读 · 0 评论 -
RadioButton和CheckBox 默认样式出不来
低版本手机上 代码添加控件的时候 默认样式出不来 ColorStateList colorStateList = new ColorStateList( new int[][]{ new int[]{-android.R.attr.state_enabled}, //disabled new int[]{android.R.attr.state_enabled} ...原创 2021-04-13 10:56:38 · 161 阅读 · 0 评论 -
glide 圆角
RoundedCorners roundedCorners = new RoundedCorners(20); Glide.with(mContext).load(UIUtil.getDrawable(R.mipmap.rabbit)).apply(new RequestOptions ().transforms(new CenterCrop(), roundedCorners )).into(iv_icon);package com.bumptech.glide.load....原创 2021-01-25 16:43:10 · 205 阅读 · 0 评论 -
线程池管理
public class ThreadUtils { private static final String TAG = "ThreadUtils"; private static ThreadFactory sThreadFactory; private static ExecutorService mPool; private static ScheduledExecutorService sExecutor; public ThreadUtil.原创 2021-01-18 14:18:36 · 75 阅读 · 0 评论 -
开启允许后台运行
1: oppo 2:三星 3: 其他手机 ---耗电详情----允许后台运行原创 2020-10-06 17:36:20 · 1822 阅读 · 0 评论 -
popu自适应和软键盘
private int rootGravity = Gravity.NO_GRAVITY; public void showPopu(View view) { int[] offsets = calculateVerticalPopWindowPos(view ); Log.i(TAG, "showPopu: -------:" + offsets[0] + "----:" + offsets[1]); showAtLocation(...原创 2020-09-18 18:26:31 · 313 阅读 · 0 评论 -
桌面悬浮框,飘框
private void showDesk() { if(!PerssionUtils.initAlertPermission()){ return; } if( mDeskView!=null){ return; } mDeskView = new DeskWindowView(this); final WindowManager windowManager..原创 2020-09-10 14:40:29 · 155 阅读 · 0 评论 -
Android:禁用全局多点触控
<item name="android:windowEnableSplitTouch">false</item> <item name="android:splitMotionEvents">false</item>原创 2020-06-02 10:00:19 · 311 阅读 · 0 评论 -
androidX , 转场动画 ,动画过度
1: 依赖 implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'com.google.android.material:material:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'2:...原创 2020-05-08 16:33:44 · 439 阅读 · 0 评论 -
textIsSelectable 导致recycleview 不能滑动到底 自滑动
textIsSelectable 导致recycleview 不能滑动到底 自滑动原创 2020-05-06 14:54:15 · 205 阅读 · 0 评论 -
高德静态地图
String url = "http://restapi.amap.com/v3/staticmap?" + "location=" + longitude + "," + latitude + "&zoom=14" + "&scale=2&size="+120+"*"+68...原创 2020-05-06 10:07:34 · 629 阅读 · 0 评论 -
https://github.com/july1992/hevc-h265-camera2-mediacodc-
编解码 camera2https://github.com/july1992/hevc-h265-camera2-mediacodc-原创 2020-04-29 16:03:58 · 272 阅读 · 0 评论 -
RecycleView 有时不能滑动到底的问题
1: 嵌套: descendantFocusability2: implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.503: 更改layoutmLinearLayoutManager = new MyRecycleLayoutManager(context);mLinearLayoutMan...原创 2020-04-27 11:26:12 · 662 阅读 · 0 评论 -
安卓 自动填充版本号,默认keystore 读取地址
1:android{} 里面 applicationVariants.all { variant -> variant.outputs.all { output -> // each 改为 all def fileName = "senblo${variant.versionCode}.apk" def outFi...原创 2020-03-05 14:39:21 · 155 阅读 · 0 评论 -
更新手机库
adb rootadb remountadb push XXXXX.so /system/lib64/vndk-28/adb reboot原创 2020-03-03 11:36:57 · 328 阅读 · 0 评论 -
recycleView 页面不刷新 需要点击一下页面才能刷新列表的bug
fragment.getView().requestLayout()原创 2019-12-23 10:22:41 · 1407 阅读 · 1 评论 -
串口调试工具
https://github.com/Neutree/COMTool/releases原创 2019-12-10 13:48:34 · 204 阅读 · 0 评论 -
liniearLayout 点击带button 的水波纹涟漪效果
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="?attr/selectableItemBackground" android:onClick="sssss"></LinearL...原创 2019-12-05 10:19:16 · 249 阅读 · 0 评论 -
FastJson 转 map
String str = SPUtil.getStr(UIUtil.getContext(), MyConfig.SP_CACHE_FRIEND_MAP);if(TextUtils.isEmpty(str)){ return;}Type type = new TypeToken<Map<Integer,FrindUser>>() {}.getType();...原创 2019-11-26 15:36:03 · 150 阅读 · 0 评论 -
数据库 : 聊天记录查询 先降序 在升序
select * from ( select * from message_info " + "where cur_id = ? " + "and source_id = ? "+ "ORDER BY create_time DESC limit ? , ? ) ORDER BY create_time ASC原创 2019-11-12 14:27:50 · 443 阅读 · 0 评论 -
aidl 客户端和服务端的使用
这里创建了3个项目:客户端: https://github.com/july1992/aidl_client服务端: https://github.com/july1992/aidl_serviceaidl接口端 : https://github.com/july1992/aidl_myaidl( . 将aidl接口抽取出来,打成jar 包,被客户端和服务端分别引用)...原创 2019-11-11 17:13:12 · 669 阅读 · 0 评论 -
多数据对象上传
mApiService.submitData(User.user_id, unloadData) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new M...原创 2019-11-04 18:41:01 · 129 阅读 · 0 评论 -
ShadowView . 外控件阴影
https://github.com/yingLanNull/ShadowImageViewpackage com.sensethink.meshtalkie.ui.widgt;import android.content.Context;import android.content.res.TypedArray;import android.graphics.Canvas;imp...转载 2019-10-22 16:13:00 · 604 阅读 · 0 评论 -
TabLayout的学习以及BUG,Viewpager的指示器
初始化tabLayout: mTabLayout = (TabLayout) findViewById(R.id.tabLayout);Xmal 中的设置: <android.support.design.widget.TabLayout android:id="@+id/tabLayout" app:tabTextColor="#5500000原创 2017-11-28 20:49:13 · 349 阅读 · 0 评论 -
轮播图AndroidImageSlider 的学习
1,参考网址:https://github.com/daimajia/AndroidImageSlider/wiki依赖: compile 'com.squareup.picasso:picasso:2.3.2' compile 'com.nineoldandroids:library:2.4.0' compile 'com.daimajia.slider:lib原创 2017-12-01 17:39:53 · 157 阅读 · 0 评论 -
AndroidImageSlider自定义其text的字体颜色样式
非常简单哟1,自定义MyTextSliderView 继承自 baseSlideView public class MyTextSliderView extends BaseSliderView { protected MyTextSliderView(Context context) { super(context); } @Override原创 2017-12-01 18:35:14 · 373 阅读 · 0 评论 -
WebView--安卓与HTML的交互
1,Android与HTML交互有2种情况1.Android 调用 HTML 2.HTML 调用 Android,2,步骤1.设置允许执行JS脚本:webView.getSettings().setJavaScriptEnabled(true);1.1: mWebview.loadUrl("file:///android_asset/index.html");2转载 2017-12-11 11:18:27 · 268 阅读 · 0 评论 -
spots-dialog 加载框的学习
学习网址:https://github.com/d-max/spots-dialog1,依赖: compile 'com.github.d-max:spots-dialog:0.7@aar'2,代码使用: SpotsDialog dialog=newSpotsDialog(context,"loading....");dialog.sho原创 2017-12-11 16:17:24 · 1284 阅读 · 0 评论 -
手机短信验证的获取
1,先按照mob的要求,下载SMSSDK,并在清单文件中设置:http://wiki.mob.com/sms-android-%E6%97%A0gui%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8/2,自定义登录页面的XML:<LinearLayout xmlns:android="http://schemas.android.com/apk/res原创 2017-12-16 14:58:16 · 550 阅读 · 0 评论 -
ShareSDK 一键分享的集成
MOB:http://wiki.mob.com/sdk-share-android-3-0-0/根据需求下载需要的SDK ,并且集成出,需要的4个文件夹,assets,src,res,lib将assets 放在App中 src,res,lib里面的文件放在新建的moduler ,shareSDK 中1,新建一个moduler ,shareSDK ,其清单文件的配置:<manife原创 2017-12-11 21:18:45 · 209 阅读 · 0 评论 -
CircleImageView 圆形图片的学习
github:https://github.com/hdodenhof/CircleImageView。依赖:dependencies { ... compile 'de.hdodenhof:circleimageview:2.2.0'}代码:de.hdodenhof.circleimageview.CircleImageView xm原创 2017-12-12 10:07:06 · 172 阅读 · 0 评论 -
APP校验 Token的生成流程
GitHub:https://github.com/bigmeow/JWT本项目依赖于下面jar包:nimbus-jose-jwt-4.13.1.jar (一款开源的成熟的JSON WEB TOKEN 解决方法,本仓库的代码是对其的进一步封装)json-smart-2.0-RC2.jar和asm-1.0-RC1.jar (依赖jar包,主要用于JSONO转载 2017-12-12 10:28:52 · 4135 阅读 · 0 评论 -
夜神模拟器 链接 studio
cmd 命令转到Bin 目录,D:\develop\monitor\Nox\bin >执行以下程序nox_adb.exe connect 127.0.0.1:62001转载 2017-12-21 15:48:15 · 310 阅读 · 0 评论 -
GreenDao的学习
1,初始化的依赖,参考下面https://github.com/greenrobot/greenDAO2,其他学习网址:http://www.jianshu.com/p/4e6d72e7f57ahttp://www.imooc.com/learn/7603,Application public class App extends Application {转载 2017-12-22 11:05:45 · 118 阅读 · 0 评论 -
OkHttpUtil的使用
1,studio 下面依赖 : compile 'com.zhy:okhttputils:2.6.2'2 , 代码展示:private void downData() { String url= DownUrl.ROLLPAGE_URL; OkHttpUtils .get()// .url(url)//原创 2017-11-26 11:02:03 · 625 阅读 · 0 评论 -
遍历 HashMap
private HashMap channels=new HashMap<>(); private void selectPayChannle(String paychannel) { for (Map.Entry entry:channels.entrySet()){ payChannel = paychannel; Ra转载 2017-12-15 11:10:51 · 376 阅读 · 0 评论 -
2大侧拉框对比:DrawerLayout 和 SlidingMenu
1,DrawerLayout 用法:直接在XML中定义 <android.support.v4.widget.DrawerLayout android:id="@+id/drawerlayout" android:layout_width="match_parent" android:layout_height="match_par原创 2017-12-24 11:17:16 · 408 阅读 · 0 评论 -
Check 手机号码
private void checkPhoneNum(String phone, String code) { if (code.startsWith("+")) { code = code.substring(1); } if (TextUtils.isEmpty(phone)) { Toast.m转载 2017-12-16 14:57:00 · 370 阅读 · 0 评论