Draftsman is an on-device layout inspector for Android apps. It allows you to view various properties of rendered Android Views such as width, height, class name, paddings, margins etc.
Draftsman aims to combine capabilities of different Android tools such as
Show Layout Bounds and Android Studio’s layout inspector.
The primary objective of Draftsman is to provide information around rendered views directly from your app which is easily accessible to devs, designers, PMs or any one who has installed the app. No need to use any external tool or rely on debug variant of your app.
Width & Height Info for any view
Class name for any view
Margin and Padding visualization
Dimension values in both Pixel(Px) and dp/sp
TextView color and size information
Overlay a grid
Overlay a image to compare UI
Check usage guide for more details.
This section will help you understand what information Draftsman can capture from a view.
This is our base view
When Draftsman is enabled
This is how our view looks like once Draftsman is enabled. Inspectable views are highlighted and a arrow appears on right to open drawer.
Draftsman Setting Drawer
You can use this drawer to customise a few settings.
On tapping of first text “Hi Folks” we can observe this overlay. It provides information on height, width, textsize and textcolor. Dimensions can be observed in dp or px.
Inspection details overlay can be closed using cross icon and Draftsman can be closed by pressing Exit button.
Any arbitrary view can be inspected as well allowing us to inspect height, width and class name
Margin and Padding
Tapping around views highlights margins and paddings if available. Padding is shown with green background and margin with red line.
If there are multiple views stacked within same bounds, Draftsman will prompt you to select the view to be inspected
You can also add a size configurable grid overlay on your screen from setting drawer.
You can also overlay a screenshot on top of existing screen to check for UI differences. A slider on bottom can be used to fade out overlay image.
Note: Storage read permission should be provided for this to work.
Mobile App Development Best Practices – 21.09
iOS Closures vs. Delegates in Swift iOS How to use the new inspector SwiftUI view modifier How to create an...
2023 App Threat Report
In 2022 alone, the number of mobile app downloads surpassed a staggering 200 billion, emphasizing the pervasive presence of these...
ElectricSQL – Local-first sync layer for web and mobile apps
Local-first sync layer for web and mobile apps. Build reactive, realtime, local-first apps directly on Postgres. What is ElectricSQL? ElectricSQL...
GitHub Copilot Chat opened to individual developers
Like similar chatbots, Copilot Chat sits in the sidebar of the IDE, and developers can use it to have lengthy...
ComposeCard – A beautifully designed payment view library
ComposeCards is a beautifully designed payment view library for Credit and Debit Cards. Made using Jetpack Compose 🎉. It allows...
Mobile App Development Best Practices – 20.09
Airship has released another study of mobile users aka shoppers. A lot of interesting things about habits and tasks in...