hss01248/UETool


Show/edit any view's attributions on the screen.

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.hss01248:uetool:1.0.17'
	}
	dependencies {
		implementation("com.github.hss01248:uetool:1.0.17")
	}
	<dependency>
	    <groupId>com.github.hss01248</groupId>
	    <artifactId>uetool</artifactId>
	    <version>1.0.17</version>
	</dependency>

                            
    libraryDependencies += "com.github.hss01248" % "uetool" % "1.0.17"
        
        

                            
    :dependencies [[com.github.hss01248/uetool "1.0.17"]]
        
        

Readme


UETool GitHub release platform license

INTRODUCTION

中文版

UETool is a debug tool for anyone who needs show/edit one or more views' attributions. It works on Activity/Fragment/Dialog/PopupWindow or any other view.

At present, UETool provides functionality as follows:

  • Move any view on the screen (selecting view repeatedly will select its parent's view)
  • Show/edit normal view's attributions such as edit TextView's text、textSize、textColor etc.
  • If you are using Fresco's DraweeView, UETool provides show more attributions like ImageURI、PlaceHolderImage、CornerRadius etc.
  • You can customize any view's attributions you want with simple way such as some biz param
  • You can check ValidViews and choose which target view you want (if offered UETool isn’t what you want)
  • Show two view's relative positions
  • Show gridding for checking view alignment

EFFECT

<div> <img width="270" height="480" src="https://github.com/eleme/UETool/blob/master/art/move_view.gif"/> <img width="270" height="480" src="https://github.com/eleme/UETool/blob/master/art/show_image_uri.gif"/> <br/> <img width="270" height="480" src="https://github.com/eleme/UETool/blob/master/art/relative_position.gif"/> <img width="270" height="480" src="https://github.com/eleme/UETool/blob/master/art/show_gridding.png"/> </div>

ATTRIBUTE LIST

| Attribute | Value Sample | Editable | | --- | --- | --- | | Move | if you checked it, you can move view easily | | | ValidViews | sometimes target view which UETool offered isn’t you want, you can check it and choose which you want | | | Class | android.widget.LinearLayout | | | Id | 0x7f0d009c | | | ResName | btn | | | Clickble | TRUE | | | Focoused | FALSE | | | Width(dp) | 107 | YES | | Height(dp) | 19 | YES | | Alpha | 1.0 | | | PaddingLeft(dp) | 10 | YES | | PaddingRight(dp) | 10 | YES | | PaddingTop(dp) | 10 | YES | | PaddingBottom(dp) | 10 | YES | | Background | #90000000 <br/> #FF8F8F8F -> #FF688FDB <br/> [PICTURE] 300px300px | | | TextView | | | | Text | Hello World | YES | | TextSize(sp) | 14 | YES | | TextColor | #DE000000 | YES | | IsBold | TRUE | YES | | SpanBitmap | [PICTURE] 72px39px | | | DrawableLeft | [PICTURE] 51px51px | | | DrawableRight | [PICTURE] 36px36px | | | DrawableTop | [PICTURE] 36px36px | | | DrawableBottom | [PICTURE] 36px36px | | | ImageView | | | | Bitmap | [PICTURE] 144px144px | | | ScaleType | CENTER_CROP | | | DraweeView | | | | CornerRadius | 2dp | | | ImageURI | https://avatars2.githubusercontent.com/u/1201438?s=200&v=4 | | | ActualScaleType | CENTER_CROP | | | IsSupportAnimation | TRUE | | | PlaceHolderImage | [PICTURE] 300px300px | | | | | |

HOW TO USE

Installation

dependencies {
  debugCompile 'me.ele:uetool:1.0.15'
  releaseCompile 'me.ele:uetool-no-op:1.0.15'

  // if you want to show more attrs about Fresco's DraweeView
  debugCompile 'me.ele:uetool-fresco:1.0.15'
}

Usage

show floating window

UETool.showUETMenu();

UETool.showUETMenu(int y);

dismiss floating window

UETool.dismissUETMenu();

filter out view which you don't want to select

UETool.putFilterClass(Class viewClazz);

UETool.putFilterClass(String viewClassName);

customize with your view


// step 1, implements IAttrs

public class UETFresco implements IAttrs {
  @Override public List<Item> getAttrs(Element element) {
  
  }  
}

// step 2, put in UETool

UETool.putAttrsProviderClass(Class customizeClazz);

UETool.putAttrsProviderClass(String customizeClassName);

License

MIT