- 博客(32)
- 收藏
- 关注
原创 搜索
<LinearLayout 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" android:layou...
2019-04-07 13:18:08 127
原创 二级购物车
记得在bean类里添加check属性<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" xmlns:app="http://schemas.andr...
2019-04-07 11:38:23 108
原创 Okhttp+Retrofit工具类封装
1.添加依赖 implementation 'com.squareup.okhttp3:okhttp:3.2.0' implementation 'com.squareup.okio:okio:1.7.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1' implementation '...
2019-04-07 11:28:14 402
原创 greendao
工具类public class RetrofitUtils { private static RetrofitUtils retrofitUtils; private RetrofitUtils(){} public static RetrofitUtils getInstance(){ if (retrofitUtils==null){ ...
2019-03-25 08:19:57 132
原创 retrofit不同接口拼接
public class Api { //http://gank.io/api/data/%E7%A6%8F%E5%88%A9/10/1 public static final String wealUrl ="http://gank.io/api/"; //http://www.93.gov.cn/93app/data.do?channelId=1&startN...
2019-03-17 20:59:54 390
原创 RecyclerView展示数据+Retrofit网络请求+SwipeRefreshLayout实现RecyclerView上拉下拉+GreenDao实现数据库缓存
工具类封装retrofitpublic class RetrofitUtils { private static RetrofitUtils retrofitUtils; private RetrofitUtils(){} public static RetrofitUtils getInstance(){ if (retrofitUtils==nul...
2019-03-17 20:53:27 229
原创 Android——GreenDao简单实用
1.项目的build.gradle配置 implementation'org.greenrobot:greendao:3.0.1' implementation'org.greenrobot:greendao-generator:3.0.0'greendao { schemaVersion 1 //项目的包名下的gen文件夹 daoPa...
2019-03-17 20:41:57 343
原创 Android——Retrofit工具类封装
导依赖 implementation 'com.squareup.retrofit2:retrofit:2.0.0' implementation 'com.squareup.retrofit2:converter-gson:2.0.2'创建类public class RetrofitUtils { private static RetrofitUtils retrofit...
2019-03-17 20:29:36 1147
原创 二级购物车
<LinearLayout 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" android:layou...
2019-03-08 13:20:08 87
原创 一级购物车简单实现
主页面布局<RelativeLayout 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" andro...
2019-03-08 13:10:22 110
原创 Android——自定义view实现轮播图
1.添加依赖implementation ‘com.squareup.okio:okio:1.5.0’implementation ‘com.squareup.okhttp3:okhttp:3.2.0’implementation ‘com.github.bumptech.glide:glide:4.9.0’implementation ‘com.squareup.okhttp3:logg...
2019-03-07 19:34:57 573
原创 Android——js交互实现点击弹框
1.在main文件夹下创建assets文件夹导入html文件<!DOCTYPE html><html><head> <meta charset="utf-8"> <title>Carson_Ho</title> // JS代码 <script>// And
2019-03-07 19:09:36 1137
原创 Android——自定义view实现圆形图片并添加属性动画旋转
1.创建自定义view类@SuppressLint("AppCompatCustomView")public class Custom_show extends ImageView { private Paint paint; public Custom_show(Context context) { super(context); } ...
2019-03-07 19:01:43 1045
原创 FlyBanner实现轮播图
1.导依赖implementation ‘com.recker.flybanner:flybanner:1.3’2.布局文件<com.recker.flybanner.FlyBanner android:id="@+id/fly_banner" android:layout_width="match_parent" android:lay...
2019-03-07 18:50:02 216
原创 Android 异常捕获
创建CrashHandler类public class CrashHandler implements Thread.UncaughtExceptionHandler { private int num = 1; private Context mContext; private Thread.UncaughtExceptionHandler mDefaultHandle...
2019-03-03 20:41:46 95
原创 Js交互
添加权限 <uses-permission android:name="android.permission.INTERNET" />主页面public class MainActivity extends AppCompatActivity { private WebView webView; private WebSettings webViewSetti...
2019-03-03 20:39:34 214
原创 商城
主页面 搭建框架<LinearLayout 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" andr...
2019-03-02 16:10:07 101
原创 RecyclerView添加点击事件 长按删除
RecyclerView添加点击事件 长按删除1.适配器中添加点击方法 public ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { if (TYPE_ONE==i){ View view=LayoutInflater.from(viewGroup.getConte...
2019-03-02 08:44:10 849
原创 个推
个推1.去官网创建推送2.在根build.gradle中添加 maven { url "http://mvn.gt.igexin.com/nexus/content/repositories/releases/" }3.在项目build.gradle中添加依赖implementation ‘com.getui:sdk:2.11.1.0’ m...
2019-03-01 16:41:08 198
原创 信鸽推送
现在信鸽官网中传建一个新应用ndk { //选择要添加的对应cpu类型的.so库。 abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a','x86', 'x86_64', 'mips', 'mips64' // 还可以添加 'x86', 'x86_64', 'mips', 'mip...
2019-02-28 14:01:22 532
原创 Android 生成二维码
Android 生成二维码在根版本导入allprojects { repositories { google() jcenter() maven { url 'https://jitpack.io' } }}添加依赖 implementation ‘com.github.jwkj:LibZXing:v1.0.4’布局&...
2019-02-27 14:12:02 296
原创 MVP实现登录注册+RecyclerView展示数据+自定义view
MVP实现登录注册+RecyclerView展示数据+自定义view搭建框架<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.c...
2019-02-25 19:52:02 216
原创 RecycleView+Glide
RecycleView+Glide封装类public class Utils { public static boolean isMobileNO(String mobileNums) { /** * 判断字符串是否符合手机号码格式 * 移动号段: 134,135,136,137,138,139,147,150,151,152,157...
2019-02-16 16:11:18 381
原创 TabLayout+PullToRefresh+数据库缓存+频道管理
TabLayout+PullToRefresh+数据库缓存+频道管理记得加权限!导依赖!!!创建基类public abstract class BaseActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { ...
2019-01-20 11:56:31 144
原创 Android——轮播图+sharedPreferences
Android——轮播图+sharedPreferences布局<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_paren...
2019-01-20 11:38:51 92
原创 无限轮播(从网络获取图片)
无限轮播布局&lt;android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://sche
2019-01-20 11:33:18 231
原创 TabLayout+PullToRefresh+数据库缓存
TabLayout+PullToRefresh+数据库缓存创建基类public abstract class BaseActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreat...
2019-01-13 20:23:16 148
原创 SharedPreferences实现引导页
SharedPreferences实现引导页1.布局<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.androi...
2019-01-08 20:58:43 279 1
原创 Handler——倒计时
Handler——倒计时1.布局<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tool...
2019-01-08 20:56:25 306
原创 XListView多条目 +ImageLoader 分页加载
XListView +ImageLoader分页加载1.权限!导入xlistview<uses-permission android:name="android.permission.INTERNET"></uses-permission>2.设置xlistview布局<android.support.constraint.ConstraintLayou...
2019-01-05 11:58:15 120
原创 Handler更新子线程数据+AayncTask实现异步执行任务
Handler更新子线程数据+AayncTask实现异步执行任务1.viewpager+Fragment标签页联动final ViewPager pager=(ViewPager)findViewById(R.id.pager); radioGroup = (RadioGroup)findViewById(R.id.radio); final ArrayList...
2018-12-30 11:44:36 155
原创 网络判断 HttpURLConnection获取数据展示listview
网络判断 HttpURLConnection获取数据展示listview新建一个类public static boolean IsNetWork(Context context){ ConnectivityManager connectivityManager=(ConnectivityManager) context.getSystemService(Context.CONNECTIVI...
2018-12-28 10:08:15 178
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人