自定义博客皮肤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)
  • 收藏
  • 关注

原创 MD5加密的编写

public class MD5Utils {public static String MD5(String sourceStr) {String result = “”;try {MessageDigest md = MessageDigest.getInstance(“MD5”);md.update(sourceStr.getBytes());byte b[] = md.diges...

2019-11-22 16:40:20 243

原创 自定义圆环进度显示

/**Created by shkstart on 2016/12/3 0003.自定义视图*/public class RoundProgress extends View {//使用自定义属性来初始化如下的变量private int roundColor;//圆环的颜色private int roundProgressColor ;//圆弧的颜色private int ...

2019-11-14 16:50:02 164

原创 自定义ScrollView实现上下拉伸效果

话不投机、直接上代码public class MyScrollView extends ScrollView {private View mView;private int mLastY; //上一次y轴方向操作的坐标位置private Rect mRect = new Rect(); // 用来记录临界状态的左上右下private boolean isFinishAnimatio...

2019-11-12 19:02:09 244

原创 判断当前应用网络是否连接,连接加载数据

1:首先先建一个网络管理1//Manager类都为单例public class NetConnectManager {private Context applicationContext;private boolean connectStatus = false;//网络连接状态private static NetConnectManager instance;private Conn...

2019-11-12 18:59:31 216

原创 实现播放视频及弹幕

1:依赖: implementation ‘com.shuyu:GSYVideoPlayer:7.0.1’implementation ‘com.github.ctiao:DanmakuFlameMaster:0.7.3’2:布局<com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer android:id="@+id...

2019-09-23 15:11:22 1115

原创 MediaRecorder录制视频

1:权限<!-- 授予该程序录制声音的权限 --><uses-permission android:name="android.permission.RECORD_AUDIO"/><!-- 授予该程序使用摄像头的权限 --><uses-permission android:name="android.permission.CAMERA"/>...

2019-09-20 14:26:50 193

原创 简单录音级播放

1:权限2:布局<Button android:id="@+id/startRecorder" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layo...

2019-09-20 09:41:19 157

原创 实现小窗口播放视频ijkplayer

1:配置android {compileSdkVersion 29buildToolsVersion “29.0.2”defaultConfig {applicationId “com.example.mydemo01”minSdkVersion 15targetSdkVersion 29versionCode 1versionName “1.0”testInstrumenta...

2019-09-19 19:46:01 1077 1

原创 Zxing扫描二维码和本地的二维码和内存溢出000M

1:Zxing第一步 :依赖 implementation ‘cn.yipianfengye.android:zxing-library:2.2’第二步:在application里面初始化 ZXingLibrary.initDisplayOpinion(this);用到的权限:(uses-feature android:name=“android.hardware.camera” ...

2019-08-16 20:15:36 853

原创 组件化arouter

组件化arouter依赖implementation (‘com.alibaba:arouter-api:1.4.1’)annotationProcessor ‘com.alibaba:arouter-compiler:1.2.2’implementation project(’:model名字’)小象testInstrumentationRunner下面javaCompileOptio...

2019-08-15 16:57:47 111

原创 Matrix的左倾和右倾放大和缩小和倒影和双指放大和PhotoView

直接上代码;//5.写一个自定义view(8分)public class Myview extends View {Matrix matrix;Bitmap bitmap;int width;int higth;float sx=0.0f;float sy=0.0f;Canvas canvas;float scale=1.0f;boolean isone=true;publ...

2019-08-13 21:10:42 200

原创 自定义侧滑菜单

自定义fragment:public class MyDrawer extends FrameLayout {private LinearLayout content;private LinearLayout menu;private int width=400;//系统存值PointF pointF=new PointF();int x;int y;public MyDraw...

2019-08-13 21:04:48 177

原创 自定小球沿着轨迹走动

这里是画了一个8activity:private Myview mv;int chang=0;private Handler handler=new Handler(){@Overridepublic void handleMessage(@NonNull Message msg) {super.handleMessage(msg);if (msg.what==0){mv.mat...

2019-08-13 21:02:22 965

原创 自定义菜单menu

public class MyDrawer extends FrameLayout {private LinearLayout content;private LinearLayout menu;private int width=400;//系统存值PointF pointF=new PointF();int x;int y;public MyDrawer(Context con...

2019-08-12 15:01:21 283

原创 自定义View小球

activity:private MyView v;int x = 30;List<Location> list=new ArrayList<>();int y = 30;int width;int att = 0; int height;@SuppressLint("HandlerLeak")private Handler handler=new Ha...

2019-08-12 14:18:22 123

原创 Android动画(旋转+透明+缩放+位移+效果一起使用+帧动画+属性动画)

1:透明xml:<?xml version="1.0" encoding="utf-8"?>activity:Animation animation = AnimationUtils.loadAnimation(this, R.anim.alpha);t1.startAnimation(animation);2:旋转xml:<rotate xmlns:androi...

2019-08-08 14:26:11 1166

原创 RetroFit与RxJava

依赖:implementation ‘io.reactivex.rxjava2:rxjava:2.2.6’implementation ‘io.reactivex.rxjava2:rxandroid:2.1.0’implementation 'com.squareup.retrofit2:retrofit:2.4.0'//Gson converterimplementation 'com...

2019-08-07 20:19:00 526

原创 OkHttp

@Overridepublic void onClick(View view) { switch (view.getId()) { case R.id.btn:// getDataByGetAsync();// new Thread(new Runnable() {// ...

2019-08-07 15:15:32 99

原创 Rxjava和RxAndroid的Observable被观察者和.Observer观察者四种使用方式

依赖implementation ‘io.reactivex.rxjava2:rxjava:2.2.6’implementation ‘io.reactivex.rxjava2:rxandroid:2.1.0’1:基本使用//最普通private void useRxjava() {//观察者io.reactivex.Observer stringObserver = new io....

2019-08-07 15:06:17 2013

原创 Android基本组件及使用

第一个月交互式视觉设计第一单元常用的ADB命令1:adb start-server 启动adb进程2:adb kill-server 杀死adb进程3:adb devices 显示当前运行的全部模拟器4:adb install -r 应用程序.apk 安装应用程序5: adb uninstall 包名 卸载软件6:adb help 查看adb帮助信息、7:adb logcat ...

2019-08-07 15:00:50 555

原创 Toolbar和SlidingMenu

1:toolbar2:Slidngmenu3:打开摄像机/电话/浏览器

2019-08-05 14:39:33 113

原创 ButterKnife

1.大象导入classpath ‘com.jakewharton:butterknife-gradle-plugin:10.0.0’2:小象apply plugin: ‘com.jakewharton.butterknife’compileOptions {sourceCompatibility JavaVersion.VERSION_1_8targetCompatibility ...

2019-08-05 14:34:10 443

原创 专高二第一天HTTP

1.1.1什么是HTTP协议(概念)超文本传输协议(Hypertexttransfer protocol)1.1.2HTTP协议的主要的特点无连接/无状态1.1.3HTTP协议的会话方式连接(Connection)请求(Request)应答(Response)关闭(Close)1.1.4HTTP 1.0和HTTP1.1的区别HTTP1.0定义了三种请求方法: GET, POST 和 ...

2019-07-05 21:10:54 84

原创 第二单元菜单Menu

系统菜单上下文菜单弹出菜单

2019-06-09 21:07:30 85

原创 Android对话框

标题第一单元 Dialog普通对话框2.多选对话框3.单选对话框4.列表对话框5. 进度对话框6. 自定义对话框view7. 时间对话框8.日期对话框

2019-06-08 20:05:00 75

空空如也

空空如也

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

TA关注的人

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