自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(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 123

原创 二级购物车

记得在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 106

原创 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 388

原创 greendao

工具类public class RetrofitUtils { private static RetrofitUtils retrofitUtils; private RetrofitUtils(){} public static RetrofitUtils getInstance(){ if (retrofitUtils==null){ ...

2019-03-25 08:19:57 130

原创 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&amp;startN...

2019-03-17 20:59:54 385

原创 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 225

原创 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 338

原创 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 1141

原创 二级购物车

&lt;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 84

原创 一级购物车简单实现

主页面布局&lt;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 108

原创 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 570

原创 Android——js交互实现点击弹框

1.在main文件夹下创建assets文件夹导入html文件&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;Carson_Ho&lt;/title&gt; // JS代码 &lt;script&gt;// And

2019-03-07 19:09:36 1130

原创 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 1040

原创 FlyBanner实现轮播图

1.导依赖implementation ‘com.recker.flybanner:flybanner:1.3’2.布局文件&lt;com.recker.flybanner.FlyBanner android:id="@+id/fly_banner" android:layout_width="match_parent" android:lay...

2019-03-07 18:50:02 211

原创 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 92

原创 Js交互

添加权限 &lt;uses-permission android:name="android.permission.INTERNET" /&gt;主页面public class MainActivity extends AppCompatActivity { private WebView webView; private WebSettings webViewSetti...

2019-03-03 20:39:34 210

原创 商城

主页面 搭建框架&lt;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 98

原创 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 840

原创 个推

个推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 194

原创 信鸽推送

现在信鸽官网中传建一个新应用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 528

原创 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 291

原创 MVP实现登录注册+RecyclerView展示数据+自定义view

MVP实现登录注册+RecyclerView展示数据+自定义view搭建框架&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.c...

2019-02-25 19:52:02 199

原创 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 375

原创 TabLayout+PullToRefresh+数据库缓存+频道管理

TabLayout+PullToRefresh+数据库缓存+频道管理记得加权限!导依赖!!!创建基类public abstract class BaseActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { ...

2019-01-20 11:56:31 138

原创 Android——轮播图+sharedPreferences

Android——轮播图+sharedPreferences布局&lt;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

原创 无限轮播(从网络获取图片)

无限轮播布局&amp;lt;android.support.constraint.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot; xmlns:tools=&quot;http://sche

2019-01-20 11:33:18 226

原创 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 145

原创 SharedPreferences实现引导页

SharedPreferences实现引导页1.布局&lt;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 276 1

原创 Handler——倒计时

Handler——倒计时1.布局&lt;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 302

原创 XListView多条目 +ImageLoader 分页加载

XListView +ImageLoader分页加载1.权限!导入xlistview&lt;uses-permission android:name="android.permission.INTERNET"&gt;&lt;/uses-permission&gt;2.设置xlistview布局&lt;android.support.constraint.ConstraintLayou...

2019-01-05 11:58:15 117

原创 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 174

空空如也

空空如也

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

TA关注的人

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