自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 资源 (3)
  • 收藏
  • 关注

原创 常用依赖包

implementation 'androidx.constraintlayout:constraintlayout:1.1.3'implementation 'androidx.legacy:legacy-support-v4:1.0.0'implementation 'androidx.lifecycle:lifecycle-process:2.3.1'implementation 'com.google.android.material:material:1.3.0'annotationP.

2022-03-21 18:45:48 2763

原创 鸿蒙os 正则判断名字、手机号、id、密码

console.log("check", '不支持输入4位以上连续的数字和字母');console.log("check", '不支持输入4位以上连续的数字和字母');console.log("check", '不支持输入4位以上相同的数字和字母');message: '密码强度不符合要求,请根据温馨提示的内容重新设置',message: '密码强度不符合要求,请根据温馨提示的内容重新设置',message: '密码强度不符合要求,请根据温馨提示的内容重新设置',message: '请输入您的登录密码',

2024-03-30 10:43:13 360

原创 从a数组中去除b数组中的数据

直接使用 List<String> c= Arrays.asList(a);

2024-03-08 16:05:48 202

原创 TagFlowLayout

/获得所有选中的pos集合。

2024-03-08 13:44:38 387

原创 gradle 8.0遇到的问题总结

1. 添加依赖问题解决方法:

2024-03-08 09:54:44 176

原创 textview 滚动

android:singleLine="true" android:ellipsize="marquee" android:scrollHorizontally="true" android:focusableInTouchMode="true" android:focusable="true" textView.setSelected(true);

2023-08-12 10:37:02 97

原创 MP4 小视频地址

http://vjs.zencdn.net/v/oceans.mp4

2023-08-11 23:39:38 71

原创 StandardGSYVideoPlayer 的使用

/ 不需要屏幕旋转,还需要设置 setNeedOrientationUtils(false)// -------!如果不需要旋转屏幕,可以不调用!videoPlayer.setUp(source1, true, "测试视频");//设置全屏按键功能,这是使用的是选择屏幕,而不是全屏。//是否可以滑动调整。//设置返回按键功能。///不需要屏幕旋转。/// 不需要回归竖屏。

2023-06-22 08:58:07 719

原创 signingConfigs

signingConfigs { config { keyAlias 'key0' keyPassword '' storeFile file('../keystore.jks') storePassword '' }}android.applicationVariants.all { variant -> variant.outputs.all { //在这里修改ap.

2022-05-20 17:33:47 1648

原创 MPagerAdapter

public class MPagerAdapter extends FragmentPagerAdapter { private List<Fragment> fragments = new ArrayList<>(); private List<String> titles = new ArrayList<>(); FragmentManager fm; public MPagerAdapter(@NonNull Fr.

2022-05-17 14:37:23 60

原创 drawerlayout

xml<?xml version="1.0" encoding="utf-8"?><layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"> <data> &

2022-05-17 12:31:18 78

原创 studio 使用svn 出现的账号问题解决方法

因为IDEA保存的还是之前svn账号信息,所以check新项目是没有权限的。可以在终端通过以下步骤来修改svn账号信息1、输入checkout命令,回车svn checkout https://...2、在弹出的问题下选择p,回车3、输入PC的密码,回车4、输入SVN用户名,回车5、输入SVN密码,回车完成上述步骤后,再打开IDEA执行checkout命令,就不会再谈错误提示框啦。...

2022-05-12 15:56:24 285

原创 acitivity 动画

activiity_inter.xml<?xml version="1.0" encoding="utf-8"?><set xmlns:Android="http://schemas.android.com/apk/res/android" Android:interpolator="@android:anim/decelerate_interpolator"> <scale Android:duration="@android:inte.

2022-04-08 15:32:02 47

原创 保存bitmap 图片 ,并且显示在相册中

implementation 'com.blankj:utilcodex:1.25.9'String path = Environment.getExternalStorageDirectory() + "/imgs/img_" + HmmTimeUtils.getCurrentTime("photo") + ".png";boolean save = ImageUtils.save(bitmap, path, Bitmap.CompressFormat.PNG);if (save) { .

2022-03-29 15:10:03 217

原创 DpUtils

public class DpUtils { /** * 根据手机的分辨率从 dp 的单位 转成为 px(像素) */ public static int dip2px(Context context, float dpValue) { final float scale = context.getResources().getDisplayMetrics().density; return (int) (dpValue * scale.

2022-03-28 18:21:26 122

原创 livedataBus

1.创建类工具类”public class MLiveDataBus { private static MLiveDataBus liveDataBus = new MLiveDataBus(); private HashMap<String, MutableLiveData<Object>> map; private MLiveDataBus() { map = new HashMap<>(); } p.

2022-03-28 14:54:18 291 2

原创 eventbus

implementation 'org.greenrobot:eventbus:3.1.1'EventBus.getDefault().post(new String());EventBus.getDefault().unregister(this);@Subscribe(threadMode = ThreadMode.MAIN)public void onEvent(LogoutEvent event) { }

2022-03-22 14:01:14 42

原创 okgo的简单封装

implementation 'com.lzy.net:okgo:3.0.4'public class OkGoUtils { /** * get请求获取数据 * * @param url */ public static void getParams(String url, HttpParams params, StringCallback callback) { OkGo.<String>get(url) .

2022-03-21 18:34:05 3097

原创 跑马灯效果实现

@SuppressLint("AppCompatCustomView")public class ScrollTextView extends TextView { public ScrollTextView(Context context) { super(context); } public ScrollTextView(Context context, @Nullable AttributeSet attrs) { super(con...

2021-05-11 09:48:31 55

原创 recycleView 中 checkbox 的单选功能实现

@Overrideprotected void convert(BaseViewHolder helper, HomeBean.DataBean.DatasBean item) { helper.addOnClickListener(R.id.tv_select_driver); CheckBox checkBox = helper.getView(R.id.cb); checkBox.setChecked(item.isCheck()); checkBox.setOnC.

2021-03-03 14:06:28 214

原创 自定义密码框

效果图自定义viewimport android.annotation.SuppressLint;import android.annotation.TargetApi;import android.content.Context;import android.content.res.TypedArray;import android.graphics.Canvas;import android.graphics.Color;import android.graphics...

2020-12-31 11:23:49 124 1

原创 通过Android Studio获取SHA1

通过Android Studio获取SHA1第一步、打开 Android Studio 的 Terminal 工具。第二步、keytool -v -list -keystore <keystore文件路径> 。第三步、输入 Keystore 密码。

2020-10-12 14:13:44 328

原创 Android finish掉Activity后软键盘未能回收

今天遇到了一个问题:在平板中开发项目的时候,弹出软键盘后finish掉activity后软键盘依然存在的问题。之前的解决思路是在Activity的onDestory方法中监测软键盘是否存在,存在则回收,试了一下存在问题,无法判断软键盘是否显示;目前的解决方案是:在点击回退按钮的时候响应系统的back键,在点击事件中执行:new Thread () { public void ru...

2019-09-12 17:01:38 719

原创 BaseQuickAdapter 中item复用导致的Checkbox状态混乱问题【完美解决】

重写getItemViewType方法@Overridepublic int getItemViewType(int position) { return position;}

2019-09-04 16:06:48 2757 5

原创 一个好用的RecycleView适配器BaseQuickAdapter

https://www.jianshu.com/p/b343fcff51b0

2019-09-04 15:12:53 253

values-dimens

xml 适配

2022-04-27

360加固助手.exe

360加固助手.exe

2021-12-23

设计模式简介

设计模式这本书系统的讲解了java中的29种设计模式

2017-04-06

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除