世上最长的清微信刷屏神器器

内容字号:
段落设置:
字体设置:
调试神器DebugDrawer:集成调试log,view,picasso,okhttp等调试
Faster development with Debug Drawer
Currently 10 modules exist:
DeviceModule&- common information about your device
BuildModule&- app build information
SettingsModule&- open Developer, Battery, Default settings, open app info and possibility to uninstall app directly from itself
NetworkModule&- enable/disable Wifi, Mobile or Bluetooth
OkHttpModule&- common information about http client (requires extra dependency)
PicassoModule&- image downloading and caching statistics (requires extra dependency)
ScalpelModule&- tool to uncover the layers under your app (requires extra dependency). Thanksebabel for contributing.
LocationModule&- common location information (requires extra dependency)
TimberModule&- log viewer with sharing feature (requires extra dependency). ThanksAntonyGolovin for contributing.
ActionsModule&- any context dependent action (&ButtonAction&,SwitchAction&,&SpinnerAction&)
FpsModule&- measuring the FPS using Choreographer (requires extra dependency)
Network delay/error adapters
Take screenshot feature
You are always welcome to suggest modules!
Getting Started
Add Gradle dependencies:
DebugDrawer
dependencies {
debugCompile 'io.palaima.debugdrawer:debugdrawer:0.6.2'
releaseCompile 'io.palaima.debugdrawer:debugdrawer-no-op:0.6.2'
dependencies {
debugCompile 'io.palaima.debugdrawer:debugdrawer-view:0.6.2'
releaseCompile 'io.palaima.debugdrawer:debugdrawer-view-no-op:0.6.2'
BuildModule&,&DeviceModule&,&SettingsModule&,&NetworkModule
dependencies {
compile 'io.palaima.debugdrawer:debugdrawer-commons:0.6.2'
ActionsModule&-&ButtonAction&,&SwitchAction&,&SpinnerAction
dependencies {
compile 'io.palaima.debugdrawer:debugdrawer-actions:0.6.2'
OkHttpModule&OkHttp library required
dependencies {
compile 'io.palaima.debugdrawer:debugdrawer-okhttp:0.6.2'
PicassoModule&Picasso library required
dependencies {
compile 'io.palaima.debugdrawer:debugdrawer-picasso:0.6.2'
ScalpelModule&Scalpel library required
dependencies {
compile 'io.palaima.debugdrawer:debugdrawer-scalpel:0.6.2'
LocationModule
dependencies {
compile 'io.palaima.debugdrawer:debugdrawer-location:0.6.2'
TimberModule&Timber library required
dependencies {
compile 'io.palaima.debugdrawer:debugdrawer-timber:0.6.2'
FpsModule&Takt library required
dependencies {
compile 'io.palaima.debugdrawer:debugdrawer-fps:0.6.2'
You can try the SNAPSHOT version:
dependencies {
debugCompile 'io.palaima.debugdrawer:debugdrawer:0.6.3-SNAPSHOT'
Make sure to add the snapshot repository:
repositories {
url &https://oss.sonatype.org/content/repositories/snapshots&
Putting All Together
1. Initialization in Activity
You could use&DebugDrawer&or&DebugView&depending on your needs
Example using&DebugDrawer&(For&DebugView&initialization checkDebugViewActivity)
private DebugDrawer debugD
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SwitchAction switchAction = new SwitchAction(&Test switch&, new SwitchAction.Listener() {
public void onCheckedChanged(boolean value) {
Toast.makeText(MainActivity.this, &Switch checked&, Toast.LENGTH_LONG).show();
ButtonAction buttonAction = new ButtonAction(&Test button&, new ButtonAction.Listener() {
public void onClick() {
Toast.makeText(MainActivity.this, &Button clicked&, Toast.LENGTH_LONG).show();
SpinnerAction&String& spinnerAction = new SpinnerAction&&(
Arrays.asList(&First&, &Second&, &Third&),
new SpinnerAction.OnItemSelectedListener&String&() {
@Override public void onItemSelected(String value) {
Toast.makeText(MainActivity.this, &Spinner item selected - & + value, Toast.LENGTH_LONG).show();
debugDrawer = new DebugDrawer.Builder(this)
new ActionsModule(switchAction, buttonAction, spinnerAction),
new FpsModule(Takt.stock(getApplication())),
new LocationModule(this),
new ScalpelModule(this),
new TimberModule(),
new OkHttpModule(mOkHttpClient),
new PicassoModule(mPicasso),
new DeviceModule(this),
new BuildModule(this),
new NetworkModule(this),
new SettingsModule(this)
).build();
2. Lifecycle
If you use&NetworkModule&,&LocationModule&,&FpsModule&or your own which is hooked with BroadcastReceivers you must call&onStart&/&onStop&,onResume&/&onPause&in your activity
protected void onStart() {
super.onStart();
debugDrawer.onStart();
protected void onResume() {
super.onResume();
debugDrawer.onResume();
protected void onPause() {
super.onPause();
debugDrawer.onPause();
protected void onStop() {
super.onStop();
debugDrawer.onStop();
3.&TimberModule
Don't forget to plant needed log trees in Application class. Tree that is used byTimberModule&stored in&LumberYard&class.
Application class example:
public class DebugDrawerApplication extends Application {
public void onCreate() {
super.onCreate();
LumberYard lumberYard = LumberYard.getInstance(this);
lumberYard.cleanUp();
Timber.plant(lumberYard.tree());
Timber.plant(new Timber.DebugTree());
Creating and Publishing Your Own Module
Add&compile 'io.palaima.debugdrawer:debugdrawer-base:0.6.2'&to your dependencies
Module must implement&DebugModule&interface
public interface DebugModule {
* Creates module view
@NonNull View onCreateView(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent);
* Override this method if you need to refresh
* some information
when drawer is opened
void onOpened();
* Override this method if you need to stop
* some actions
when drawer is closed
void onClosed();
* Override this method if you need to start
* some processes
void onResume();
* Override this method if you need to do
* some clean up
void onPause();
* Override this method if you need to start
* some processes that would be killed when
* onStop() is called
* E.g. register receivers
void onStart();
* Override this method if you need to do
* some clean up when activity goes to foreground.
* E.g. unregister receivers
void onStop();
You can clone the project and compile it yourself (it includes a sample).
Contributing
Want to contribute? You are welcome!
Pull Requests
Fork the repo and create your branch from&dev&.
If you've changed APIs, update the documentation.
Make sure your code lints.
Change README.md if necessary
Coding Style
Opening braces to appear on the same line as code
All variables must be&camelCase
All resources must have&dd_&prefix
Developed By
Mantas Palaima -&
Jake Wharton -U2020
Mike Penz -MaterialDrawer
LemonLabs -SlidingDebugMenu
Copyright 2015 Mantas Palaima.
Licensed under the Apache License, Version 2.0 (the &License&);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an &AS IS& BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
分享给小伙伴们:
本类最热新闻
48小时最热
0102030405060708
CopyRight © 2015- , All Rights Reserved.
清屏网 版权所有 豫ICP备号刷屏神器定海神针_百度知道
刷屏神器定海神针
刷屏神器定海神针
我有更好的答案
定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 针 定 海 神 ...
其他类似问题
为您推荐:
定海神针的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁[text]返回顶部&/&【刷屏神器】比那金箍棒还长~围观&·&&0评论&·&&0香蕉&/&&&/&&已收藏&/&&/&【刷屏神器】比那金箍棒还长~
基佬们来数数有多少层楼吧 ~【刷屏神器】比那金箍棒还长~该投稿暂无简介长度超出范围...长度超出范围...[+展开简介]投1蕉安利给基友官方下载功能反馈本站不提供任何视听上传服务,所有内容均来自视频分享站点所提供的公开引用资源。Copyright (C)
AcFun. 保留所有权利清屏神器_百度知道
您的回答被采纳后将获得:
系统奖励20(财富值+经验值)+难题奖励20(财富值+经验值)
我有更好的答案
其他类似问题
为您推荐:
管理培训的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 刷屏神器定海神针 的文章

 

随机推荐