Skip to content

Commit

Permalink
* [android] update example
Browse files Browse the repository at this point in the history
  • Loading branch information
xkli committed Aug 10, 2016
1 parent 90a8898 commit d276ada
Show file tree
Hide file tree
Showing 27 changed files with 12,164 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/* 0 */
/***/ function(module, exports) {

;__weex_define__("@weex-component/cb2317d07ad026f4c51aa61496b2b05c", [], function(__weex_require__, __weex_exports__, __weex_module__){
;__weex_define__("@weex-component/b14be55e383e036df641734903dcecc6", [], function(__weex_require__, __weex_exports__, __weex_module__){

;
__weex_module__.exports = {
Expand Down Expand Up @@ -371,6 +371,12 @@
this.backgroundColor = 'red';
this.composite = false;
}
},
onloading: function (e) {
this.loading_display = true
setTimeout(function () {
this.loading_display = 'hide'
}.bind(this), 1000)
}
}

Expand Down Expand Up @@ -1188,7 +1194,7 @@
}
})
})
;__weex_bootstrap__("@weex-component/cb2317d07ad026f4c51aa61496b2b05c", {
;__weex_bootstrap__("@weex-component/b14be55e383e036df641734903dcecc6", {
"transformerVersion": "0.3.1"
},undefined)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/* 0 */
/***/ function(module, exports, __webpack_require__) {

;__weex_define__("@weex-component/998c3a707a8f709ce0968668f832c89e", [], function(__weex_require__, __weex_exports__, __weex_module__){
;__weex_define__("@weex-component/13c6f8f9dc2ed874e5f24be910e31f26", [], function(__weex_require__, __weex_exports__, __weex_module__){

;
__webpack_require__(1);
Expand All @@ -60,22 +60,18 @@
this.playStatus = 'play'
},
onpause: function(e) {
console.log(this.playStatus);
this.playStatus = e.playStatus;
this.$call('modal', 'toast', {'message': 'video pause'});
},
onstart: function(e) {
console.log(this.playStatus);
this.playStatus = e.playStatus;
this.$call('modal', 'toast', {'message': 'video start'});
},
onfinish: function(e) {
console.log(this.playStatus);
this.playStatus = e.playStatus;
this.$call('modal', 'toast', {'message': 'video finish'});
},
onfail: function(e) {
console.log(this.playStatus);
this.playStatus = e.playStatus;
this.$call('modal', 'toast', {'message': 'video fail'});
}
Expand Down Expand Up @@ -145,7 +141,7 @@
}
})
})
;__weex_bootstrap__("@weex-component/998c3a707a8f709ce0968668f832c89e", {
;__weex_bootstrap__("@weex-component/13c6f8f9dc2ed874e5f24be910e31f26", {
"transformerVersion": "0.3.1"
},undefined)

Expand Down
144 changes: 144 additions & 0 deletions android/playground/app/src/main/assets/iconfont.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};

/******/ // The require function
/******/ function __webpack_require__(moduleId) {

/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;

/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };

/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ // Flag the module as loaded
/******/ module.loaded = true;

/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }


/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;

/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;

/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";

/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports) {

;__weex_define__("@weex-component/f30da4ff4deb271b161473fed8083ed2", [], function(__weex_require__, __weex_exports__, __weex_module__){

;
__weex_module__.exports = {
created: function() {
var domModule = __weex_require__('@weex-module/dom');
//目前支持ttf、woff文件,不支持svg、eot类型
domModule.addRule('font-face', {
'font-family': "iconfont1",
'src' : "url('iconfont.ttf')"
});
domModule.addRule('font-face', {
'font-family': "iconfont2",
'src': "url('http://at.alicdn.com/t/font_1469606063_76593.ttf')"
});
domModule.addRule('font-face', {
'font-family': "iconfont3",
'src': "url('http://at.alicdn.com/t/font_1469606522_9417143.woff')"
});
domModule.addRule('font-face', {
'font-family': "iconfont4",
'src': "url('file:///storage/emulated/0/Android/data/com.alibaba.weex/cache/http:__at.alicdn.com_t_font_1469606063_76593.ttf')"
});
}
}

;__weex_module__.exports.template = __weex_module__.exports.template || {}
;Object.assign(__weex_module__.exports.template, {
"type": "div",
"children": [
{
"type": "text",
"classList": [
"title1"
],
"attr": {
"value": "Assets: "
}
},
{
"type": "text",
"classList": [
"title2"
],
"attr": {
"value": "http ttf: "
}
},
{
"type": "text",
"classList": [
"title3"
],
"attr": {
"value": "http woff: "
}
},
{
"type": "text",
"classList": [
"title4"
],
"attr": {
"value": "file: "
}
}
]
})
;__weex_module__.exports.style = __weex_module__.exports.style || {}
;Object.assign(__weex_module__.exports.style, {
"title1": {
"color": "#FF0000",
"fontSize": 36,
"fontFamily": "iconfont1"
},
"title2": {
"color": "#FF0000",
"fontSize": 36,
"fontFamily": "iconfont2"
},
"title3": {
"color": "#FF0000",
"fontSize": 36,
"fontFamily": "iconfont3"
},
"title4": {
"color": "#FF0000",
"fontSize": 36,
"fontFamily": "iconfont4"
}
})
})
;__weex_bootstrap__("@weex-component/f30da4ff4deb271b161473fed8083ed2", {
"transformerVersion": "0.3.1"
},undefined)

/***/ }
/******/ ]);
Binary file removed android/playground/app/src/main/assets/iconfont.ttf
Binary file not shown.
83 changes: 83 additions & 0 deletions android/playground/app/src/main/assets/image-demo2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};

