{"id":13814409,"url":"https://github.com/OCNYang/QBox","last_synced_at":"2025-05-15T03:34:35.757Z","repository":{"id":58128702,"uuid":"87497461","full_name":"OCNYang/QBox","owner":"OCNYang","description":":cat2:  RxJava+Retrofit+Okhttp+Glide + A life tool App, contains modules: news; jokes; constellation fortune; LED; weather; calendar; two-dimensional code, and more ...  小秋魔盒是一个生活工具  App，主要功能有：新闻资讯；微信精选美文；笑话趣图；星座运势；LED字幕；天气；日历；二维码；手电筒；老黄历。在开发中尽可能多的用了目前比较流行的框架和库。","archived":true,"fork":false,"pushed_at":"2023-02-20T10:47:02.000Z","size":52601,"stargazers_count":1393,"open_issues_count":3,"forks_count":335,"subscribers_count":54,"default_branch":"master","last_synced_at":"2025-01-17T20:37:58.365Z","etag":null,"topics":["android","calendar","glide","qbox","retrofit","rxjava","takephoto","weather","zxing"],"latest_commit_sha":null,"homepage":"https://juejin.im/post/5a320ffb51882561a20a7d5d","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OCNYang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-04-07T02:48:43.000Z","updated_at":"2024-12-19T10:05:00.000Z","dependencies_parsed_at":"2022-09-13T21:00:41.981Z","dependency_job_id":"65c36d8b-9844-401f-9955-bf70d2e33a60","html_url":"https://github.com/OCNYang/QBox","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCNYang%2FQBox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCNYang%2FQBox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCNYang%2FQBox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCNYang%2FQBox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OCNYang","download_url":"https://codeload.github.com/OCNYang/QBox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254266521,"owners_count":22042123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","calendar","glide","qbox","retrofit","rxjava","takephoto","weather","zxing"],"created_at":"2024-08-04T04:01:56.545Z","updated_at":"2025-05-15T03:34:31.575Z","avatar_url":"https://github.com/OCNYang.png","language":"Java","readme":"# QBox  \n\n\u003cdiv  align=\"center\"\u003e\n\u003cimg src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/qbox.png\" width = \"400\" alt=\"小秋魔盒\" align=center /\u003e\n\u003c/div\u003e\n\ntips:前段时间远程数据库造成的问题已修复，现已能正常使用\n\n[![GitHub issues](https://img.shields.io/github/issues/OCNYang/QBox.svg)](https://github.com/OCNYang/QBox/issues)\u0026ensp;\u0026ensp;[![GitHub forks](https://img.shields.io/github/forks/OCNYang/QBox.svg)](https://github.com/OCNYang/QBox/network)\u0026ensp;\u0026ensp;[![GitHub stars](https://img.shields.io/github/stars/OCNYang/QBox.svg)](https://github.com/OCNYang/QBox/stargazers)  \n\n小秋魔盒（QBox）是一个生活工具 Android App，由 OCN.Yang 开发，第一个版本上线时间：2017.04.11  \n\nA life tool App: simple and beautiful, pure, love.(Welcome to **Star** and **Fork**)  \n\n[![Release version](https://img.shields.io/badge/Release%20Version-v1.6%20%E6%AD%A3%E5%BC%8F%E7%89%88-blue.svg)](https://github.com/OCNYang/QBox/releases/tag/1.6)  \n[![Current version](https://img.shields.io/badge/Current%20Version-v2.0%20测试版-brightgreen.svg)](https://github.com/OCNYang/QBox)  \n\n#### 下载地址 | APK Download：\n\n**地址一：**[http://d.firim.info/qbox](http://d.firim.info/qbox)  \n**地址二：**[https://raw.githubusercontent.com/OCNYang/QBox/master/apk/QBox.apk](https://raw.githubusercontent.com/OCNYang/QBox/master/apk/QBox.apk)  \n\n## 应用预览 | UI\n\n\u003e 图片依次是（多动图，加载较慢，图片不显示刷新页面）：  \n\u003e 1.新闻模块(**如果你下载的 apk 没有显示新闻模块，开启方式：设置页长按头部直至出现提醒 \u003e 设置页长按底部直至出现提醒 \u003e 退出重启应用**)  \n\u003e 2.文章模块 3.日历模块  \n\u003e 4.天气模块 5.颜色画板 6.盒子布局    \n\u003e 7.魔力数字排序列表 8.下拉果冻弹跳效果 9.引导页  \n\u003e 10.手势图片 11.能力图表格 12.视差图片  \n\n\u003cimg width=\"300px\" alt=\"新闻资讯\" src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/list.png\"/\u003e\u003cimg width=\"300px\" alt=\"转场动画\" src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/skipanim.gif\"/\u003e\n\u003cimg width=\"300px\" alt=\"日历模块\" src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/cla.gif\"/\u003e\u003cimg width=\"300px\" alt=\"天气模块\" src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/wealther.gif\"/\u003e\n\u003cimg width=\"300px\" alt=\"颜色画板\" src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/colorpicker.png\"/\u003e\n\u003cimg width=\"300px\" alt=\"盒子布局\" src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/flex.png\"/\u003e\n\u003cimg width=\"300px\" alt=\"拖曳列表\" src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/recy_headerandfooter.gif\"/\u003e\n\u003cimg width=\"300px\" alt=\"下拉果冻弹跳效果\" src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/shuaxin.gif\"/\u003e\n\u003cimg width=\"300px\" alt=\"引导页\" src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/sliding.gif\"/\u003e\n\u003cimg width=\"300px\" alt=\"手势效果图片\" src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/PinImageview.gif\"/\u003e\n\u003cimg width=\"300px\" alt=\"能力表格\" src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/mpandroidchart.gif\"/\u003e\n\u003cimg width=\"300px\" alt=\"视差图片\" src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/ken.gif\"/\u003e\n\u003cimg width=\"300px\" alt=\"拖曳\" src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/recy_yidong.gif\"/\u003e\n\u003cimg width=\"300px\" alt=\"搜索框\" src=\"https://cdn.jsdelivr.net/gh/ocnyang/gallery@master/qbox/searchLayout.gif\"/\u003e\n\n## Wiki (集成说明)\n\n**[Document | 说明文档](https://github.com/OCNYang/QBox/wiki)** (也可直接查看下面)  \n\n## 本应用集成的各开源库或控件的说明\n\n### Logger 日志打印  \n\nGithub地址：[https://github.com/orhanobut/logger](https://github.com/orhanobut/logger)  \n\n#### 粗略用法：\n\n引入：\n\n\tcompile 'com.orhanobut:logger:1.15'\n\n初始化：  \n\n\tLogger.init();//在application中\n\n用法方式：  \n\n\tLogger.d(\"hello\");  \n\tLogger.e(\"hello\");  \n\tLogger.w(\"hello\");  \n\tLogger.v(\"hello\");  \n\tLogger.wtf(\"hello\");  \n\tLogger.json(JSON_CONTENT);  \n\tLogger.xml(XML_CONTENT);  \n\tLogger.log(DEBUG, \"tag\", \"message\", throwable);\n\n参数设置：  \n\n\tLogger\n\t.init(YOUR_TAG)                 // default PRETTYLOGGER or use just init()  \n\t.methodCount(3)                 // default 2  \n\t.hideThreadInfo()               // default shown  \n\t.logLevel(LogLevel.NONE)        // default LogLevel.FULL  \n\t.methodOffset(2)                // default 0  \n\t.logAdapter(new AndroidLogAdapter()); //default AndroidLogAdapter  \n\n---\n\n### GsonFormat \u0026 Gson json 数据解析  \n\nGsonFormat Github地址：[https://github.com/zzz40500/GsonFormat](https://github.com/zzz40500/GsonFormat)  \nGson Github地址：[https://github.com/google/gson](https://github.com/google/gson)\n\n引入：  \n\n\tcompile 'com.google.code.gson:gson:2.7'\n\n**Gson 用法教程：**  \n\n地址：[http://ocnyang.com/tags/Gson/](http://ocnyang.com/tags/Gson/)\n\n---\n\n### butterknife 依赖注入框架  \n\nGithub地址：[https://github.com/JakeWharton/butterknife](https://github.com/JakeWharton/butterknife)  \n\n引入：  \n\n\tcompile 'com.jakewharton:butterknife:8.4.0'\n\tannotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'\n\n---\n\n### leakcanary 内存泄漏检测工具  \n\nGithub地址：[https://github.com/square/leakcanary](https://github.com/square/leakcanary)  \n\n引入：  \n\n\tdebugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'  \n\treleaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'  \n\ttestCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'  \n\n---\n \n### Glide 图片请求库  \n\nGithub地址：[https://github.com/bumptech/glide](https://github.com/bumptech/glide)  \n\n引入：  \n\n\tcompile 'com.github.bumptech.glide:glide:3.7.0'\n\tcompile 'com.android.support:support-v4:19.1.0' //v4包\n\n**Glide 用法教程：**  \n\n地址：[http://ocnyang.com/tags/Glide/](http://ocnyang.com/tags/Glide/)\n\n---  \n\n### circleimageview 圆形图片库  \n\nGithub地址：[https://github.com/hdodenhof/CircleImageView](https://github.com/hdodenhof/CircleImageView)  \n\n引入：  \n\n\tcompile 'de.hdodenhof:circleimageview:2.1.0'\n\n--- \n\n### Rxjava + Retrofit + okhttp 网络请求框架  \n\n三个库的地址请自行查找，这里提供一个介绍用法的 Demo 地址  \nGithub地址：[https://github.com/rengwuxian/RxJavaSamples](https://github.com/rengwuxian/RxJavaSamples)  \n\n(基本的使用，不做三者的封装（因为目前还找不到好的封装框架）)\n\n引入：  \n\n\tcompile 'com.squareup.okhttp3:okhttp:3.4.1'\n    compile 'com.squareup.retrofit2:retrofit:2.1.0'\n    compile 'com.squareup.retrofit2:converter-gson:2.1.0'\n    compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'\n    compile 'io.reactivex:rxjava:1.2.1'\n    compile 'io.reactivex:rxandroid:1.2.1'\n    compile 'com.jakewharton.rxbinding:rxbinding:0.4.0'\n\n**Okhttp 教程：**  \n地址：[http://ocnyang.com/tags/OkHttp/](http://ocnyang.com/tags/OkHttp/)  \n**Retrofit2 教程：**  \n地址：[http://ocnyang.com/tags/Retrofit2/](http://ocnyang.com/tags/Retrofit2/)  \n\n--- \n###  SlidingTutorial-Android 引导页库\n\nGithub地址：[https://github.com/Cleveroad/slidingtutorial-android](https://github.com/Cleveroad/slidingtutorial-android)  \n\n引入：  \n\n\t compile 'com.cleveroad:slidingtutorial:1.0.5'\n\n--- \n###  nineoldandrolid 开源动画库\n\nGithub地址：[https://github.com/JakeWharton/NineOldAndroids](https://github.com/JakeWharton/NineOldAndroids)  \n\n引入：  \n\n\tcompile 'com.nineoldandroids:library:2.4.0'\n\n--- \n###  percent 百分比布局  \n\n说明：非本项目使用，貌似引入的某个开源库依赖此库\n\nGithub地址：[https://github.com/JulienGenoud/android-percent-support-lib-sample](https://github.com/JulienGenoud/android-percent-support-lib-sample)  \n\n引入：  \n\n\tcompile 'com.android.support:percent:25.3.0'\n\n--- \n###  ReactiveNetwork 手机网络连接状态动态监控\n\nGithub地址：[https://github.com/pwittchen/ReactiveNetwork](https://github.com/pwittchen/ReactiveNetwork)  \n\n引入：  \n\n\tcompile 'com.github.pwittchen:reactivenetwork-rx2:0.9.0'\n\n设想：  \n网络的检测逻辑的代码放在了BaseActivity中，  \n网络变化时，需要自动显示网络错误的布局主要继承这个Base类就行了，  \n同时这个类开放的有网络变化时的回调接口。  \n\n自动显示网络错误的布局的几种设想：  \n第一种：当网络无连接时可以显示一个大的网络错误布局， \n或者跳转到一个网络错误布局，当网络连接上的时候再自动跳转回来  \n（用户也可以通过点击返回，在无网络的情况下的页面）。  \n第二种：当网络无连接、网络请求数据错误时都显示一个小警示布局提醒网络错误。  \n第三种：上面两种结合在一起，同时在网络请求数据错误的时候，就加载一定数量的网络错误数据集合。\n\n--- \n###  picasso 图片请求库\n\nGithub地址：[https://github.com/square/picasso](https://github.com/square/picasso)  \n\n引入：  \n\n\tcompile 'com.squareup.picasso:picasso:2.3.2'\n\n--- \n###  AndroidImageSlider 轮播图片控件\n\n貌似只引入了库，并没有真正使用\n\nGithub地址：[https://github.com/daimajia/AndroidImageSlider](https://github.com/daimajia/AndroidImageSlider)  \n\n引入：  \n\n\tcompile \"com.android.support:support-v4:+\"\n    compile 'com.squareup.picasso:picasso:2.3.2'\n    compile 'com.nineoldandroids:library:2.4.0'\n    compile 'com.daimajia.slider:library:1.1.5@aar'\n\n才发现，好几个库都是它在依赖呀，由于没有用到，下个版本可能会删除这个引入\n\n--- \n\n### BaseRecyclerViewAdapterHelper RecycleView 拓展库\n\nGithub 地址：[https://github.com/CymChad/BaseRecyclerViewAdapterHelper](https://github.com/CymChad/BaseRecyclerViewAdapterHelper)  \n\n引入：  \n\n\tcompile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:VERSION_CODE'\n\n中文 Wiki：  \n地址：[https://github.com/CymChad/BaseRecyclerViewAdapterHelper/wiki/%E9%A6%96%E9%A1%B5](https://github.com/CymChad/BaseRecyclerViewAdapterHelper/wiki/%E9%A6%96%E9%A1%B5)  \n\n---\n### greenDAO 数据库\n\nGithub 地址：[https://github.com/greenrobot/greenDAO](https://github.com/greenrobot/greenDAO)  \n\n引入：  \n\n\t较为繁琐，详细查看 Github 地址\n\n---\n### eventbus 事件发布/订阅框架\n\nGithub 地址：[https://github.com/greenrobot/EventBus](https://github.com/greenrobot/EventBus)  \n\n引入：  \n\n\tcompile 'org.greenrobot:eventbus:3.0.0'\n\n**用法简述：：**  \n\n* 1.Define events:\n\n\t\tpublic static class MessageEvent { /* Additional fields if needed */ }  \n\n* 2.Prepare subscribers: Declare and annotate your subscribing method, optionally specify a thread mode:\n\n\t\t@Subscribe(threadMode = ThreadMode.MAIN)  \n\t\tpublic void onMessageEvent(MessageEvent event) {/* Do something */};\n\nRegister and unregister your subscriber. For example on Android, activities and fragments should usually register according to their life cycle:\n\n\t @Override\n\t public void onStart() {\n\t     super.onStart();\n\t     EventBus.getDefault().register(this);\n\t }\n\t\n\t @Override\n\t public void onStop() {\n\t     super.onStop();\n\t     EventBus.getDefault().unregister(this);\n\t }\n\n* 3.Post events:\n\n\t\tEventBus.getDefault().post(new MessageEvent());\n\n---\n### RippleEffect 控件点击的涟漪效果\n\nGithub 地址：[https://github.com/traex/RippleEffect](https://github.com/traex/RippleEffect)  \n\n引入：  \n\n\tcompile 'com.github.traex.rippleeffect:library:1.3'\n\n---\n### takephoto 拍照上传库\n\nGithub 地址：[https://github.com/crazycodeboy/TakePhoto](https://github.com/crazycodeboy/TakePhoto)  \n\n引入：  \n\n\t compile 'com.jph.takephoto:takephoto_library:4.0.3'\n\n---\n### colorpicker 颜色画板选择库\n\nGithub 地址：[https://github.com/QuadFlask/colorpicker](https://github.com/QuadFlask/colorpicker)  \n\n引入：  \n\n\tcompile 'com.github.QuadFlask:colorpicker:0.0.13'\n\n---\n\n### android-autofittextview 自适应大小文本控件\n\nGithub 地址：[https://github.com/grantland/android-autofittextview](https://github.com/grantland/android-autofittextview)  \n\n引入：  \n\n\tcompile 'me.grantland:autofittextview:0.2.+'\n\n---\n\n### HTextView 动态文本控件\n\nGithub 地址：[https://github.com/hanks-zyh/HTextView](https://github.com/hanks-zyh/HTextView)  \n\n引入：  \n\n\t compile 'hanks.xyz:htextview-library:0.1.5'\n\n---\n\n### BGAQRCode-Android 二维码扫描项目\n\n对比了一些通过Zxing封装的二维码识别的项目，独独比较喜欢这个。\n\nGithub 地址：[https://github.com/bingoogolapple/BGAQRCode-Android](https://github.com/bingoogolapple/BGAQRCode-Android)  \n\n引入：  \n\n\tcompile 'com.google.zxing:core:3.2.1'\n    compile 'cn.bingoogolapple:bga-qrcodecore:latestVersion@aar'\n    compile 'cn.bingoogolapple:bga-zxing:latestVersion@aar'\n\n---\n\n### MPAndroidChart 图表库\n\nGithub 地址：[https://github.com/PhilJay/MPAndroidChart](https://github.com/PhilJay/MPAndroidChart)  \n\n引入：  \n\n\t//在 Android 开发中使用过图表的，应该都会知道这个库吧。\n\tcompile 'com.github.PhilJay:MPAndroidChart:v3.0.2'\n\n---\n\n### material-calendarview 材料设计日历控件\n\nGithub 地址：[https://github.com/prolificinteractive/material-calendarview](https://github.com/prolificinteractive/material-calendarview)  \n\n引入：  \n\n\tcompile 'com.prolificinteractive:material-calendarview:1.4.3'\n\n---\n\n### flexbox-layout 官方的盒子布局控件\n\nGithub 地址：[https://github.com/google/flexbox-layout](https://github.com/google/flexbox-layout)  \n\n引入：  \n\n\tcompile 'com.google.android:flexbox:0.3.0-alpha3'\n\n---\n### KenBurnsView 视差图片控件\n\nGithub 地址：[https://github.com/flavioarfaria/KenBurnsView](https://github.com/flavioarfaria/KenBurnsView)  \n\n引入：  \n\n\tcompile 'com.flaviofaria:kenburnsview:1.0.7'\n\n---\n### materialsearchview 材料设计搜索框\n\nGithub 地址：[https://github.com/MiguelCatalan/MaterialSearchView](https://github.com/MiguelCatalan/MaterialSearchView)  \n\n引入：  \n\n\tcompile 'com.miguelcatalan:materialsearchview:1.4.0'\n\n---\n### 材料设计需要的官方包\n\n引入：  \n\n\tcompile 'com.android.support:cardview-v7:25.1.1'//卡片\n\n---\n### MagicIndicator 指示器库\n\nGithub 地址：[https://github.com/hackware1993/MagicIndicator](https://github.com/hackware1993/MagicIndicator)  \n\n引入：  \n\n\tcompile 'com.github.hackware1993:MagicIndicator:1.5.0'\n\n记得鸿洋大神也开源一个差不多的库，也挺不错的。\n\n---\n### 第三方平台引入集中说明  \n\n1. 小米推送（本来没想用小米的，抵不住前几年小米手机买的好名气大，我就用用试试。这里说一下和其他平台的不足点，目前发现小米推送不支持富文本的）  \n2. ShareSDK Mob 平台的社会化分享和登录  \n3. SMSSDK Mob 平台的手机短信验证（感觉 Mob 平台名气稳健，一方面是名字取得好呀，一方面永久免费）  \n4. 友盟统计 （这个小应用大部分都会用吧）\n\n---\n\n### 沉浸式状态栏\n\n项目地址：[http://blog.csdn.net/lmj623565791/article/details/48649563](http://blog.csdn.net/lmj623565791/article/details/48649563)  \n\n注意三点：  \n\n\tToolBar高度设置为wrap_content  \n\tToolBar添加属性android:fitsSystemWindows=\"true\"  \n\theader_just_username.xml的根布局RelativeLayout，添加属性  android:fitsSystemWindows=\"true\"  \n\tandroid:fitsSystemWindows这个属性，主要是通过调整当前设置这个属性的view的padding去为我们的status_bar留下空间。  \n\n为了Android4.4适配：  \n那么只需要在Activity里面去写上（设置Toolbar之后）：StatusBarCompat.compat(this);就可以了。  \n\n如果你希望自己设置状态看颜色，那么就用这个方法：  \n\n\tStatusBarCompat.compat(this, getResources().getColor(R.color.status_bar_color));\n\n关于沉浸式的说明，6.0及以上不能达到半透明的效果。\n同时沉浸式和夜间模式结合要考虑两方面。\n\n具体差别请看V21/style\n\n---\n\n### Android应用自动更新库(android-auto-update)\n \n项目地址：[https://github.com/feicien/android-auto-update](https://github.com/feicien/android-auto-update)  \n\n用法：  \n\n* 导入library项目（本项目是直接把library直接复制放在了 /update 目录下）  \n\n* 提供2种版本检查方式,在你的项目中添加以下代码即可  \n\n\t\t使用Dialog  `UpdateChecker.checkForDialog(this);`  \n\t\t使用Notification  UpdateChecker.checkForNotification(this);  \n\n* 添加权限  \n\n\t\t添加访问网络的权限\u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e  \n\t\t添加写SDCard权限（可选，非必须）  \n\t\t如果添加这个权限 apk下载在sdcard中的Android/data/包名/cache目录下 否则下载到 内存中的 /data/data/包名/cache中  \n\t\t\u003cuses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" /\u003e  \n\n---\n\n### SlidingTutorial-Android引导页\n\n根据Demo直接使用，可定制的东西很少，当然引导页本身也没什么可定制的，  \n就看自己喜欢不喜欢这个引导页的设计了  \n项目地址：[https://github.com/Cleveroad/slidingtutorial-android](https://github.com/Cleveroad/slidingtutorial-android)\n\n这个引导页在布局上用到的全是百分比布局  \n需要自己定制的可能是最后一页添加一个按钮的点击事件  \n\n---\n\n### Slidinglayout 果冻弹跳效果\n\n依赖nineoldandorid开源动画库  \nSlidinglayout其实就是一个自定义的布局  \n\nXML样式参数：  \n`background_view` 背景 `view`  \n`sliding_mode` 滑动模式，`both`为上下可弹跳，`top` 为顶部弹跳，`bottom` 为底部弹跳，默认为 both\n`sliding_pointer_mode` 手指模式，one为只识别一个手指，more为支持多指滑动，默认为more\n`top_max` 当滑动模式为top时才有效，用于可滑动的最大距离，如`\"top_max:200dp\"`，默认为-1（不限制）\n\n常用API：  \n`public void setSlidingOffset(float slidingOffset) `设置控件的滑动阻力，有效值为0.1F~1.0F，值越小阻力越大，默认为0.5F  \n`public void setTargetView(View view) `设置控件的前景View  \n`public void setBackgroundView(View view)` 设置控件的背景View  \n`public void setSlidingListener(SlidingListener slidingListener)` 给控件设置监听，可以监听滑动情况  \n`public void setSlidingMode(int mode)` 设置滑动模式  \n`public void setSlidingDistance(int max)` 设置最大滑动距离，仅在top模式下有效  \n\n---\n\n### 夜间主题（仿知乎/改变主题的方式）\n\n（本应用中还未使用）  \n\n博客参考地址：[http://www.jianshu.com/p/3b55e84742e5](http://www.jianshu.com/p/3b55e84742e5)  \n项目地址：[https://github.com/D-clock/AndroidStudyCode](https://github.com/D-clock/AndroidStudyCode)  \n\nDayNightActivity的例子的方式是在设置页的的代码方式。  \n在其他有夜间模式的页面，只要在setcontentView之前判断目前设置的模式然后设置  此种模式就行了。即实现initData();initTheme();方法就行了，同时可以在BaseActivity中实现。\n\n---\n\n### 主导航页面（设计思路）\n\n(目前应用的问题，个人感觉就是这个设计的有问题)\n\n下面具有导航栏的主体app的设计思路。  \n由于这种导航是一级导航，目前不建议在app的一级页面就采用 `viewpager+Fragment` 或导航栏+ `Fragment` 的形式设计。  \n建议采用独立 `activity+include` 布局 + `android:launchMode=\"singleTask\"` + `theme:\u003citem name=\"android:windowAnimationStyle\"\u003e@style/noAnimation\u003c/item\u003e` (取消activity跳转自带的原生动画)的形式  \n\n这样的好处：能将每个一级功能分类页相互分离开来不相互影响。经过观察和猜想知乎采用的应该是这种方式。这样的方式也能达到和上面一样的效果，同时又解决了Fragment带来的不便。  \n\n关于主导航页返回键的监听处理方式：  \n一种是在每个主导航页中设置监听，点击一次没反应，连点击两次退出程序。  \n另外一种：点击一次返回到main主导航页面，在main页面点击一次直接退出程序（这也是知乎实现的方式，同时因为在main页面点击一次就直接退出了，所以在其他主导航页面如果连续点击两次也能达到直接退出程序的效果。）\n\n## 开源说明  \n\n本应用是上线应用，在上线之初并未开源，应许多用户和开发者朋友的呼吁后在 GitHub 上开源，因本应用本身就是我个人开发也并无商业性质，为了大家学习和参考应用内各功能的具体实现方式就毫无保留的开源给大家。  \n因最近为修复部分 bug 在应用市场提交更新版本时，收到了应用市场平台“此APP已被打入盗版库，不予重复更新上传”的通知拒绝更新（想象可能是有人修改此源码重复提交应用上线了）。同时也有部分朋友询问此项目采用的开源协议。基于上面这些情况在这着重强调一下开源说明：  \n\n1. 本应用的开源源码大家都可以随意复制传播、Fork，大家对应用内各功能的实现源码可以学习参考；\n2. 《小秋魔盒》是上线应用，自第一个版本上线之时，就关于本应用的所有权、知识产权、侵权申明的相关信息在应用的 “设置” \u003e “声明” 页面有明确详细说明；\n3. 本应用目前不采用任何开源协议，我个人保留本应用的所有权利； \n4. 本应用不允许任何人对源码再整体封装、或修改部分代码或变异改编再次提交上线或使用等，严禁使用到商业目的用途、毕业论文、其他形式的使用等。\n\n## 应用详细说明   \n\n[![CSDN](https://img.shields.io/badge/CSDN-http://blog.csdn.net/shedoor-blue.svg?style=social)](http://blog.csdn.net/shedoor)  \n[![掘金](https://img.shields.io/badge/%E6%8E%98%E9%87%91-https%3A%2F%2Fjuejin.im%2Fuser%2F593a09f9fe88c2006a0034ea-red.svg?style=social)](https://juejin.im/user/593a09f9fe88c2006a0034ea)  \n\n\u003cbr\u003e\n\n\n[![ocnyang.com](https://img.shields.io/badge/%E6%88%91%E7%9A%84%E5%8D%9A%E5%AE%A2%E7%BD%91%E7%AB%99-www.ocnyang.com-lightgrey.svg?style=flat-square)](http://ocnyang.com/)\u0026ensp;\u0026ensp;[![新浪微博](https://img.shields.io/badge/%E6%96%B0%E6%B5%AA%E5%BE%AE%E5%8D%9A-欧神杨-red.svg?style=flat-square)](http://weibo.com/ocnyang/)\n","funding_links":[],"categories":["Java"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOCNYang%2FQBox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOCNYang%2FQBox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOCNYang%2FQBox/lists"}