- 博客(8)
- 收藏
- 关注
原创 安卓Deeplink(深度链接)
<html><head></head><body><a href="cscs://555555555555555/target?username=xiaoming&pwd=123456">打开TargetActiviyt并传递参数</a></body><html> <intent-filter> <action andr
2021-09-10 19:02:37 4019 1
原创 DownloadManager简单食用
记得餐前要加读写权限 DownloadManager systemService=(DownloadManager) getSystemService(DOWNLOAD_SERVICE); DownloadManager.Request request=new DownloadManager.Request(Uri.parse("https://wx2.sinaimg.cn/mw2000/007huv9Mgy1gtytlif297j60u01ab46502.jpg" )).
2021-09-01 20:39:12 86
原创 RecyclerView仿时间轴
通过重写分割线实现getItemOffsets和onDraw来设置srv.addItemDecoration(createTimeLineItemDecoration());private RecyclerView.ItemDecoration createTimeLineItemDecoration() { return new TimeLineItemDcoration();} private class TimeLineItemDcoration extends Recycl.
2021-08-31 19:09:56 134
原创 Android-日夜主题切换
安卓4.2.1中theme下就会自动生成一个黑夜模式的xml主题,不需要我们手动去添加左侧的颜色可以自己更改AppCompatDelegate:AppCompatDelegate有四种模式可以设置:MODE_NIGHT_YES:直接指定夜间模式MODE_NIGHT_NO:直接指定日间模式MODE_NIGHT_FOLLOW_SYSTEM:根据系统设置决定是否设置夜间模式MODE_NIGHT_AUTO:根据当前时间自动切换模式 if(AppCompatDelegate..
2021-08-31 14:46:37 389
转载 安卓基于RecyclerView的侧滑菜单,长按拖拽,侧滑删除
**使用SwipeRecyclerView实现item拖拽,侧滑菜单[源码地址]https://github.com/yanzhenjie/SwipeRecyclerView.gitSwipeRecyclerViewde的使用方式和RecyclerViewde如出一辙SwipeRecyclerViewde是基于RecyclerViewde又进行了一次封装依赖 implementation 'com.yanzhenjie.recyclerview:x:1.3.2'xml使用
2021-08-31 10:43:34 930 1
原创 安卓打开图库选择视频图片PictureSelector
1系统自带Intent Intent intent=new Intent( ); intent.setAction(Intent.ACTION_GET_CONTENT); intent.addCategory(Intent.CATEGORY_OPENABLE); intent.setType("*/*"); startActivityForResult(intent,100);2.PictureSelector
2021-07-06 16:04:07 601
原创 Fragment使用hide和show进行显示和隐藏
BlankFragment2 blankFragment2;Fragment fragment;BlankFragment1 blankFragment1;fragment=new Fragment( );blankFragment1=new BlankFragment1( );blankFragment2=new BlankFragment2( );@Overridepublic void onClick(View v) { fragmentTransaction=getSuppor
2021-06-25 14:01:42 443
原创 java多人聊天
java低配版聊天//服务端package cn.bw.kf001;import java.io.IOException;import java.io.InputStream;import java.io.OutputStream;import java.net.ServerSocket;import java.net.Socket;import java.util.HashMap;import java.util.Map;import java.util.Map.Entry;pu
2020-11-02 18:27:29 224 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人