/******/ // The require function
/******/ function __webpack_require__(moduleId) {

/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;

/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };

/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ // Flag the module as loaded
/******/ module.loaded = true;

/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }


/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;

/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;

/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";

/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports) {

;__weex_define__("@weex-component/fca21923ec1c1c0065eb4383d4822356", [], function(__weex_require__, __weex_exports__, __weex_module__){

;
__weex_module__.exports = {
data: function () {return {
img: '//gw.alicdn.com/tps/i2/TB1DpsmMpXXXXabaXXX20ySQVXX-512-512.png_400x400.jpg'
}}
}

;__weex_module__.exports.template = __weex_module__.exports.template || {}
;Object.assign(__weex_module__.exports.template, {
"type": "image",
"classList": [
"img"
],
"style": {
"width": 400,
"height": 400
},
"attr": {
"src": function () {return this.img},
"placeHolder": "hehe"
}
})
;__weex_module__.exports.style = __weex_module__.exports.style || {}
;Object.assign(__weex_module__.exports.style, {
"img": {
"marginBottom": 20
}
})
})
;__weex_bootstrap__("@weex-component/fca21923ec1c1c0065eb4383d4822356", {
"transformerVersion": "0.3.1"
},undefined)

/***/ }
/******/ ]);
10 changes: 7 additions & 3 deletions android/playground/app/src/main/assets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/* 0 */
/***/ function(module, exports, __webpack_require__) {

;__weex_define__("@weex-component/2720f5df2d848285e38e4b2906e8540a", [], function(__weex_require__, __weex_exports__, __weex_module__){
;__weex_define__("@weex-component/5e6c4a62a4f2ddfd7c2d1010facc95ec", [], function(__weex_require__, __weex_exports__, __weex_module__){

;
__webpack_require__(15);
Expand Down Expand Up @@ -78,11 +78,15 @@
{name: 'module/instance-api', title: 'Instance API'},
{name: 'module/modal', title: 'Modal'},
{name: 'module/stream-demo', title: 'Stream'},
{name: 'module/storage-demo',title:'Storage'},
{name: 'module/clipboard', title: 'Clipboard'},

// showcase
{name: 'showcase/new-fashion/index', title: 'Activity'},
{name: 'showcase/calculator', title: 'Calculator'},
{name: 'showcase/minesweeper', title: 'Minesweeper'},
{name: 'showcase/ui', title: 'UI Gallery'}
{name: 'showcase/ui', title: 'UI Gallery'},
{name: 'showcase/dropdown/dropdown-demo', title: 'Dropdown'}
]
}}
}
Expand All @@ -96,7 +100,7 @@
}
})
})
;__weex_bootstrap__("@weex-component/2720f5df2d848285e38e4b2906e8540a", {
;__weex_bootstrap__("@weex-component/5e6c4a62a4f2ddfd7c2d1010facc95ec", {
"transformerVersion": "0.3.1"
},undefined)

Expand Down
Loading

0 comments on commit d276ada

Please sign in to comment.