A UI inspector to traverse a view hierarchy on Android

Overview

Uinspector

A UI inspector to traverse a view hierarchy on Android

Build Jitpack hackmd-github-sync-badge

Preview

What are the properties Where is the view Select another view

Feature

  • Low intrusive, no code change required
  • Turn on/off inspector throught the notification
  • Select the target view by clicking on it
  • What's LayoutInspector can't do?
    • Tracking animations

    • Support to add your custom panel or custom view properties

      See more

Get Started

Add jitpack to your project-level build.gradle

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

Add dependency to your module-level build.gradle

dependencies {
    ...
    // debugImplementation because Uinspector should only run in debug builds.
    debugImplementation 'com.github.YvesCheung.UInspector:Uinspector:x.y.z'
    
    // optional integration library
    debugImplementation "com.github.YvesCheung.UInspector:Uinspector-optional-viewmodel:x.y.z"
    debugImplementation "com.github.YvesCheung.UInspector:Uinspector-optional-fresco:x.y.z"
    debugImplementation "com.github.YvesCheung.UInspector:Uinspector-optional-glide:x.y.z"
    debugImplementation "com.github.YvesCheung.UInspector:Uinspector-optional-multitype:x.y.z"
    debugImplementation "com.github.YvesCheung.UInspector:Uinspector-optional-lottie:x.y.z"
}

x.y.z replace with Jitpack

That’s it, there is no code change needed!

Usage

  1. Start the inspector through the notification
  2. Tap the view you want to inspect
  3. Now you can see the properties on the popup panel

4. Uinspector intercept the 'single tap' event, but you can perform click on a View by double tap instead! And the scroll event/ key event can be dispatched as usual.

Optional Dependencies

  • Glide

    If an image is loaded with Glide, you can inspect the properties on the ImageView:

    Inspect ImageView with Glide

    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'
    }

    x.y.z replace with Jitpack

To see more optional dependencies below:

Develop

  • You can develop your own panel and add it into UInspector:

    See Doc

  • 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

    • Branch 2.x : Require jdk11, Android Studio Canary (Preview), enable Jetpack Compose feature (Developing).
    • Branch 1.x : Require jdk8, Android Studio 4.x (Stable).

Inspiration

License

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.
Comments
  • 一点通知栏的开关就闪退

    一点通知栏的开关就闪退

    2022-04-29 16:18:36.427 4505-4505/com.incall.navi.bl E/AndroidRuntime: FATAL EXCEPTION: main Process: com.incall.navi.bl, PID: 4505 java.lang.RuntimeException: Unable to start service com.pitaya.mobile.uinspector.notification.UInspectorNotificationService@c4c4bcd with Intent { cmp=com.incall.navi.bl/com.pitaya.mobile.uinspector.notification.UInspectorNotificationService (has extras) }: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@7782af7 -- permission denied for window type 2038 at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3376) at android.app.ActivityThread.-wrap21(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1587) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6190) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:892) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782) Caused by: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@7782af7 -- permission denied for window type 2038 at android.view.ViewRootImpl.setView(ViewRootImpl.java:703) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:342) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93) at com.pitaya.mobile.uinspector.ui.panel.fullscreen.UInspectorWindow.show(UInspectorWindow.kt:35) at com.pitaya.mobile.uinspector.UInspector.changePanelState(UInspector.kt:155) at com.pitaya.mobile.uinspector.UInspector.changeStateInner$UInspector_Uinspector_api(UInspector.kt:122) at com.pitaya.mobile.uinspector.notification.UInspectorNotificationService.onStartCommand(UInspectorNotificationService.kt:38) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3359) at android.app.ActivityThread.-wrap21(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1587)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6190)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:892)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782) 

    opened by dingxiansen1 14
  • Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

    Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

    Caused by: java.lang.IllegalArgumentException:Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. at android.app.PendingIntent.checkFlags(PendingIntent.java:375) at android.app.PendingIntent.buildServicePendingIntent(PendingIntent.java:724) at android.app.PendingIntent.getService(PendingIntent.java:686) at com.pitaya.mobile.uinspector.notification.UInspectorNotificationService.createNotification(UInspectorNotificationService.kt:88) at com.pitaya.mobile.uinspector.notification.UInspectorNotificationService.onStartCommand(UInspectorNotificationService.kt:37) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4639)

    大佬你好,做Android12适配工作的时候报了这个错误,可以处理一下吗,感谢。

    opened by RocketGirls101 2
  • app crashes when using buildtypes to set app name

    app crashes when using buildtypes to set app name

    I'm using manifestPlaceholders to specify the android:lable manifest value and the app crashes dou to this issue https://stackoverflow.com/questions/49859788/android-labelres-is-0 stacktrace: android.content.res.Resources$NotFoundException: String resource ID #0x0 at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4236) at android.app.ActivityThread.access$2200(ActivityThread.java:232) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1998) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7710) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950) Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0 at android.content.res.Resources.getText(Resources.java:367) at android.content.res.Resources.getString(Resources.java:460) at android.content.Context.getString(Context.java:639) at com.pitaya.mobile.uinspector.notification.UInspectorNotificationService.createNotification(UInspectorNotificationService.kt:65) at com.pitaya.mobile.uinspector.notification.UInspectorNotificationService.onStartCommand(UInspectorNotificationService.kt:37) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4218)

    opened by OfekRegev 2
  • java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Lambda;

    java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Lambda;

    when i use uinspector in a android(java) project . config the build.gradle file like this : debugImplementation('com.huya.mobile:Uinspector:1.0.10') it work well.

    but when i copy the *.arr file into the local and config the build.gradle file like this : image it report an error ? Failed resolution of: Lkotlin/jvm/internal/Lambda; i look for a long time , but can not find where is wrong ? can u help me?

    opened by skfly007 2
  • can't not find Uinspector on jcenter, jcenter will be shutdown

    can't not find Uinspector on jcenter, jcenter will be shutdown

    This is the error message of gradle sync: Execution failed for task ':app:checkDebugDuplicateClasses'.

    Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not find com.pitaya.mobile:Uinspector:2.0.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/pitaya/mobile/Uinspector/2.0.0/Uinspector-2.0.0.pom - https://jcenter.bintray.com/com/pitaya/mobile/Uinspector/2.0.0/Uinspector-2.0.0.pom - https://repo.maven.apache.org/maven2/com/pitaya/mobile/Uinspector/2.0.0/Uinspector-2.0.0.pom - https://maven.aliyun.com/nexus/content/groups/public/com/pitaya/mobile/Uinspector/2.0.0/Uinspector-2.0.0.pom - https://egiintel.jfrog.io/artifactory/librealsense/com/pitaya/mobile/Uinspector/2.0.0/Uinspector-2.0.0.pom Required by: project :app

    opened by Mad-Thanos 1
