- 博客(37)
- 收藏
- 关注
原创 BaseActivity+BaseFragment
BaseActivitypackage com.lmx.shopcar.base;import android.os.Bundle;import android.support.annotation.Nullable;import android.support.v4.app.FragmentActivity;import android.view.View;import andro...
2019-09-24 07:10:36
213
1
原创 MD5加密
MD5Utilspackage com.lmx.shopcar.core;import java.security.MessageDigest;public class MD5Utils { //公盐 private static final String PUBLIC_SALT = "w928r982r"; //十六进制下数字到字符的映射数组 pri...
2019-09-24 07:09:41
176
原创 MVP
Contractpackage com.lmx.shopcar.mvp;import java.io.File;public interface Contract { interface IView { void getData(String data); void getLoginData(String data); void...
2019-09-24 07:08:59
194
原创 网络请求类
MyApppackage com.lmx.shopcar.retrofit;import android.app.Application;import com.uuzuche.lib_zxing.activity.ZXingLibrary;public class MyApp extends Application { @Override public void on...
2019-09-24 07:08:02
183
原创 build
总的build```// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {repositories { google() jcenter()}dependencies { classpath 'c...
2019-09-24 07:05:16
408
原创 PhotoView+EventBus传值
PhotoView导依赖主的build里面 maven { url "https://raw.github.com/bmob/bmob-android-sdk/master" } maven { url "https://jitpack.io" }本项目的build impleme...
2019-06-01 15:24:55
132
原创 登录注册+Retrofit+OkHttp+RxJava+MVP
Apispackage com.lmx.d525_2.retrofit;public class Apis { public static String url_All="http://172.17.8.100/";}ObserverApispackage com.lmx.d525_2.retrofit;import java.util.Map;import okh...
2019-05-26 21:23:26
288
原创 GreenDao的简单使用
initDB这个一定要写上如果写bean类记着加上“@Entity”和“ @Id,这个下面一定要放主键,(这是自增,可写可不写,(autoincrement = true))” private void initDB() { DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(MainActivi...
2019-05-19 21:08:23
138
原创 EventBus传值
要传值的一个类里 List<LeftBean> leftBean; @Override public void onBindViewHolder(@NonNull final ViewHolder viewHolder, final int i) { viewHolder.itemView.setSelected(leftBean.get(i)....
2019-05-19 20:58:24
427
原创 背景选择器(XRetrofit中的点击使其改变颜色)
先写好颜色一个为选中状态,一个为未选中状态<?xml version="1.0" encoding="utf-8"?><resources> <color name="true_sel">#e7d8c2fd</color> <color name="false_sel">#ffffff</color>&...
2019-05-19 20:46:37
146
原创 自定义布局,加减器
adder<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_c...
2019-05-18 11:37:52
134
原创 Retorfit+Rxjava
Apis(写接口)package com.lmx.shopcar.retrofit;import retrofit2.http.GET;public class Apis { public static String order_form_url="http://172.17.8.100/ks/product/";}ObservedApispackage com.lmx....
2019-05-18 11:35:27
236
原创 XRecyclerView(fragment跳fragment)
MyApppackage com.bawei.lmx.monizk1;import android.app.Application;import com.uuzuche.lib_zxing.activity.ZXingLibrary;public class MyApp extends Application { @Override public void onCre...
2019-05-12 20:14:09
904
原创 HttpVolley+MVP框架
MyCrashApppackage com.bawei.lmx.a5_5.utils;import android.util.Log;import com.bawei.lmx.a5_5.BuildConfig;public class MyCrashApp implements Thread.UncaughtExceptionHandler{ private static f...
2019-05-06 13:19:18
195
原创 图片加载使用Glide,配置占位图和错误图,和外部存储路径
Glide占位图和错误图 Glide.with(context).load(result.get(i).getMasterPic()) .apply(RequestOptions.circleCropTransform()) //占位图 .placeholder(R.drawable.ic_launc...
2019-05-06 12:00:35
2324
原创 二级联动
MyApppackage com.bawei.lmx.a5_5.utils;import android.app.Application;import com.android.volley.RequestQueue;import com.android.volley.toolbox.Volley;public class MyApp extends Application { ...
2019-05-06 11:28:47
865
原创 自定义view,自定义属性
创建一个attrs.xml文件attrs.xml自定义属性<?xml version="1.0" encoding="utf-8"?><resources> //name里面写类名 <declare-styleable name="CustomLine"> //name里面写你自己命名的名字,方便在布局中调用 <...
2019-05-06 10:54:25
200
原创 属性动画
//沿Y轴向下平移 ObjectAnimator translationY = ObjectAnimator.ofFloat(imageView, "translationY", 0, 100); //进行360度旋转 ObjectAnimator rotation = ObjectAnimator.ofFloat(imageView, "rotation", 360...
2019-05-05 20:54:55
108
原创 简单JS交互
建立完之后,里面放入Html,布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" ...
2019-05-05 20:26:50
1292
原创 搜索框
linearlayout<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height=...
2019-05-04 11:23:22
160
原创 点击切换
LayoutStatepackage com.bawei.lmx.day13_2;import android.content.Context;import android.content.SharedPreferences;public class LayoutState { public static void setLayoutstate(Context context,...
2019-05-04 10:05:45
130
原创 登录
依赖implementation ‘com.google.code.gson:gson:2.8.5’implementation ‘com.github.bumptech.glide:glide:4.9.0’implementation ‘com.android.support:recyclerview-v7:28.0.0’implementation ‘com.mcxiaoke.voll...
2019-05-04 10:00:36
255
原创 搜索框
流失布局,搜索框<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="mat...
2019-04-27 08:27:23
375
原创 折线图
折线图package com.bawei.lmx.day13_2.cliear;import android.content.Context;import android.graphics.Canvas;import android.graphics.Color;import android.graphics.Paint;import android.util.AttributeSe...
2019-04-27 08:25:25
164
原创 day13_2
依赖 implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.github.bumptech.glide:glide:4.9.0' implementation 'com.android.support:recyclerview-v7:28.0.0' implementation 'com....
2019-04-26 21:35:37
542
原创 MyApp+HttpVolley+MVP框架
MyApppackage com.bawei.lmx.day13_2;import android.app.Application;import com.android.volley.RequestQueue;import com.android.volley.toolbox.Volley;public class MyApp0 extends Application { ...
2019-04-26 21:25:11
221
原创 多条目+Xbanner
依赖** implementation ‘com.google.code.gson:gson:2.8.5’implementation ‘com.github.bumptech.glide:glide:4.9.0’implementation ‘com.google.guava:guava-io:r03’implementation ‘com.mcxiaoke.volley:library...
2019-04-22 08:12:12
554
原创 (MVP框架)登录+数据展示
AsyncHttpClientpackage monthtest.baway.com.day3_3.net;import android.os.AsyncTask;import android.text.TextUtils;import com.google.common.io.ByteStreams;import java.io.InputStream;import java....
2019-04-13 18:10:50
230
原创 Fragment+TabLayout+侧滑+Banner+Pulltorefresh+GridView+XListView多条目+上拉刷新下拉加载
activity_main布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xml...
2019-03-22 10:00:26
221
原创 TabLayout+Banner轮播滑动+GridView+PullToRefreshListView
activity_main布局没有用base<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"...
2019-03-20 15:52:12
421
原创 TabLayout + 多条目
activity_main布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xml...
2019-03-17 21:05:54
397
原创 TabLayout+PullToRefreshListView上拉下拉+Banner图片滑动+侧滑
先导包 (pulltorefresh_library,xlistview_library,banner,design,glide,gson)布局(activity_main)<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/re...
2019-03-03 20:06:56
181
原创 XListView展示+布局
Layout布局activity_main.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-au...
2019-02-22 10:20:42
210
原创 解析+展示
package com.example.day4_2.frag;import android.os.Bundle;import android.os.Handler;import android.os.Message;import android.support.annotation.NonNull;import android.support.annotation.Nullable;...
2019-02-19 13:59:14
155
原创 Fragment / ViewPager滑动
首先布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="
2019-02-19 13:51:40
125
原创 设置网络请求和网络传输
package com.example.day4_2;import android.content.Context;import android.net.ConnectivityManager;import android.net.NetworkInfo;import java.io.BufferedReader;import java.io.InputStream;import ...
2019-02-19 13:46:51
169
原创 Listview适配器
package com.example.day4_2.adapter;import android.content.Context;import android.view.View;import android.view.ViewGroup;import android.widget.BaseAdapter;import android.widget.ImageView;import ...
2019-02-19 09:06:47
151
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人