eleme / UETool
- суббота, 19 мая 2018 г. в 00:17:00
Java
Show/edit any view's attributions on the screen.
UETool is a debug tool for anyone who needs show/edit one or more view's attributions. It works on Activity/Fragment/Dialog/PopupWindow or any else view shows on the screen.
At present UETool provides functionality as bellows:
| Attribute | Value Sample | Editable |
|---|---|---|
| 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 #FF8F8F8F -> #FF688FDB [PICTURE] 300px*300px |
|
| TextView | ||
| Text | Hello World | YES |
| TextSize(sp) | 14 | YES |
| TextColor | #DE000000 | YES |
| IsBold | TRUE | YES |
| SpanBitmap | [PICTURE] 72px*39px | |
| DrawableLeft | [PICTURE] 51px*51px | |
| DrawableRight | [PICTURE] 36px*36px | |
| ImageView | ||
| Bitmap | [PICTURE] 144px*144px | |
| ScaleType | CENTER_CROP | |
| DraweeView | ||
| CornerRadius | 2dp | |
| ImageURI | https://avatars2.githubusercontent.com/u/1201438?s=200&v=4 | |
| ActualScaleType | CENTER_CROP | |
| IsSupportAnimation | TRUE | |
| PlaceHolderImage | [PICTURE] 300px*300px | |
dependencies {
debugCompile 'me.ele:uetool:1.0.12'
releaseCompile 'me.ele:uetool-no-op:1.0.12'
// if you want to show more attrs about Fresco's DraweeView
debugCompile 'me.ele:uetool-fresco:1.0.12'
}UETool.showUETMenu();
UETool.showUETMenu(int y);UETool.dismissUETMenu();UETool.putFilterClass(Class viewClazz);
UETool.putFilterClass(String viewClassName);// 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);