Faster development with Debug Drawer
Currently exists 6 modules:
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)
LocationModule, UserInterfaceModule, LogsModule
Add Gradle dependency:
dependencies{compile 'io.palaima.debugdrawer:debugdrawer:0.1.1' }If you are using popular OkHttp library. Probably you will be interesting in network statistics
dependencies{compile 'io.palaima.debugdrawer:debugdrawer-okhttp:0.1.1' }Or if you are using Picasso library, also from Square Inc.
dependencies{compile 'io.palaima.debugdrawer:debugdrawer-picasso:0.1.1' }You can try the SNAPSHOT version:
dependencies{compile 'io.palaima.debugdrawer:debugdrawer:0.2.0-SNAPSHOT' }Make sure to add the snapshot repository:
repositories{maven{url "https://oss.sonatype.org/content/repositories/snapshots" } }privateDebugDrawermDebugDrawer; @OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState); if (BuildConfig.DEBUG){mDebugDrawer = newDebugDrawer.Builder(this).modules( newOkHttpModule(mOkHttpClient), newPicassoModule(mPicasso), newDeviceModule(this), newBuildModule(this), newNetworkModule(this), newSettingsModule(this) ).build()} }If you use NetworkModule or your own which is hooked with BroadcastReceivers you must call onStart/onStop in your activity
@OverrideprotectedvoidonStart(){super.onStart(); if (mDebugDrawer != null){mDebugDrawer.onStart()} }@OverrideprotectedvoidonStop(){super.onStop(); if (mDebugDrawer != null){mDebugDrawer.onStop()} }Module must implement DrawerModule interface
publicinterfaceDrawerModule{/** * Creates module view */ViewonCreateView(LayoutInflaterinflater, ViewGroupparent); /** * Override this method if you need to refresh * some information when drawer is opened */voidonRefreshView(); /** * Override this method if you need to start * some processes that would be killed when * onStop() is called * E.g. register receivers */voidonStart(); /** * Override this method if you need to do * some clean up when activity goes to foreground. * E.g. unregister receivers */voidonStop()}You can clone the project and compile it yourself (it includes a sample). MainActivity
Want to contribute? You are welcome! Note that all pull request should go to dev branch.
- Mantas Palaima - [email protected]
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. 





