A surgical debugging tool to uncover the layers under your app.

Related tags

Tools scalpel
Overview

Scalpel

DEPRECATED! Android Studio 4.0's layout inspector now includes a live-updating 3D view. Use it!


A surgical debugging tool to uncover the layers under your app.

Usage

Place a ScalpelFrameLayout at the root of your hierarchy.

  • Enable the 3D interaction with setLayerInteractionEnabled(boolean).
  • Toggle wireframe display with setDrawViews(boolean).
  • Toggle view ID display with setDrawIds(boolean).
  • Change the wireframe color with setChromeColor(int) and setChromeShadowColor(int).

When interaction is enabled the following gestures are supported:

  • Single touch: Controls the rotation of the model.
  • Two finger vertical pinch: Adjust zoom.
  • Two finger horizontal pinch: Adjust layer spacing.

If you are using the Gradle-based build system, you can wrap this view group around your activity layouts only in the debug builds.

Note: There are known text rendering issues prior to Android 4.4 that cannot be fixed. Sorry.

Download

Download the latest JAR or grab via Gradle:

compile 'com.jakewharton.scalpel:scalpel:1.1.2'

or Maven:

<dependency>
  <groupId>com.jakewharton.scalpel</groupId>
  <artifactId>scalpel</artifactId>
  <version>1.1.2</version>
</dependency>

License

Copyright 2014 Jake Wharton

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.
Comments
  • Request : make a desktop version

    Request : make a desktop version

    I think it will be much cooler to use on the PC (like the tool on DDMS) instead of the device itself.

    Please make it happen somehow. Maybe you could even add features that the DDMS tool doesn't have.

    opened by AndroidDeveloperLB 20
  • Sqaush view/level queue into one queue

    Sqaush view/level queue into one queue

    Saw the todo in in code and thought i would fix it. I changed the naming from 'level' to 'layer' mostly because i thought is made it clearer but if you don't think it's appropriate i will revert that. Otherwise nothing much to say, this shouldn't take noticeably more memory as the previous version was boxing the level into a Integer. However if memory / allocation time would ever become a problem is't easy to start caching the LayeredView objects.

    opened by emilsjolander 5
  • Added drawing class names and build updated

    Added drawing class names and build updated

    Added drawing class names functionality described in #21 and build configuration was updated for latest versions of used tools.

    Drawing class names

    When it is enabled, simple class name is rendered for view. When there is id as well, class name is rendered under it. screen

    Gradle build update

    Update Gradle configuration for newest Gradle distribution and Android Gradle plugin. Updated and tested new Travis configuration.

    opened by jraska 4
  • Added ScalpelFrameLayout#setDrawIds

    Added ScalpelFrameLayout#setDrawIds

    It is now possible to let ScalpelFrameLayout draw the view's ID. Also extended the SampleActivity to include a new MenuItem for toggling this feature.

    opened by ChristianKatzmann 3
  • Option to reverse lookup and display view IDs, class name

    Option to reverse lookup and display view IDs, class name

    Would be cool to see this data but it's already a space-constrained layout. How can we display this on-demand without just cramming it in. Long-press and drag to select which view you are interested in?

    opened by JakeWharton 2
  • Please, add javadoc and source code to the gradle artifact

    Please, add javadoc and source code to the gradle artifact

    Currently there is neither javadoc nor source code included. I now there used to be some problems shipping javadoc and source code in aar files, but they seem to have been fixed

    opened by netimen 1
  • DFS to pre-compute view layer levels and avoid collisions.

    DFS to pre-compute view layer levels and avoid collisions.

    This fixes #15 at the expense of switching to a view-hierarchy snapshot rather than being tired directly. For some reason, we were triggering re-layout constantly which thrashes objects in this tree.

    Not convinced this is ready to go in yet...

    opened by JakeWharton 0
  • Fix multitouch.

    Fix multitouch.

    No need to iterate through all pointers when we know only two of them matters. The sign of dy/dx for each pointer also changes based on where the other pointer is relative to it.

    opened by SimonVT 0
  • build error

    build error

    after I import the project and found this error:

    Error:Gradle DSL method not found: 'getBootClasspath()'
    

    It seem that the build.gradle config is too old, please update the build.gradle

    opened by ragnraok 2
  • Feature Request: setDrawClassNames

    Feature Request: setDrawClassNames

    In addition to drawing ids I would like to see the ability to toggle class names of the views.

    ex "android.widget.TextView" or even just "TextView".

    opened by ebabel 0
  • Translation not working

    Translation not working

    I've started using scalpel in my app, and I've been seing a bug (I guess) where setting translation values in views doesn't have any effect. I didn't know which was the cause, but I have now confirmed that is due to using ScalpelLayout (with the Debug Drawer from u2020, thanks a lot for that Jake).

    I don't have enough knowledge to debug the issue, so I'm reporting it. I hope it's fixable. Thanks anyways :)

    opened by Sloy 0
  • Siblings Occupying The Same Area Need Stacked

    Siblings Occupying The Same Area Need Stacked

    Currently siblings are always drawn on the same layer. This is actually bad if you have overlapping views as they and their children can draw over each other on the same level.

    A second child which overlaps need to be prompted to a layer higher than its sibling (and all its children).

    opened by JakeWharton 5
  • Animation API Transformation

    Animation API Transformation

    Use the animation APIs for performing the hierarchy transformation.

    Pros:

    • Hardware accelerated.
    • Could have a super-sexy enabled/disabled transition.
    • Views would still be interactive.
    • Doesn't require being in the view hierarchy (unless we want to intercept touch events)

    Cons:

    • Other animations using absolute positioning would break the effect.
    opened by JakeWharton 0
Owner
Jake Wharton
Jake Wharton
A simple utility to remove unused resources in your Android app to lower the size of the APK. It's based on the Android lint tool output.

android-resource-remover android-resource-remover is utility that removes unused resources reported by Android Lint from your project. The goal is to

Keepsafe 1.3k Dec 16, 2022
A super fast build tool for Android, an alternative to Instant Run

Freeline Freeline is a super fast build tool for Android and an alternative to Instant Run. Caching reusable class files and resource indices, it enab

Alibaba 5.5k Jan 2, 2023
Command-line tool to count per-package methods in Android .dex files

dex-method-counts Simple tool to output per-package method counts in an Android DEX executable grouped by package, to aid in getting under the 65,536

Mihai Parparita 2.6k Nov 25, 2022
Tool for create complex morphing animations using VectorDrawables (allows morphing between any pair of SVG images)

VectAlign VectAlign (a.k.a. VectorDrawableAlign) is a developer's tool which automagically aligns two VectorDrawable "pathData" strings (or SVG images

Stefano Bonetta 2k Dec 29, 2022
A tool to install components of the Android SDK into a Maven repository or repository manager to use with the Android Maven Plugin, Gradle and other tools.

Maven Android SDK Deployer Original author including numerous fixes and changes: Manfred Moser [email protected] at simpligility technologies i

simpligility 1.4k Dec 27, 2022
GPS tracking tool for OpenStreetMap

OSMTracker for Android™ official source code repository is https://github.com/labexp/osmtracker-android. For more information about the project, docum

Laboratorio Experimental (ITCR @ SIUA) 455 Dec 25, 2022
A tool to install components of the Android SDK into a Maven repository or repository manager to use with the Android Maven Plugin, Gradle and other tools.

Maven Android SDK Deployer Original author including numerous fixes and changes: Manfred Moser [email protected] at simpligility technologies i

simpligility 1.4k Dec 27, 2022
GPS tracking tool for OpenStreetMap

OSMTracker for Android™ official source code repository is https://github.com/labexp/osmtracker-android. For more information about the project, docum

Laboratorio Experimental (ITCR @ SIUA) 455 Dec 25, 2022
Android Material Design Theme UI and Tool Library. Support: 4.0.3~O

GitHub OSChina 中文 English Genius-Android Genius-Android: by Material Design style and some commonly used packages. Starting in 2015, The divided into

Qiujuer 2.3k Dec 27, 2022
Custom content tool for The Ponies.

PoneCrafter A sneak preview of the custom content tool for The Ponies. The Ponies is a work in progress life simulator game. The game itself has not b

The Ponies 8 Feb 13, 2022
Android Merge Tool

AMT The Android Merge Tool (AMT) does what the name suggests: it merges arbitrary Android apps into a single merged app. As input it takes a number of

FoelliX 23 Nov 8, 2022
Tool to assist in tuning simos ECUs.

Simos Tools Makes use of the Macchina-A0 BLEISOTP bridge firmware originally developed by bri3d to log Simo ECUs: https://github.com/Switchleg1/esp32-

null 17 Nov 23, 2022
Tool to archive Progressbar95

ProgressArchiver95 Tool to archive Progressbar95 How to use Simply select the APKs you want to archive and click the Archive button. A list of ABIs an

null 7 Jul 21, 2022
A command line tool that helps bulk manage resources in an Android project

Resource Mover ResourceMover is a command line tool that helps bulk manage resources in an Android project. Installation Clone project Build CLI jar u

Shopify 4 Dec 24, 2021
Android Studio's Vector Drawable conversion tool in convenient packaging.

Vector Drawable Tool This repository is simply a repackaging of the vector drawable tool from the Android Studio source code. The included Gradle file

Ryan Harter 55 Sep 26, 2022
Localization tool for Android Studio Projects

Android Strings Resource Language Diff tool In the event any additional languages are intended to be supported by your app. You can use this strings-d

Braxton Nunnally 1 Mar 24, 2022
A tool to activate FinalShell

A tool to activate FinalShell

null 5 Dec 3, 2022