- 博客(18)
- 资源 (2)
- 收藏
- 关注
原创 GreenDao
关于数据操作相关的库有不少,之前有写过用谷歌官方的一些工具类对数据库进行操作的demo,工程中需要使用greenDao来对数据库进行操作,因此写了个简单的demo,以及自己的一些理解。 前言Android中的数据库使用的是Sqlite,至于这个玩意到底什么,不需要详细分析。你只需要知道,这是一种简单小巧轻量级的数据库类型,便于对一些简单的数据进行管理即可。这里不对谷歌官方操作的相关代
2017-11-22 19:33:48
287
原创 android属性动画圆环+箭头
在values目录下创建attrs.xml main.xml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" x
2017-11-22 09:36:10
710
原创 多线程下载 断点续传
//依赖 compile 'com.squareup.okhttp3:okhttp:3.6.0' compile 'com.squareup.okio:okio:1.11.0'//权限 //main.xml<LinearLayout xmlns:android="http
2017-11-22 09:22:06
288
原创 IJKPlayer视频播放
IJKPlayer是Bilibili开源的一个媒体播放库,一款做视频直播的框架, 基于ffmpeg, 支持 Android 和 iOS, 网上也有很多集成说明, 但是个人觉得还是不够详细, 在这里详细的讲一下在 iOS 中如何集成ijkplayer, 即便以前从没有接触过, 按着下面做也可以集成成功!在mainactivity布局里<RelativeLayout xmlns:androi
2017-11-17 13:57:33
463
原创 MVP +Retrofit +Rxjava 请求
main布局<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:
2017-11-16 20:19:40
456
原创 Banner轮播
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:layout_width="match_pare
2017-11-16 10:46:24
241
原创 多线程断点下载
多线程下载只需要确定好下载一个文件需要多少个线程,一般来说最好为3条线程,因为线程过多会占用系统资源,而且线程间的相互竞争也会导致下载变慢。 其次下载的时候将文件分割为三份(假设用3条线程下载)下载,在java中就要用到上次提到的RandomAccessFile这个API,它的开始结束为止用以下代码确定: 最后就是断点续传了,只需要才程序停止下载
2017-11-12 20:01:17
299
原创 MVP请求
//Bean包下的 InfoBeanpublic class InfoBean { private String result; private List data; private List dataScroll; public String getResult() { return result; } public vo
2017-11-05 18:28:46
224
原创 网址请求购物车
//activity_mian<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layou
2017-10-26 09:19:36
259
原创 购物车代码A
Android购物车//activity_main布局<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orien
2017-10-25 19:42:49
1409
原创 自定义view圆环
公司有这样一个需求,实现这个圆弧进度条所以,现在就将它抽取出来分享 如果需要是圆帽的就将,下面这句代码放开即可 mRingPaint.setStrokeCap(Paint.Cap.ROUND);//设置线冒样式,有圆 有方 自定义viewimport android.content.Context;import android.content.res.T
2017-10-25 08:39:28
441
原创 ViewPager+Fragment滑动
//main布局<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mainTabHost" android:orientation="vertical" android:layout_width="match_parent" andr
2017-10-24 19:45:04
237
原创 MVP登陆
//布局文件<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" androi
2017-10-24 19:35:03
458
原创 网络请求框架
//apipublic interface Api { public static final boolean isOnline = false; public static final String devIp = "http://169.254.222.209"; public static final String wrokIp = "http://www.bai
2017-10-21 13:38:23
301
原创 点击弹出图片
//mainpackage com.bwei.cellphonedemo;import android.animation.AnimatorSet;import android.animation.ObjectAnimator;import android.os.Bundle;import android.support.v7.app.AppCompatActivity;imp
2017-10-15 18:30:43
588
原创 动画
//mainpackage com.bwei.cartoondemo;import android.os.Bundle;import android.support.v7.app.AppCompatActivity;import android.view.View;import android.view.animation.AlphaAnimation;import andro
2017-10-15 18:24:59
230
原创 RecyclerView
//bean包public class ItemBean { private String name; private String age; public ItemBean(String name, String age) { this.name = name; this.age = age; } public
2017-10-15 18:22:13
234
原创 二维码
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main" android:layout_width="match_parent" android:layou
2017-10-08 20:13:03
240
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人