feat: build apk from project(dir) support

This commit is contained in:
hyb1996
2018-01-24 17:29:25 +08:00
parent 316415343f
commit c93c27fcaa
22 changed files with 365 additions and 34 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@@ -0,0 +1,32 @@
"ui";
ui.layout(
<scroll>
<vertical bg="#707070" padding="16">
<text text="网络图片" textColor="black" textSize="16sp" marginTop="16"/>
<img src="file://auto.js.png"
w="100" h="100"/>
<text text="带边框的图片" textColor="black" textSize="16sp" marginTop="16"/>
<img src="http://www.autojs.org/assets/uploads/profile/1-profileavatar.jpeg"
w="100" h="100" borderWidth="2dp" borderColor="#202020"/>
<text text="圆形图片" textColor="black" textSize="16sp" marginTop="16"/>
<img src="http://www.autojs.org/assets/uploads/profile/1-profileavatar.jpeg"
w="100" h="100" circle="true"/>
<text text="带边框的圆形图片" textColor="black" textSize="16sp" marginTop="16"/>
<img src="http://www.autojs.org/assets/uploads/profile/1-profileavatar.jpeg"
w="100" h="100" circle="true" borderWidth="2dp" borderColor="#202020"/>
<text text="圆角图片" textColor="black" textSize="16sp" marginTop="16"/>
<img id="rounded_img" src="http://www.autojs.org/assets/uploads/profile/1-profileavatar.jpeg"
w="100" h="100" radius="20dp" scaleType="fitXY"/>
<button id="change_img" text="更改图片"/>
</vertical>
</scroll>
);
ui.change_img.click(()=>{
ui.rounded_img.setSource("http://www.autojs.org/assets/uploads/profile/1-profilecover.jpeg");
});

View File

@@ -0,0 +1,10 @@
{
"name": "Hello World",
"versionName": "1.0.0",
"versionCode": 1,
"packageName": "org.autojs.example",
"main": "main.js",
"assets" : [
"auto.js.png"
]
}

View File

@@ -1,2 +0,0 @@
auto();
toast(files.read("/sdcard/1.txt"));