This is a Tool to extract hard code from android layout
Extraction string and dimens from layout,Merge into strings.xml and dimens.xml
Programs description
Programs purpose: fixed Android project Hard Code Problems Args:
- layout:the path of $project/appmodule/src/main/res/layout
- config: configure file
- existPixels:the path of $project/appmodule/src/main/res/values/dimens.xml
- existStrings:the path of $project/appmodule/src/main/res/values/strings.xml
- scaleRatio:px to dp,default 3px == 1dp
- out:layout dir out path
after that you will see strings.xml and dimens.xml in
{layout output path}/outand all xml file in
{layout output path}
Create New Android Application and modify main layout
Now We Run This Tool,Over this,We can see the file in {out path/layout} with ```xml <?xml version="1.0" encoding="utf-8"?>
```
And {out path/layout/out} has two file ,strings.xml and dimens.xml
xml Hello Word
40.0dp 20.0sp
Before Copy New file to Replace original File,Please make sure everything is OK!!!!