摘要: String uri = "android.resource://" + getActivity().getPackageName() + "/" + R.raw.xiaohuang; //设置视频路径 videoView.setVideoURI(Uri.parse(uri));// videoVi 阅读全文
posted @ 2018-05-03 19:50 Ars灬木子 阅读(226) 评论(0) 推荐(0) 编辑
摘要: private static void initOkHttpClient() { if (okHttpClient == null) { synchronized (RetrofitHelper1.class) { if (okHttpClient == null) { HttpLoggingInt 阅读全文
posted @ 2018-05-02 20:02 Ars灬木子 阅读(132) 评论(0) 推荐(0) 编辑
摘要: package bwie.com.jindongdemo.adapter.fragment02adapter;import android.content.Context;import android.support.v7.widget.GridLayoutManager;import androi 阅读全文
posted @ 2018-05-02 19:51 Ars灬木子 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 假如有几个数字int score[] = {67, 69, 75, 88}; 按照从大到小排序。 有2种思路,第一种,score[j] 和 score[j+1] 比较 如果 前者比后者小,把前者和后者调换顺序,两两调换后一轮下来 最小的会被排到最后去。每一轮j都从0开始,当i轮排序,就有最后面的i个 阅读全文
posted @ 2018-04-24 15:52 Ars灬木子 阅读(947) 评论(0) 推荐(0) 编辑
摘要: 第一种方式:在Manifest.xml中注册广播,是一种比较推荐的方法,因为它不需要手动注销广播(如果广播未注销,程序退出时可能会出错)。 具体实现在Manifest的application中添加: <receiver android:name=".mEvtReceiver"> <intent-fi 阅读全文
posted @ 2018-04-16 14:15 Ars灬木子 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 添加依赖 <!-- if you want to load images from the internet --> <uses-permission android:name="android.permission.INTERNET" /> <!-- if you want to load ima 阅读全文
posted @ 2018-04-16 14:13 Ars灬木子 阅读(140) 评论(0) 推荐(0) 编辑
摘要: GreenDao 优点: 1.性能高,号称Android最快的关系型数据库 2.内存占用小 3.库文件比较小,小于100K,编译时间低,而且可以避免65K方法限制 4.支持数据库加密 greendao支持SQLCipher进行数据库加密 有关SQLCipher可以参考这篇博客Android数据存储之 阅读全文
posted @ 2018-04-12 13:38 Ars灬木子 阅读(140) 评论(0) 推荐(0) 编辑
摘要: //适配器 public class MyAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>{ private List<Userbean.NewslistBean> list; private Context context; 阅读全文
posted @ 2018-03-29 10:28 Ars灬木子 阅读(174) 评论(0) 推荐(0) 编辑
摘要: public interface ShopApi { @GET(Api.A) Flowable<GoodsBean> goodsBean(); // @GET("v5/goods/202517471?pdduid=3470667255") //Flowable<XianqingBean> xianq 阅读全文
posted @ 2017-12-10 19:34 Ars灬木子 阅读(515) 评论(0) 推荐(0) 编辑
摘要: public class MyAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { private List<GoodsBean.GoodsListBean> list; private Context context; // 阅读全文
posted @ 2017-12-10 19:30 Ars灬木子 阅读(805) 评论(0) 推荐(0) 编辑