Releases(2.0.19)
Owner
张宇
Android开发工程师
张宇
FloatingView can make the target view floating above the anchor view with cool animation

FloatingView FloatingView can make the target view floating above the anchor view with cool animation Links 中文版 README Blog about FloatingView demo.ap

UFreedom 1.8k Dec 27, 2022
用于做Path动画的自定义View。 I have a path.I have a view. (Oh~),Path(Anim)View.

PathAnimView 用于做Path动画的自定义View。 I have a path.I have a view. (Oh~),Path(Anim)View. 现已经找到图片->SVG->PATH的正确姿势, Now i have a pic.I have a view. Oh~,Path(A

张旭童 1.1k Oct 28, 2022
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View

TourGuide TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the exa

Tan Jun Rong 2.6k Jan 5, 2023
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+)

RippleView View that imitates Ripple Effect on click which was introduced in Android L. Usage For a working implementation, Have a look at the Sample

Muthuramakrishnan Viswanathan 1.2k Dec 30, 2022
Snake View is a simple and animated linear chart for Android.

Snake View Snake library is a simple and animation line chart for Android. Latest Version How to use Configuring your project dependencies Add the lib

Txus Ballesteros 339 Dec 14, 2022
[] A simple way to "badge" any given Android view at runtime without having to cater for it in layout

Android ViewBadger A simple way to "badge" any given Android view at runtime without having to cater for it in layout. Note: If your aim is to replica

Jeff Gilfelt 3k Nov 28, 2022
Android view with both path from constructed path or from svg.

android-pathview You want to animate svg or normal Paths?<br> Change the color, pathWidth or add svg.<br> Animate the "procentage" property to make th

Georgi Eftimov 2.9k Dec 27, 2022
A horizontal view scroller library for Android

View Flow for Android ViewFlow is an Android UI widget providing a horizontally scrollable ViewGroup with items populated from an Adapter. Scroll down

Patrik Åkerfeldt 1.8k Dec 29, 2022
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.

This project isn't maintained anymore. It is now recommended to use https://github.com/peterLaurence/MapView. MapView is maintained by Peter, one of o

Mike Dunn 1.5k Dec 29, 2022
A cool Open Source CoverFlow view for Android with several fancy effects.

FancyCoverFlow THIS PROJECT IS NO LONGER MAINTAINED! What is FancyCoverFlow? FancyCoverFlow is a flexible Android widget providing out of the box view

David Schreiber-Ranner 1.1k Nov 10, 2022
A simple, customizable and easy to use swipeable view stack for Android.

SwipeStack A simple, customizable and easy to use swipeable view stack for Android. QuickStart Include the Gradle dependency dependencies { compil

Frederik Schweiger 1.5k Dec 30, 2022
Custom android music player view.

InteractivePlayerView Custom android music player view. Screen Check it on youtube Usage(XML) Define it in your xml file. <co.mobiwise.library.Intera

Mert Şimşek 744 Dec 25, 2022
Shadow layout, shadow view for android.

ShadowViewHelper Shadow layout, shadow view for android. How to use: It's very simple to use. Gradle(Check newest version): compile 'com.github.wangji

WangJie 777 Dec 30, 2022
Android Quilt View Library

QuiltViewLibrary QuiltView displays views of different sizes in a scrollable grid. Dependencies This library depends on gridlayout_v7 ([email protected]:

Jacob Moncur 561 Nov 20, 2022
A velocimeter View for Android

Velocimeter A velocimeter View for Android Sample video: Youtube Velocimeter video Sample app: How to use Default colors <com.github.glomadrian.veloci

Adrián Lomas 614 Dec 4, 2022
Android-ScrollBarPanel allows to attach a View to a scroll indicator like it's done in Path 2.0

Path 2.0 like ScrollBarPanel for Android Android-ScrollBarPanel allows to attach a View to a scroll indicator like it's done in Path 2.0. Features Sup

Arnaud Vallat 551 Dec 22, 2022
Android library to create chat message view easily

ChatMessageView ChatMessageView helps you to create chat message view quickly like a typical chatting application. Its a container view, so you can ad

Himanshu Soni 641 Dec 24, 2022
A drawing view for your android application.

Android Draw A drawing view for your android application Download For information : checkout Sample App Code in repository. Dependency Step 1. Add the

Divyanshu Bhargava 409 Dec 30, 2022
Customizable Item Setting View Android

ItemSettingView Simple ItemSettingView and Custom Installation Add it in your root build.gradle at the end of repositories: allprojects { reposito

Andhika Yuana 15 Aug 19, 2022