A UI inspector to traverse a view hierarchy on Android
What are the properties | Where is the source code | Show the layout boundary |
---|---|---|
![]() |
![]() |
![]() |
After selecting the view, you can see the line number of source code | Line 59 in the corresponding file is the source code where Text is located |
---|---|
![]() |
![]() |
Layoutinspector
repositories {
mavenCentral()
}
dependencies {
// debugImplementation because Uinspector should only run in debug builds.
debugImplementation "io.github.yvescheung:Uinspector:x.y.z"
// optional integration library
debugImplementation "io.github.yvescheung:Uinspector-optional-viewmodel:x.y.z"
debugImplementation "io.github.yvescheung:Uinspector-optional-fresco:x.y.z"
debugImplementation "io.github.yvescheung:Uinspector-optional-glide:x.y.z"
debugImplementation "io.github.yvescheung:Uinspector-optional-multitype:x.y.z"
debugImplementation "io.github.yvescheung:Uinspector-optional-lottie:x.y.z"
// optional integration library for Jetpack Compose!
debugImplementation "io.github.yvescheung:Uinspector-optional-compose:x.y.z"
}
That’s it, there is no code change needed!
Glide
If an image is loaded with Glide, you can inspect the properties on the ImageView:
glide model
: The image source, maybe an url or a resource id
glide error
: The error drawable
glide placeholder
: The place holder drawable
All you need to do is Add the gradle dependency on the Glide integration library:
dependencies {
debugImplementation 'com.github.YvesCheung.UInspector:Uinspector-optional-glide:x.y.z'
}
You can develop your own panel and add it into UInspector
:
UInspector
will launch automatically when the application starts. You can disable this feature if you don't want this:
dependencies {
debugImplementation('com.github.YvesCheung.UInspector:Uinspector:x.y.z') {
// After excluding, UInspector won't launch until you invoke it's `create` method!
exclude module: 'Uinspector-optional-autoinstall'
}
}
Development environment
Jetpack Compose
compiler feature.Copyright 2020 Yves Cheung
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.
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing